diff --git a/workflow/rna-seq.nf b/workflow/rna-seq.nf index a96eaf6d2118942d52598ae79445883361c4d1b1..4df8b08d2980c339e0d630696b959774b1118d53 100755 --- a/workflow/rna-seq.nf +++ b/workflow/rna-seq.nf @@ -197,7 +197,7 @@ if (spike == 'yes') { reference = Channel.fromPath ("/project/BICF/BICF_Core/shared/gudmap/references/GRCm38.P6/hisat2") } } -reference.subscribe { println "$it" } +//reference.subscribe { println "$it" } /* * trimData: trims any adapter or non-host sequences from the data @@ -249,8 +249,8 @@ process alignReads { script: """ if [ "${endsManual_alignReads}" == 'pe' ]; then - hisat2 -p `nproc` --add-chrname --un-gz ${repRID}.unal.gz -S ${repRID}.sam -x ${reference}/genome -1 ${fqs[0]} -2 ${fqs[1]} 1>${repRID}.align.out 2>${repRID}.align.err; - else hisat2 -p `nproc` --add-chrname --un-gz ${repRID}.unal.gz -S ${repRID}.sam -x ${reference}/genome -U ${fqs[0]} 1>${repRID}.align.out 2>${repRID}.align.err; + hisat2 -p `nproc` --add-chrname --un-gz ${repRID}.unal.gz -S ${repRID}.sam -x ${reference}/genome ${stranded_alignReads} -1 ${fqs[0]} -2 ${fqs[1]} 1>${repRID}.align.out 2>${repRID}.align.err; + else hisat2 -p `nproc` --add-chrname --un-gz ${repRID}.unal.gz -S ${repRID}.sam -x ${reference}/genome ${stranded_alignReads} -U ${fqs[0]} 1>${repRID}.align.out 2>${repRID}.align.err; fi; samtools view -1 --threads `nproc` -o ${repRID}.bam ${repRID}.sam 1>>${repRID}.align.out 2>>${repRID}.align.err; samtools sort -@ `nproc` -O BAM -o ${repRID}.bam 1>>${repRID}.align.out 2>>${repRID}.align.err; diff --git a/workflow/scripts/parseMeta.py b/workflow/scripts/parseMeta.py index 43ca2392078171ec9a1f42f7f9a83d13d0f0383b..f669cfa5f157aac7ec658c6cf6174ed98ff467fc 100644 --- a/workflow/scripts/parseMeta.py +++ b/workflow/scripts/parseMeta.py @@ -54,9 +54,12 @@ def main(): # Get strandedness metadata from 'Experiment Settings.csv' if (args.parameter == "stranded"): if (metaFile.Has_Strand_Specific_Information.unique() == "yes"): - stranded = "stranded" + if endsManual == "se": + stranded = "--rna-strandness F" + else: + stranded = "--rna-strandness FR" elif (metaFile.Has_Strand_Specific_Information.unique() == "no"): - stranded = "unstranded" + stranded = "" else: print("Stranded metadata not match expected options: " + metaFile.Has_Strand_Specific_Information.unique()) exit(1) @@ -85,4 +88,4 @@ def main(): print(species) if __name__ == '__main__': - main() \ No newline at end of file + main()