#*/
#* Copyright (c) 2011 Gitanjali Yadav (gy@nipgr.res.in)
#* All rights reserved.
#*
#* Redistribution and use in source and binary forms, with or without
#* modification, are permitted without a fee provided that the following
#* conditions are met:
#*
#* 1. This software is only used for private, research, or academic 
#*    purposes.
#*    
#* 2. Redistributions of source code must retain the above copyright
#*    notice, this list of conditions and the following disclaimer.
#*
#* 3. Redistributions in binary form must reproduce the above copyright
#*    notice, this list of conditions and the following disclaimer in the
#*    documentation and/or other materials provided with the distribution.
#*
#* 4. Any changes made to this package must be submitted to the author.
#*    The legal status of the submitted changes must allow their inclusion
#*    into this package under this license.
#*
#* 5. Publications in the field of pseudorandom number generation, which
#*    made use of this package must include a reference to this package.
#*      
#* Any use of this software in a commercial environment requires a
#* written licence from the author. Contact Gitanjali Yadav
#* (gy@nipgr.res.in) to negotiate the terms.
#*
#* THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
#* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
#* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#* 
#* IN NO EVENT SHALL GITANJALI YADAV BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
#* INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES 
#* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
#* NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
#* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
#* OF THIS SOFTWARE.
#*
#*/
#*
#*/
#*  get_edge_perturbation 	For perturbation of a single edge in the network 
#*
#*  Author:	Gitanjali Yadav (gy@nipgr.res.in)
#*
#*  Last Modification: Wed Sep 18 12:50:35 CEST 2011
#*
#*  Called form within 'run_single_perturbation'
#*/

#*/ Modification History:

#   11/07/01: First Version.
#   11/09/07: replaced /usr/local/bin/R by Rpath
#   11/18/09: added warnings for missing parameters 
#*/

sed 's/IEDGE/'"$1"'/' run_edge_perturb.R >runedge_tmp.R
`cat Rpath` --no-restore --no-save --no-readline --slave < runedge_tmp.R >>R.out
sed 's/"/\n/g' edge_$1.isolates | grep '[A-Z|a-z|0-9]' | sed '1d' >edge_$1.secex
