h3abionet / HPCBio-Refgraph_pipeline

0 stars 6 forks source link

in bamtofastq process: add option for single reads #3

Closed grendon closed 3 years ago

grendon commented 4 years ago

Something like:

params.singleEnd = true /*options: true|false. true = the input type is single end reads; false = the input type is paired reads*/

Inside the process you need to execute one command when the input is single end reads and a different command(s) when the input is paired end reads. An example is shown here: https://www.nextflow.io/docs/latest/process.html#conditional-scripts.

Also, Picard's samtofastq, would be preferable with paired reads because it can also output unpaired reads. See: https://broadinstitute.github.io/picard/command-line-overview.html#SamToFastq

So, the snippet of code for the paired end option would include three steps:

  1. convert bam to fastq and the output is R1 R2 unpaired
  2. stitch R1+R2
  3. concatenate stiched + unpaired
grendon commented 4 years ago

done in dev branch

grendon commented 3 years ago

done