Skip to content

Commit

Permalink
Fixed how quast is executed accross different profiles conda/docker/s…
Browse files Browse the repository at this point in the history
…ingularity
  • Loading branch information
fmalmeida committed Jan 12, 2022
1 parent ba7c4c6 commit 76d6d73
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 14 deletions.
20 changes: 19 additions & 1 deletion modules/QualityAssessment/quast.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,27 @@ process quast {
single_param = !(single =~ /input.?/) ? "--single ${single}" : ""
lreads_param = !(lreads =~ /input.?/) ? "--${lr_type} ${lreads}" : ""

if (params.selected_profile == "docker" || params.selected_profile == "conda")
"""
# run quast
quast.py \\
-o ${assembler} \\
-t ${params.threads} \\
${lreads_param} \\
${paired_param} \\
${single_param} \\
--conserved-genes-finding \\
--rna-finding \\
--min-contig 100 \\
${params.quast_additional_parameters} \\
${contigs}
"""

else if (params.selected_profile == "singularity")
"""
# fix busco usage in singularity
cp -R $CONDA_PREFIX/envs/mpgap-3.1/lib/python3.6/site-packages/quast_libs/busco ~/.quast
mkdir -p ~/.quast/busco
cp -R /opt/conda/envs/mpgap-*/lib/python3.6/site-packages/quast_libs/busco ~/.quast
# run quast
quast.py \\
Expand Down
29 changes: 16 additions & 13 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -193,27 +193,30 @@ profiles {

// conda profile
conda {
singularity.enabled = false
docker.enabled = false
process.conda = "$CONDA_PREFIX/envs/mpgap-3.1"
params.selected_profile = "conda"
singularity.enabled = false
docker.enabled = false
process.conda = "$CONDA_PREFIX/envs/mpgap-3.1"
}

// docker profile
docker {
singularity.enabled = false
docker.enabled = true
docker.runOptions = '-u \$(id -u):\$(id -g)'
fixOwnership = true
process.container = "fmalmeida/mpgap:v3.1"
params.selected_profile = "docker"
singularity.enabled = false
docker.enabled = true
docker.runOptions = '-u \$(id -u):\$(id -g)'
fixOwnership = true
process.container = "fmalmeida/mpgap:v3.1"
}

// singularity profile
singularity {
docker.enabled = false
singularity.enabled = true
singularity.autoMounts = true
process.container = "docker://fmalmeida/mpgap:v3.1"
singularity.autoMounts = true
params.selected_profile = "singularity"
docker.enabled = false
singularity.enabled = true
singularity.autoMounts = true
process.container = "docker://fmalmeida/mpgap:v3.1"
singularity.autoMounts = true
}

}
Expand Down

0 comments on commit 76d6d73

Please sign in to comment.