zoark0

demux.nf

Jan 20th, 2022
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.20 KB | None | 0 0
  1. #!/user/bin/nextflow
  2.  
  3. nextflow.enable.dsl=2
  4.  
  5. params.samplesheet = "/mnt/scgc/scgc_nfs/lab/ggavelis/sandbox/data/nextseq/210408_VH00511_2_AAAFFWNHV/SampleSheet.csv"
  6. params.basecalls = "/mnt/scgc/scgc_nfs/lab/ggavelis/sandbox/data/nextseq/210408_VH00511_2_AAAFFWNHV/Data/Intensities/BaseCalls/"
  7. params.runfolder = "/mnt/scgc/scgc_nfs/lab/ggavelis/sandbox/data/nextseq/210408_VH00511_2_AAAFFWNHV/"
  8.  
  9. params.outdir = "demux_results"
  10.  
  11. process docker_test {
  12.     tag "demultiplexing reads and writing fastq files"
  13.     module 'singularity/3.8.0'
  14.     publishDir params.outdir
  15.     cpus 24
  16.    
  17.     input:
  18.     path(samplesheet)
  19.    
  20.     output:
  21.     tuple path(demultiplexed), path(stats), path(reports), path(interop), emit: demux
  22.    
  23.     """
  24.     bcl2fastq.py --sample-sheet "${samplesheet}" \
  25.     --input-dir "${params.basecalls}" \
  26.     --runfolder-dir "${params.runfolder}"
  27.     --stats-dir "stats" \
  28.     --reports-dir "reports" \
  29.     --output-dir "demultiplexed" \
  30.     --interop-dir "interop" \
  31.     --loading-threads 12 \
  32.     --processing-threads "${task.cpus}" \
  33.     --writing-threads 12 \
  34.     --barcode-mismatches 0 \
  35.     --no-lane-splitting \
  36.     --no-wait
  37.     """
  38. }
  39.  
  40.  
  41. workflow {
  42.     samplesheet_ch = Channel.fromPath( params.samplesheet )
  43.     docker_test(samplesheet_ch)
  44. }
  45.  
Advertisement
Add Comment
Please, Sign In to add comment