Skip to content

Instantly share code, notes, and snippets.

@onertipaday
Last active July 28, 2021 07:36
Show Gist options
  • Save onertipaday/54d137d0d400a1b7d6f2c3cb7bfc810d to your computer and use it in GitHub Desktop.
Save onertipaday/54d137d0d400a1b7d6f2c3cb7bfc810d to your computer and use it in GitHub Desktop.
quick and dirty assembly with dragonflye
#!/usr/bin/env nextflow
params.inputDir = "./fastq/*.fastq.gz"
params.outdir = "./results"
Channel
.fromPath(params.inputDir).map { tuple (it.name.split('.fastq.gz')[0], it ) }
.set { fastq_assemble_ch }
process dragonflye {
publishDir "${params.outdir}", mode: 'copy', pattern: "${sample_id}_dragonflye_out/contigs.fa"
publishDir "${params.outdir}", mode: 'copy', pattern: "${sample_id}_dragonflye_out/flye-info.txt"
input:
set val(sample_id),path(reads) from fastq_assemble_ch
output:
path "${sample_id}_dragonflye_out/contigs.fa" into assembly_ch
path "${sample_id}_dragonflye_out/flye-info.txt" into assembly_info_ch
script:
"""
dragonflye --reads $reads --outdir ${sample_id}_dragonflye_out --cpus ${task.cpus} --medaka 3 --model r941_min_fast_g303
"""
}
process {
withName:dragonflye{
container = 'quay.io/biocontainers/dragonflye:1.0.2--hdfd78af_0'
cpus = 12
clusterOptions = "-S /bin/bash -cwd -l mf=16G"
}
executor = 'sge'
penv = 'smp'
queue = 'global.q'
errorStrategy = 'retry'
maxRetries = 1
}
docker {
enabled = false
}
singularity {
enabled = true
autoMounts = true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment