Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Important! Template update for nf-core/tools v3.0.2 #153

Merged
merged 14 commits into from
Oct 11, 2024
Merged
Prev Previous commit
Next Next commit
fix schema and channels
  • Loading branch information
maxulysse committed Oct 11, 2024
commit 4c580448ae30713409a7d2dfc03488a804779dc1
10 changes: 1 addition & 9 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"help_text": "If you use AWS iGenomes, this has already been set for you appropriately.\nAlternatively species listed in Ensembl Genomes caches can be used."
},
"vep_cache_version": {
"type": "number",
"type": "string",
"fa_icon": "fas fa-tag",
"description": "VEP cache version.",
"help_text": "If you use AWS iGenomes, this has already been set for you appropriately.\nAlternatively cache version can be use to specify the correct Ensembl Genomes version number as these differ from the concurrent Ensembl/VEP version numbers"
Expand All @@ -163,14 +163,6 @@
"description": "Download annotation cache.",
"help_text": "Set this parameter, if you wish to download annotation cache."
},
"igenomes_base": {
"type": "string",
"format": "directory-path",
"description": "Directory / URL base for iGenomes references.",
"default": "s3://ngi-igenomes/igenomes/",
"fa_icon": "fas fa-cloud-download-alt",
"hidden": true
},
"igenomes_ignore": {
"type": "boolean",
"description": "Do not load the iGenomes reference config.",
Expand Down
10 changes: 3 additions & 7 deletions subworkflows/local/utils_nfcore_rnavar_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,11 @@ workflow PIPELINE_INITIALISATION {
// Create channel from input file provided through params.input
//

ch_samplesheet = Channel
.fromList(samplesheetToList(params.input, "${projectDir}/assets/schema_input.json"))
ch_samplesheet = Channel.fromList(samplesheetToList(params.input, "${projectDir}/assets/schema_input.json"))
.map{ meta, fastq_1, fastq_2 ->
if (!fastq_2) return [ meta.id, meta + [ single_end:true ], [ fastq_1 ] ]
else { return [ meta.id, meta + [ single_end:false ], [ fastq_1, fastq_2 ] ]
}
.groupTuple()
.map{ samplesheet -> validateInputSamplesheet(samplesheet) }
.map{ meta, fastqs -> return [ meta, fastqs.flatten() ] }
else return [ meta.id, meta + [ single_end:false ], [ fastq_1, fastq_2 ] ]
}.groupTuple()

emit:
samplesheet = ch_samplesheet
Expand Down
16 changes: 13 additions & 3 deletions workflows/rnavar/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,18 @@ workflow RNAVAR {
ch_versions = Channel.empty()

// MODULE: Concatenate FastQ files from same sample if required
ch_fastq = ch_input.groupTuple().map{ samplesheet -> checkSamplesAfterGrouping(samplesheet) }
.branch{ meta, fastqs ->
single : fastqs.size() == 1
return [ meta, fastqs.flatten() ]
multiple: fastqs.size() > 1
return [ meta, fastqs.flatten() ]
}


CAT_FASTQ(ch_input.multiple)
CAT_FASTQ(ch_fastq.multiple)

ch_cat_fastq = CAT_FASTQ.out.reads.mix(ch_input.single)
ch_cat_fastq = CAT_FASTQ.out.reads.mix(ch_fastq.single)

ch_versions = ch_versions.mix(CAT_FASTQ.out.versions)

Expand Down Expand Up @@ -418,7 +426,9 @@ workflow RNAVAR {
ch_multiqc_files.collect(),
ch_multiqc_config.toList(),
ch_multiqc_custom_config.toList(),
ch_multiqc_logo.toList()
ch_multiqc_logo.toList(),
[],
[]
)
multiqc_report = MULTIQC.out.report.toList()
ch_versions = ch_versions.mix(MULTIQC.out.versions)
Expand Down