Skip to content

Commit

Permalink
Merge pull request #28 from nf-core/fix_conda_env_for_local_module
Browse files Browse the repository at this point in the history
Use jq sequera containers
  • Loading branch information
sateeshperi authored Dec 18, 2024
2 parents e052ff0 + 22d94ba commit 75ea4d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
channels:
- conda-forge
- bioconda

dependencies:
- bioconda::jq=1.6
- conda-forge::jq=1.7.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
process MULTIQC_ASSEMBLYSCAN_PLOT_DATA {
tag "${json.baseName}"
label 'process_single'
conda "${moduleDir}/multiqc_assemblyscan_plot_data_environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/jq:1.6':
'biocontainers/jq:1.6' }"

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/84/84eef7b4cd5f6304aa5ba9ac6b0051850af300abefb615b72b776d1245990749/data'
: 'community.wave.seqera.io/library/jq:fee8aafd41d9e3aa' }"

// This module parses the JSON output of the assemblyscan module with jq to extract
// statistics about GC content and contig length. I do not know how to contribute
Expand All @@ -13,13 +15,12 @@ process MULTIQC_ASSEMBLYSCAN_PLOT_DATA {
path(json)

output:
path "*_mqc.tsv", emit: tsv
path ("*_mqc.tsv"), emit: tsv

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
"""
echo "# id: 'base_content_summary'" > gc_summary_mqc.tsv
echo "# section_name: 'Base frequency'" >> gc_summary_mqc.tsv
Expand All @@ -31,7 +32,7 @@ process MULTIQC_ASSEMBLYSCAN_PLOT_DATA {
echo "# title: 'per_base content and percentage'" >> gc_summary_mqc.tsv
echo "# ylab: ''" >> gc_summary_mqc.tsv
echo "id\tpercent_A\tpercent_C\tpercent_G\tpercent_T\tpercent_N\tcontig_non_ACGTN" >> gc_summary_mqc.tsv
for i in $json
for i in ${json}
do
printf "\$(basename \$i .json)\t" >> gc_summary_mqc.tsv
jq -r '[.contig_percent_a, .contig_percent_c, .contig_percent_g, .contig_percent_t, .contig_percent_n, .contig_non_acgtn] | @tsv' \$i >> gc_summary_mqc.tsv
Expand All @@ -47,7 +48,7 @@ process MULTIQC_ASSEMBLYSCAN_PLOT_DATA {
echo "# title: 'contigs length statistics'" >> contig_length_mqc.tsv
echo "# ylab: 'length'" >> contig_length_mqc.tsv
echo "id\tTOTALcontiglen\tMINcontiglen\tMAXcontiglen\ttotalcontigs\tcontigs>1k\tcontigs>10k" >> contig_length_mqc.tsv
for i in $json
for i in ${json}
do
printf "\$(basename \$i .json)\t" >> contig_length_mqc.tsv
jq -r '[.total_contig_length, .min_contig_length, .max_contig_length, .total_contig, .contigs_greater_1k, .contigs_greater_10k] | @tsv' \$i >> contig_length_mqc.tsv
Expand Down
2 changes: 1 addition & 1 deletion workflows/pairgenomealign.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

include { ASSEMBLYSCAN } from '../modules/nf-core/assemblyscan/main'
include { MULTIQC_ASSEMBLYSCAN_PLOT_DATA } from '../modules/local/multiqc_assemblyscan_plot_data'
include { MULTIQC_ASSEMBLYSCAN_PLOT_DATA } from '../modules/local/multiqc_assemblyscan_plot_data/main'
include { PAIRALIGN_M2M } from '../subworkflows/local/pairalign_m2m/main'
include { SEQTK_CUTN as CUTN_TARGET } from '../modules/nf-core/seqtk/cutn/main'
include { SEQTK_CUTN as CUTN_QUERY } from '../modules/nf-core/seqtk/cutn/main'
Expand Down

0 comments on commit 75ea4d4

Please sign in to comment.