erange version 4.0a dev release
[erange.git] / docs / runStandardAnalysis.sh
index 6d83297bf4f39964793ced9800e46a3eb7bbcbc0..aa5fe60588a30ceba6a65301db81b13ac4f6051f 100755 (executable)
 
 if [ -z "$ERANGEPATH" ]
 then
 
 if [ -z "$ERANGEPATH" ]
 then
-    ERANGEPATH='../commoncode'
+    ERANGEPATH='../erange'
 fi
 
 fi
 
-echo 'runStandardAnalysis.sh: version 4.2'
+echo 'runStandardAnalysis.sh: version 4.3'
 
 models=""
 if [ $# -eq 5 ]; then
 
 models=""
 if [ $# -eq 5 ]; then
-    models=" -models "$5
+    models=" --models "$5
 fi
 
 replacemodels=""
 if [ $# -eq 6 ]; then
 fi
 
 replacemodels=""
 if [ $# -eq 6 ]; then
-    replacemodels=" -models $5 -replacemodels "
+    replacemodels=" --models $5 --replacemodels "
 fi
 
 if [ -z "$1" ]
 then
     echo
 fi
 
 if [ -z "$1" ]
 then
     echo
-    echo 'usage:runStandardAnalysis.sh genome rdsprefix repeatmaskdb bpradius [modelfile] [-replacemodels]'
+    echo 'usage:runStandardAnalysis.sh genome rdsprefix repeatmaskdb bpradius [modelfile] [--replacemodels]'
     echo
     echo 'where rdsprefix is the name of the rds file without the .rds extension'
     echo 'use "none" for the repeatmaskdb if you do not have one'
     echo
     echo 'where rdsprefix is the name of the rds file without the .rds extension'
     echo 'use "none" for the repeatmaskdb if you do not have one'
@@ -44,48 +44,48 @@ python $ERANGEPATH/recordLog.py rna.log runStandardAnalysis.sh "with parameters:
 # count the unique reads falling on the gene models ; the nomatch files are 
 # mappable reads that fell outside of the Cistematic gene models and not the 
 # unmappable of Eland (i.e, the "NM" reads)
 # count the unique reads falling on the gene models ; the nomatch files are 
 # mappable reads that fell outside of the Cistematic gene models and not the 
 # unmappable of Eland (i.e, the "NM" reads)
-echo "python $ERANGEPATH/geneMrnaCounts.py $1 $2.rds $2.uniqs.count -markGID -cache 1 $models $replacemodels"
-python $ERANGEPATH/geneMrnaCounts.py $1 $2.rds $2.uniqs.count -markGID -cache 1 $models $replacemodels
+echo "python $ERANGEPATH/geneMrnaCounts.py $1 $2.rds $2.uniqs.count --markGID --cache 1 $models $replacemodels"
+python $ERANGEPATH/geneMrnaCounts.py $1 $2.rds $2.uniqs.count --markGID --cache 1 $models $replacemodels
 
 # calculate a first-pass RPKM to re-weigh the unique reads,
 # using 'none' for the splice count
 
 # calculate a first-pass RPKM to re-weigh the unique reads,
 # using 'none' for the splice count
-echo "python $ERANGEPATH/normalizeExpandedExonic.py $1 $2.rds $2.uniqs.count none $2.firstpass.rpkm -cache  $models $replacemodels"
-python $ERANGEPATH/normalizeExpandedExonic.py $1 $2.rds $2.uniqs.count none $2.firstpass.rpkm -cache  $models $replacemodels
+echo "python $ERANGEPATH/normalizeExpandedExonic.py $1 $2.rds $2.uniqs.count none $2.firstpass.rpkm --cache  $models $replacemodels"
+python $ERANGEPATH/normalizeExpandedExonic.py $1 $2.rds $2.uniqs.count none $2.firstpass.rpkm --cache  $models $replacemodels
 
 # recount the unique reads with weights calculated during the first pass
 
 # recount the unique reads with weights calculated during the first pass
-echo "python $ERANGEPATH/geneMrnaCountsWeighted.py $1 $2.rds $2.firstpass.rpkm $2.uniqs.recount -uniq -cache 1  $models $replacemodels"
-python $ERANGEPATH/geneMrnaCountsWeighted.py $1 $2.rds $2.firstpass.rpkm $2.uniqs.recount -uniq -cache 1  $models $replacemodels
+echo "python $ERANGEPATH/geneMrnaCountsWeighted.py $1 $2.rds $2.firstpass.rpkm $2.uniqs.recount --uniq --cache 1  $models $replacemodels"
+python $ERANGEPATH/geneMrnaCountsWeighted.py $1 $2.rds $2.firstpass.rpkm $2.uniqs.recount --uniq --cache 1  $models $replacemodels
 
 # count splice reads
 
 # count splice reads
-echo "python $ERANGEPATH/geneMrnaCounts.py $1 $2.rds $2.splices.count -splices -noUniqs -cache 1  $models $replacemodels"
-python $ERANGEPATH/geneMrnaCounts.py $1 $2.rds $2.splices.count -splices -noUniqs -cache 1  $models $replacemodels
+echo "python $ERANGEPATH/geneMrnaCounts.py $1 $2.rds $2.splices.count --splices --noUniqs --cache 1  $models $replacemodels"
+python $ERANGEPATH/geneMrnaCounts.py $1 $2.rds $2.splices.count --splices --noUniqs --cache 1  $models $replacemodels
 
 # Alternative 1: find new regions outside of gene models with reads piled up 
 
 # Alternative 1: find new regions outside of gene models with reads piled up 
-echo "python $ERANGEPATH/findall.py RNAFAR $2.rds $2.newregions.txt -RNA -minimum 1 -nomulti -flag NM -log rna.log -cache 1"
-python $ERANGEPATH/findall.py RNAFAR $2.rds $2.newregions.txt -RNA -minimum 1 -nomulti -flag NM -log rna.log -cache 1
+echo "python $ERANGEPATH/findall.py RNAFAR $2.rds $2.newregions.txt --RNA --minimum 1 --nomulti --flag NM --log rna.log --cache 1"
+python $ERANGEPATH/findall.py RNAFAR $2.rds $2.newregions.txt --RNA --minimum 1 --nomulti --flag NM --log rna.log --cache 1
 
 # Alternative 1: filter out new regions that overlap repeats more than a certain fraction
 
 # Alternative 1: filter out new regions that overlap repeats more than a certain fraction
-echo "python $ERANGEPATH/checkrmask.py $3 $2.newregions.txt $2.newregions.repstatus $2.newregions.good -startField 1 -cache 1"
-python $ERANGEPATH/checkrmask.py $3 $2.newregions.txt $2.newregions.repstatus $2.newregions.good -log rna.log -startField 1 -cache 1
+echo "python $ERANGEPATH/checkrmask.py $3 $2.newregions.txt $2.newregions.repstatus $2.newregions.good --log rna.log --startField 1 --cache 1"
+python $ERANGEPATH/checkrmask.py $3 $2.newregions.txt $2.newregions.repstatus $2.newregions.good --log rna.log --startField 1 --cache 1
 
 # map all candidate regions that are within a given radius of a gene in bp
 
 # map all candidate regions that are within a given radius of a gene in bp
-echo "python $ERANGEPATH/getallgenes.py $1 $2.newregions.good $2.candidates.txt -radius $4 -trackfar -cache  $models $replacemodels"
-python $ERANGEPATH/getallgenes.py $1 $2.newregions.good $2.candidates.txt -radius $4 -trackfar -cache  $models $replacemodels
+echo "python $ERANGEPATH/getallgenes.py $1 $2.newregions.good $2.candidates.txt --radius $4 --trackfar --cache  $models $replacemodels"
+python $ERANGEPATH/getallgenes.py $1 $2.newregions.good $2.candidates.txt --radius $4 --trackfar --cache  $models $replacemodels
 
 # make sure candidates.txt file exists
 echo "touch $2.candidates.txt"
 touch $2.candidates.txt
 
 # calculate expanded exonic read density
 
 # make sure candidates.txt file exists
 echo "touch $2.candidates.txt"
 touch $2.candidates.txt
 
 # calculate expanded exonic read density
-echo "python $ERANGEPATH/normalizeExpandedExonic.py $1 $2.rds $2.uniqs.recount $2.splices.count $2.expanded.rpkm $2.candidates.txt $2.accepted.rpkm -cache  $models $replacemodels"
-python $ERANGEPATH/normalizeExpandedExonic.py $1 $2.rds $2.uniqs.recount $2.splices.count $2.expanded.rpkm $2.candidates.txt $2.accepted.rpkm -cache  $models $replacemodels
+echo "python $ERANGEPATH/normalizeExpandedExonic.py $1 $2.rds $2.uniqs.recount $2.splices.count $2.expanded.rpkm $2.candidates.txt $2.accepted.rpkm --cache  $models $replacemodels"
+python $ERANGEPATH/normalizeExpandedExonic.py $1 $2.rds $2.uniqs.recount $2.splices.count $2.expanded.rpkm $2.candidates.txt $2.accepted.rpkm --cache  $models $replacemodels
 
 # weigh multi-reads
 
 # weigh multi-reads
-echo "python $ERANGEPATH/geneMrnaCountsWeighted.py $1 $2.rds $2.expanded.rpkm $2.multi.count -accept $2.accepted.rpkm -multi -cache 1  $models $replacemodels"
-python $ERANGEPATH/geneMrnaCountsWeighted.py $1 $2.rds $2.expanded.rpkm $2.multi.count -accept $2.accepted.rpkm -multi -cache 1  $models $replacemodels
+echo "python $ERANGEPATH/geneMrnaCountsWeighted.py $1 $2.rds $2.expanded.rpkm $2.multi.count --accept $2.accepted.rpkm --multi --cache 1  $models $replacemodels"
+python $ERANGEPATH/geneMrnaCountsWeighted.py $1 $2.rds $2.expanded.rpkm $2.multi.count --accept $2.accepted.rpkm --multi --cache 1  $models $replacemodels
 
 # calculate final exonic read density
 
 # calculate final exonic read density
-echo "python $ERANGEPATH/normalizeFinalExonic.py $2.rds $2.expanded.rpkm $2.multi.count $2.final.rpkm -multifraction -withGID -cache"
-python $ERANGEPATH/normalizeFinalExonic.py $2.rds $2.expanded.rpkm $2.multi.count $2.final.rpkm -multifraction -withGID -cache
+echo "python $ERANGEPATH/normalizeFinalExonic.py $2.rds $2.expanded.rpkm $2.multi.count $2.final.rpkm --multifraction --withGID --cache"
+python $ERANGEPATH/normalizeFinalExonic.py $2.rds $2.expanded.rpkm $2.multi.count $2.final.rpkm --multifraction --withGID --cache
 
 fi
\ No newline at end of file
 
 fi
\ No newline at end of file