From d92d93f967a920462769bfc282a7eb632c15543b Mon Sep 17 00:00:00 2001 From: s181706 <jonathan.gesell@utsouthwestern.edu> Date: Wed, 22 Jan 2020 10:56:52 -0600 Subject: [PATCH] Updated Hisat2 options, and output of parseMeta. --- workflow/rna-seq.nf | 6 +++--- workflow/scripts/parseMeta.py | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/workflow/rna-seq.nf b/workflow/rna-seq.nf index a96eaf6..4df8b08 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 43ca239..f669cfa 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() -- GitLab