erange version 4.0a dev release
[erange.git] / docs / runRNAPairedAnalysis.sh
index baf7f04664aa669a0c92211ad410f4bc79172dad..cf75b6a5c9047ebb94332f26e8af234b68f3e382 100755 (executable)
 
 if [ -z "$ERANGEPATH" ]
 then
-    ERANGEPATH='../commoncode'
+    ERANGEPATH='../erange'
 fi
 
-echo 'runRNAPairedAnalysis.sh: version 3.7'
+echo 'runRNAPairedAnalysis.sh: version 3.8'
 
 models=""
 if [ $# -eq 5 ]; then
-    models=" -models "$5
+    models=" --models "$5
 fi
 
 replacemodels=""
 if [ $# -eq 6 ]; then
-    replacemodels=" -models $5 -replacemodels "
+    replacemodels=" --models $5 --replacemodels "
 fi
 
 if [ -z "$1" ]
 then
     echo
-    echo 'usage:runRNAPairedAnalysis.sh genome rdsprefix repeatmaskdb [modelfile] [-replacemodels]'
+    echo 'usage:runRNAPairedAnalysis.sh genome rdsprefix repeatmaskdb [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'
@@ -45,37 +45,37 @@ python $ERANGEPATH/recordLog.py rna.log runRNAPairedAnalysis.sh "with parameters
 # 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
+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
-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
-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
-python $ERANGEPATH/geneMrnaCounts.py $1 $2.rds $2.splices.count -splices -noUniqs -markGID -cache 1 $models $replacemodels
+python $ERANGEPATH/geneMrnaCounts.py $1 $2.rds $2.splices.count --splices --noUniqs --markGID --cache 1 $models $replacemodels
 
 # find new regions outside of gene models with reads piled up 
-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
 
 # filter out new regions that overlap repeats more than a certain fraction
-python $ERANGEPATH/checkrmask.py $3 $2.newregions.txt $2.newregions.repstatus $2.newregions.checked -startField 1 -log rna.log -cache 1
+python $ERANGEPATH/checkrmask.py $3 $2.newregions.txt $2.newregions.repstatus $2.newregions.checked --startField 1 --log rna.log --cache 1
 
 # calculate the read densities
-python $ERANGEPATH/regionCounts.py $2.newregions.checked $2.rds $2.newregions.good -markRDS -cache -log rna.log
+python $ERANGEPATH/regionCounts.py $2.newregions.checked $2.rds $2.newregions.good --markRDS --cache --log rna.log
 
 # map all candidate regions that have paired ends overlapping with known genes
-python $ERANGEPATH/rnafarPairs.py $1 $2.newregions.good $2.rds $2.candidates.txt -cache $models $replacemodels
+python $ERANGEPATH/rnafarPairs.py $1 $2.newregions.good $2.rds $2.candidates.txt --cache $models $replacemodels
 
 # calculate expanded exonic read density
-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
-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
-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