From fd9776e65f95ca644795876350513bf8ea001cc7 Mon Sep 17 00:00:00 2001 From: Thiseas Christos Lamnidis Date: Tue, 30 Jan 2024 15:38:47 +0100 Subject: [PATCH 01/14] Add library merge SWF --- conf/modules.config | 43 ++++++++++++++++++++++ subworkflows/local/merge_libraries.nf | 53 +++++++++++++++++++++++++++ workflows/eager.nf | 16 +++++++- 3 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 subworkflows/local/merge_libraries.nf diff --git a/conf/modules.config b/conf/modules.config index 45fdb19c8..008837472 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -883,4 +883,47 @@ process { enabled: true ] } + + // + // LIBRARY MERGE + // + + withName: SAMTOOLS_MERGE_LIBRARIES { + tag = { "${meta.reference}|${meta.sample_id}" } + ext.prefix = { "${meta.sample_id}_${meta.reference}_unsorted" } + publishDir = [ + enabled: false + ] + } + + withName: SAMTOOLS_SORT_MERGED_LIBRARIES { + tag = { "${meta.reference}|${meta.sample_id}" } + ext.prefix = { "${meta.sample_id}_${meta.reference}" } + publishDir = [ + path: { "${params.outdir}/library_merge/" }, + mode: params.publish_dir_mode, + pattern: '*.bam' + ] + } + + withName: SAMTOOLS_INDEX_MERGED_LIBRARIES { + tag = { "${meta.reference}|${meta.sample_id}" } + ext.args = { params.fasta_largeref ? "-c" : "" } + ext.prefix = { "${meta.sample_id}_${meta.reference}" } + publishDir = [ + path: { "${params.outdir}/library_merge/" }, + mode: params.publish_dir_mode, + pattern: '*.{bai,csi}' + ] + } + + withName: SAMTOOLS_FLAGSTAT_MERGED_LIBRARIES { + tag = { "${meta.reference}|${meta.sample_id}" } + ext.prefix = { "${meta.sample_id}_${meta.reference}" } + publishDir = [ + path: { "${params.outdir}/library_merge/" }, + mode: params.publish_dir_mode, + pattern: '*.flagstat' + ] + } } diff --git a/subworkflows/local/merge_libraries.nf b/subworkflows/local/merge_libraries.nf new file mode 100644 index 000000000..aca440d66 --- /dev/null +++ b/subworkflows/local/merge_libraries.nf @@ -0,0 +1,53 @@ +// +// Merge libraries of the same sample, then sort, index, and flagstat the merged bam +// + +include { SAMTOOLS_MERGE as SAMTOOLS_MERGE_LIBRARIES } from '../../modules/nf-core/samtools/merge/main' +include { SAMTOOLS_SORT as SAMTOOLS_SORT_MERGED_LIBRARIES } from '../../modules/nf-core/samtools/sort/main' +include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_MERGED_LIBRARIES } from '../../modules/nf-core/samtools/index/main' +include { SAMTOOLS_FLAGSTAT as SAMTOOLS_FLAGSTAT_MERGED_LIBRARIES } from '../../modules/nf-core/samtools/flagstat/main' + +workflow MERGE_LIBRARIES { + take: + ch_bam_bai // [ [ meta ], bam , bai ] + + main: + ch_versions = Channel.empty() + ch_multiqc_files = Channel.empty() + + ch_library_merge_input = ch_bam_bai + // TODO add 'id_index' to final meta? (once that also gets added to bam input). Maybe also keep SE/PE? (for now, we assume SE, see comment below) + .map { WorkflowEager.addNewMetaFromAttributes( it, ["id", "sample_id", "strandedness", "reference"], ["id", "sample_id", "strandedness", "reference"], false ) } + .groupTuple(by: 0) + // Discrad library-level metas, and bais. Add single_end: true to all metas (no SE/PE distinction at this point, right?) + .map { + meta, lib_metas, bam, bai -> + [ meta + [ 'single_end':true ], bam ] + } + + SAMTOOLS_MERGE_LIBRARIES ( ch_library_merge_input, [], [] ) + ch_versions = ch_versions.mix( SAMTOOLS_MERGE_LIBRARIES.out.versions.first() ) + + SAMTOOLS_SORT_MERGED_LIBRARIES ( SAMTOOLS_MERGE_LIBRARIES.out.bam ) + ch_versions = ch_versions.mix( SAMTOOLS_SORT_MERGED_LIBRARIES.out.versions.first() ) + + SAMTOOLS_INDEX_MERGED_LIBRARIES ( SAMTOOLS_SORT_MERGED_LIBRARIES.out.bam ) + ch_versions = ch_versions.mix( SAMTOOLS_INDEX_MERGED_LIBRARIES.out.versions.first() ) + + // Join merged sample-level bams and their bais for genotyping + ch_merged_bams = SAMTOOLS_SORT_MERGED_LIBRARIES.out.bam + .join( SAMTOOLS_INDEX_MERGED_LIBRARIES.out.bai ) + + // Not sure if FLAGSTAT is really needed, but added here for completeness + SAMTOOLS_FLAGSTAT_MERGED_LIBRARIES ( ch_merged_bams ) + ch_versions = ch_versions.mix( SAMTOOLS_FLAGSTAT_MERGED_LIBRARIES.out.versions.first() ) + + ch_merged_flagstat = SAMTOOLS_FLAGSTAT_MERGED_LIBRARIES.out.flagstat + ch_multiqc_files = ch_multiqc_files.mix( SAMTOOLS_FLAGSTAT_MERGED_LIBRARIES.out.flagstat ) + + emit: + bam_bai = ch_merged_bams // [ [ meta ], bam , bai ] + flagstat = ch_merged_flagstat // [ [ meta ], flagstat ] + versions = ch_versions + mqc = ch_multiqc_files // Same as flagstat +} diff --git a/workflows/eager.nf b/workflows/eager.nf index 89a39b252..f829f4089 100644 --- a/workflows/eager.nf +++ b/workflows/eager.nf @@ -71,6 +71,7 @@ include { MANIPULATE_DAMAGE } from '../subworkflows/local/manipulate include { METAGENOMICS_COMPLEXITYFILTER } from '../subworkflows/local/metagenomics_complexityfilter' include { ESTIMATE_CONTAMINATION } from '../subworkflows/local/estimate_contamination' include { CALCULATE_DAMAGE } from '../subworkflows/local/calculate_damage' +include { MERGE_LIBRARIES } from '../subworkflows/local/merge_libraries' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -530,11 +531,22 @@ workflow EAGER { MANIPULATE_DAMAGE( ch_dedupped_bams, ch_fasta_for_deduplication.fasta, REFERENCE_INDEXING.out.pmd_masking ) ch_multiqc_files = ch_multiqc_files.mix( MANIPULATE_DAMAGE.out.flagstat.collect{it[1]}.ifEmpty([]) ) ch_versions = ch_versions.mix( MANIPULATE_DAMAGE.out.versions ) - ch_bams_for_genotyping = params.genotyping_source == 'rescaled' ? MANIPULATE_DAMAGE.out.rescaled : params.genotyping_source == 'pmd' ? MANIPULATE_DAMAGE.out.filtered : params.genotyping_source == 'trimmed' ? MANIPULATE_DAMAGE.out.trimmed : ch_dedupped_bams + ch_bams_for_library_merge = params.genotyping_source == 'rescaled' ? MANIPULATE_DAMAGE.out.rescaled : params.genotyping_source == 'pmd' ? MANIPULATE_DAMAGE.out.filtered : params.genotyping_source == 'trimmed' ? MANIPULATE_DAMAGE.out.trimmed : ch_dedupped_bams } else { - ch_bams_for_genotyping = ch_dedupped_bams + ch_bams_for_library_merge = ch_dedupped_bams } + // + // SUBWORKFLOW: MERGE LIBRARIES + // + + // The bams being merged are always the ones specified by params.genotyping_source, + // unless the user skipped damage manipulation, in which case it is the DEDUPLICATION output. + MERGE_LIBRARIES ( ch_bams_for_library_merge ) + ch_versions = ch_versions.mix( MERGE_LIBRARIES.out.versions ) + ch_bams_for_genotyping = MERGE_LIBRARIES.out.bam_bai + ch_multiqc_files = ch_multiqc_files.mix( MERGE_LIBRARIES.out.mqc.collect{it[1]}.ifEmpty([]) ) // Not sure if this is needed, or if it needs to be moved to line 564? + // // MODULE: MultiQC // From 11c2c519ebf932f62d802f7b1bda16e9a1711670 Mon Sep 17 00:00:00 2001 From: Thiseas Christos Lamnidis Date: Tue, 30 Jan 2024 16:31:30 +0100 Subject: [PATCH 02/14] manual tests for library merge --- docs/development/manual_tests.md | 56 ++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/docs/development/manual_tests.md b/docs/development/manual_tests.md index 457172f3f..39300d266 100644 --- a/docs/development/manual_tests.md +++ b/docs/development/manual_tests.md @@ -102,6 +102,14 @@ Tool Specific combinations - All together + - Library merge + + - single reference: no damage manipulation ✅ + - single reference: with damage manipulation, on raw data ✅ + - single reference: with damage manipulation (trimming), on trimmed data ✅ + - single reference: with damage manipulation (pmd + trimming), on pmd filtered data ✅ + - multi reference: no damage manipulation ✅ + ### Multi-reference tests ```bash @@ -667,3 +675,51 @@ nextflow run . -profile test,docker \ --damage_manipulation_bamutils_trim_double_stranded_half_udg_left 1 \ --damage_manipulation_bamutils_trim_double_stranded_half_udg_right 2 ``` + +### LIBRARY_MERGE +```bash +## Library merge on single reference, no damage manipulation. +## EXPECT: 1 bam.bai/flagstat set per sample/reference combination. 6 files total. +## Check the headers of the bams to ensure that the correct number of bams are merged (1 for JK2802, 2 for JK2782). +## Also, check that the bams merged are the deduplication output. +## NOTE: JK2782 seems to have some PG tags repeated, as they apply to each input file separately. +nextflow run main.nf -profile test,docker --outdir ./results -w work/ -resume --genotyping_source 'raw' -ansi-log false -dump-channels +``` + +```bash +## Library merge on single reference, merge trimmed bams. +## EXPECT: 1 bam.bai/flagstat set per sample/reference combination. 6 files total. +## Check the headers of the bams to ensure that the correct number of bams are merged (1 for JK2802, 2 for JK2782). +## Also, check that the bams merged are trimmed. (JK2802 is full udg, but header confirms merged bam is "trimmed") +## NOTE: JK2782 seems to have some PG tags repeated, as they apply to each input file separately. +nextflow run main.nf -profile test,docker --outdir ./results -w work/ -resume --genotyping_source 'trimmed' -ansi-log false -dump-channels \ + --run_trim_bam \ + --damage_manipulation_bamutils_trim_double_stranded_none_udg_left 5 \ + --damage_manipulation_bamutils_trim_double_stranded_none_udg_right 7 \ + --damage_manipulation_bamutils_trim_double_stranded_half_udg_left 1 \ + --damage_manipulation_bamutils_trim_double_stranded_half_udg_right 2 +``` + +```bash +## Library merge on single reference, merge pmd bams. Trimming ran but not used downstream. +## EXPECT: 1 bam.bai/flagstat set per sample/reference combination. 6 files total. +## Check the headers of the bams to ensure that the correct number of bams are merged (1 for JK2802, 2 for JK2782). +## Also, check that the bams merged are the pmd ones. +## NOTE: JK2782 seems to have some PG tags repeated, as they apply to each input file separately. +nextflow run main.nf -profile test,docker --outdir ./results -w work/ -resume --genotyping_source 'pmd' -ansi-log false -dump-channels \ + --run_trim_bam \ + --run_pmd_filtering \ + --damage_manipulation_bamutils_trim_double_stranded_none_udg_left 5 \ + --damage_manipulation_bamutils_trim_double_stranded_none_udg_right 7 \ + --damage_manipulation_bamutils_trim_double_stranded_half_udg_left 1 \ + --damage_manipulation_bamutils_trim_double_stranded_half_udg_right 2 +``` + +```bash +## Library merge on multi reference. No damage manipulation. +## EXPECT: 1 bam.bai/flagstat set per sample/reference combination. 15 files total. (2 refs * 2 samples * 3 files) + BAM input only on one reference (+3) +## Check the headers of the bams to ensure that the correct number of bams are merged (1 for JK2802, 2 for JK2782). +## Also, check that the bams merged are the dedupped ones. +## NOTE: PG tags are repeated for each chromosome in the reference, times each library! Maybe there's some flag missing from samtools MERGE runs? +nextflow run main.nf -profile test_multiref,docker --outdir ./results -w work/ -resume --genotyping_source 'raw' -ansi-log false -dump-channels +``` From 0df09bfe76fa1d194fc8c72f8a8a23baa98ba2e1 Mon Sep 17 00:00:00 2001 From: Thiseas Christos Lamnidis Date: Tue, 30 Jan 2024 16:39:05 +0100 Subject: [PATCH 03/14] linting --- docs/development/manual_tests.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/development/manual_tests.md b/docs/development/manual_tests.md index 39300d266..78899fa80 100644 --- a/docs/development/manual_tests.md +++ b/docs/development/manual_tests.md @@ -677,6 +677,7 @@ nextflow run . -profile test,docker \ ``` ### LIBRARY_MERGE + ```bash ## Library merge on single reference, no damage manipulation. ## EXPECT: 1 bam.bai/flagstat set per sample/reference combination. 6 files total. From c01252174d71ab59ae589ca9d26240b7fbbb89bb Mon Sep 17 00:00:00 2001 From: Thiseas Christos Lamnidis Date: Fri, 2 Feb 2024 11:01:07 +0100 Subject: [PATCH 04/14] fix cardinality of samtools merge with module update --- subworkflows/local/merge_libraries.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/local/merge_libraries.nf b/subworkflows/local/merge_libraries.nf index aca440d66..0a8df57ce 100644 --- a/subworkflows/local/merge_libraries.nf +++ b/subworkflows/local/merge_libraries.nf @@ -25,7 +25,7 @@ workflow MERGE_LIBRARIES { [ meta + [ 'single_end':true ], bam ] } - SAMTOOLS_MERGE_LIBRARIES ( ch_library_merge_input, [], [] ) + SAMTOOLS_MERGE_LIBRARIES ( ch_library_merge_input, [[], []], [[], []] ) ch_versions = ch_versions.mix( SAMTOOLS_MERGE_LIBRARIES.out.versions.first() ) SAMTOOLS_SORT_MERGED_LIBRARIES ( SAMTOOLS_MERGE_LIBRARIES.out.bam ) From b1e7cfadaaf061bad1e4585e9215c48dece96189 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 2 Feb 2024 11:49:01 +0100 Subject: [PATCH 05/14] Fix prettier linting --- docs/development/dev_docs.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/development/dev_docs.md b/docs/development/dev_docs.md index 767fb35e6..31f2059f8 100644 --- a/docs/development/dev_docs.md +++ b/docs/development/dev_docs.md @@ -9,36 +9,36 @@ To add new input files or options to the reference sheet, you have to complete a 1. Add your new parameter to nextflow.config. 2. Add parameter description to schema (nf-core schema build). 3. Read in new parameter (params.) as input within the reference_indexing_single local subworkflow. - 1. Add new line to the large `.map{}` operation starting on [line 80(https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_single.nf#L80)] and add check if the file exists. + 1. Add new line to the large `.map{}` operation starting on [line 80(https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_single.nf#L80)] and add check if the file exists. `def = params. != null ? file(params., checkIfExists: true ) : ""` - 2. Add to the result of the map operation. Double-check the order! - 3. With the `ch_ref_index_single.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. + 2. Add to the result of the map operation. Double-check the order! + 3. With the `ch_ref_index_single.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` - 4. Add your ch_ref_index_single. to the final emit. + 4. Add your ch_ref_index_single. to the final emit. ` = ch_ref_index_single.` ### Multi-reference input workflow 1. Add new column named and test data to the test reference sheet (https://github.com/nf-core/test-datasets/blob/eager/reference/reference_sheet_multiref.csv). 2. Read in new input within the reference_indexing_multi local subworkflow. - 1. Add new line to the large `.map{}` operation starting on [line 30](https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_multi.nf#L30). Add check if the file exists if appropriate. + 1. Add new line to the large `.map{}` operation starting on [line 30](https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_multi.nf#L30). Add check if the file exists if appropriate. `def = row[""] != "" ? file(row[""], checkIfExists: true) : ""` - 2. Add to the result of the `.map{}` operation. Double-check the order! - 3. With the `ch_input_from_referencesheet.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. + 2. Add to the result of the `.map{}` operation. Double-check the order! + 3. With the `ch_input_from_referencesheet.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` - 4. Add ch_input_from_referencesheet. to the final emit. + 4. Add ch_input_from_referencesheet. to the final emit. ` = ch_input_from_referencesheet.` ### Combining in the Reference Indexing workflow 1. Add you new parameter channel to the `if` condition selecting between the direct parameter input or the reference sheet input. - 1. below "REFERENCE_INDEXING_MULTI" for reference sheet input + 1. below "REFERENCE_INDEXING_MULTI" for reference sheet input ` = REFERENCE_INDEXING_MULTI.out.` - 2. below "REFERENCE_INDEXING_SINGLE" + 2. below "REFERENCE_INDEXING_SINGLE" ` = REFERENCE_INDEXING_SINGLE.out.` - 3. Filter out options that have not been provided. + 3. Filter out options that have not been provided. ` = .filter{ it[1] != "" }` - 4. Add unzipping of zipped input files with GUNZIP. - 5. Add to the final emit. + 4. Add unzipping of zipped input files with GUNZIP. + 5. Add to the final emit. ` = ` - 6. Call new inputs within the main eager.nf with `REFERENCE_INDEXING.out.`. + 6. Call new inputs within the main eager.nf with `REFERENCE_INDEXING.out.`. From c7de0bc805860fee669144d9137b885e1b223c3b Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 2 Feb 2024 11:51:57 +0100 Subject: [PATCH 06/14] And the other lines --- docs/development/dev_docs.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/development/dev_docs.md b/docs/development/dev_docs.md index 31f2059f8..6d5ab37e7 100644 --- a/docs/development/dev_docs.md +++ b/docs/development/dev_docs.md @@ -10,35 +10,35 @@ To add new input files or options to the reference sheet, you have to complete a 2. Add parameter description to schema (nf-core schema build). 3. Read in new parameter (params.) as input within the reference_indexing_single local subworkflow. 1. Add new line to the large `.map{}` operation starting on [line 80(https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_single.nf#L80)] and add check if the file exists. - `def = params. != null ? file(params., checkIfExists: true ) : ""` + `def = params. != null ? file(params., checkIfExists: true ) : ""` 2. Add to the result of the map operation. Double-check the order! 3. With the `ch_ref_index_single.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. - `: [ meta, ]` + `: [ meta, ]` 4. Add your ch_ref_index_single. to the final emit. - ` = ch_ref_index_single.` + ` = ch_ref_index_single.` ### Multi-reference input workflow 1. Add new column named and test data to the test reference sheet (https://github.com/nf-core/test-datasets/blob/eager/reference/reference_sheet_multiref.csv). 2. Read in new input within the reference_indexing_multi local subworkflow. 1. Add new line to the large `.map{}` operation starting on [line 30](https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_multi.nf#L30). Add check if the file exists if appropriate. - `def = row[""] != "" ? file(row[""], checkIfExists: true) : ""` + `def = row[""] != "" ? file(row[""], checkIfExists: true) : ""` 2. Add to the result of the `.map{}` operation. Double-check the order! 3. With the `ch_input_from_referencesheet.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. - `: [ meta, ]` + `: [ meta, ]` 4. Add ch_input_from_referencesheet. to the final emit. - ` = ch_input_from_referencesheet.` + ` = ch_input_from_referencesheet.` ### Combining in the Reference Indexing workflow 1. Add you new parameter channel to the `if` condition selecting between the direct parameter input or the reference sheet input. 1. below "REFERENCE_INDEXING_MULTI" for reference sheet input - ` = REFERENCE_INDEXING_MULTI.out.` + ` = REFERENCE_INDEXING_MULTI.out.` 2. below "REFERENCE_INDEXING_SINGLE" - ` = REFERENCE_INDEXING_SINGLE.out.` + ` = REFERENCE_INDEXING_SINGLE.out.` 3. Filter out options that have not been provided. - ` = .filter{ it[1] != "" }` + ` = .filter{ it[1] != "" }` 4. Add unzipping of zipped input files with GUNZIP. 5. Add to the final emit. - ` = ` + ` = ` 6. Call new inputs within the main eager.nf with `REFERENCE_INDEXING.out.`. From 13400200f137b279643493669aadae9cacdc17ac Mon Sep 17 00:00:00 2001 From: Thiseas Christos Lamnidis Date: Fri, 2 Feb 2024 11:55:02 +0100 Subject: [PATCH 07/14] rename publish dir for library merge --- conf/modules.config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 008837472..ea1d8d927 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -900,7 +900,7 @@ process { tag = { "${meta.reference}|${meta.sample_id}" } ext.prefix = { "${meta.sample_id}_${meta.reference}" } publishDir = [ - path: { "${params.outdir}/library_merge/" }, + path: { "${params.outdir}/final_bams/" }, mode: params.publish_dir_mode, pattern: '*.bam' ] @@ -911,7 +911,7 @@ process { ext.args = { params.fasta_largeref ? "-c" : "" } ext.prefix = { "${meta.sample_id}_${meta.reference}" } publishDir = [ - path: { "${params.outdir}/library_merge/" }, + path: { "${params.outdir}/final_bams/" }, mode: params.publish_dir_mode, pattern: '*.{bai,csi}' ] @@ -921,7 +921,7 @@ process { tag = { "${meta.reference}|${meta.sample_id}" } ext.prefix = { "${meta.sample_id}_${meta.reference}" } publishDir = [ - path: { "${params.outdir}/library_merge/" }, + path: { "${params.outdir}/final_bams/" }, mode: params.publish_dir_mode, pattern: '*.flagstat' ] From 74a79e94ad3cadcd81489e6f298ad7576ad9daa7 Mon Sep 17 00:00:00 2001 From: "Thiseas C. Lamnidis" Date: Fri, 2 Feb 2024 11:58:03 +0100 Subject: [PATCH 08/14] Update subworkflows/local/merge_libraries.nf Co-authored-by: James A. Fellows Yates --- subworkflows/local/merge_libraries.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/local/merge_libraries.nf b/subworkflows/local/merge_libraries.nf index 0a8df57ce..68d806abe 100644 --- a/subworkflows/local/merge_libraries.nf +++ b/subworkflows/local/merge_libraries.nf @@ -22,7 +22,7 @@ workflow MERGE_LIBRARIES { // Discrad library-level metas, and bais. Add single_end: true to all metas (no SE/PE distinction at this point, right?) .map { meta, lib_metas, bam, bai -> - [ meta + [ 'single_end':true ], bam ] + [ meta + [ 'single_end': true ], bam ] } SAMTOOLS_MERGE_LIBRARIES ( ch_library_merge_input, [[], []], [[], []] ) From f015771b2cfdb7e6c71f82c7b27f3c4d54cfca8a Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 2 Feb 2024 12:00:19 +0100 Subject: [PATCH 09/14] remove newlines --- docs/development/dev_docs.md | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/docs/development/dev_docs.md b/docs/development/dev_docs.md index 6d5ab37e7..13b1b9d72 100644 --- a/docs/development/dev_docs.md +++ b/docs/development/dev_docs.md @@ -9,36 +9,26 @@ To add new input files or options to the reference sheet, you have to complete a 1. Add your new parameter to nextflow.config. 2. Add parameter description to schema (nf-core schema build). 3. Read in new parameter (params.) as input within the reference_indexing_single local subworkflow. - 1. Add new line to the large `.map{}` operation starting on [line 80(https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_single.nf#L80)] and add check if the file exists. - `def = params. != null ? file(params., checkIfExists: true ) : ""` + 1. Add new line to the large `.map{}` operation starting on [line 80(https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_single.nf#L80)] and add check if the file exists. `def = params. != null ? file(params., checkIfExists: true ) : ""` 2. Add to the result of the map operation. Double-check the order! - 3. With the `ch_ref_index_single.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. - `: [ meta, ]` - 4. Add your ch_ref_index_single. to the final emit. - ` = ch_ref_index_single.` + 3. With the `ch_ref_index_single.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` + 4. Add your ch_ref_index_single. to the final emit. ` = ch_ref_index_single.` ### Multi-reference input workflow 1. Add new column named and test data to the test reference sheet (https://github.com/nf-core/test-datasets/blob/eager/reference/reference_sheet_multiref.csv). 2. Read in new input within the reference_indexing_multi local subworkflow. - 1. Add new line to the large `.map{}` operation starting on [line 30](https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_multi.nf#L30). Add check if the file exists if appropriate. - `def = row[""] != "" ? file(row[""], checkIfExists: true) : ""` + 1. Add new line to the large `.map{}` operation starting on [line 30](https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_multi.nf#L30). Add check if the file exists if appropriate. `def = row[""] != "" ? file(row[""], checkIfExists: true) : ""` 2. Add to the result of the `.map{}` operation. Double-check the order! - 3. With the `ch_input_from_referencesheet.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. - `: [ meta, ]` - 4. Add ch_input_from_referencesheet. to the final emit. - ` = ch_input_from_referencesheet.` + 3. With the `ch_input_from_referencesheet.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` + 4. Add ch_input_from_referencesheet. to the final emit. ` = ch_input_from_referencesheet.` ### Combining in the Reference Indexing workflow 1. Add you new parameter channel to the `if` condition selecting between the direct parameter input or the reference sheet input. - 1. below "REFERENCE_INDEXING_MULTI" for reference sheet input - ` = REFERENCE_INDEXING_MULTI.out.` - 2. below "REFERENCE_INDEXING_SINGLE" - ` = REFERENCE_INDEXING_SINGLE.out.` - 3. Filter out options that have not been provided. - ` = .filter{ it[1] != "" }` + 1. below "REFERENCE_INDEXING_MULTI" for reference sheet input ` = REFERENCE_INDEXING_MULTI.out.` + 2. below "REFERENCE_INDEXING_SINGLE" ` = REFERENCE_INDEXING_SINGLE.out.` + 3. Filter out options that have not been provided. ` = .filter{ it[1] != "" }` 4. Add unzipping of zipped input files with GUNZIP. - 5. Add to the final emit. - ` = ` + 5. Add to the final emit. ` = ` 6. Call new inputs within the main eager.nf with `REFERENCE_INDEXING.out.`. From 461db3c4d9480e8162eddc7d50878edf9fe6ceeb Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 2 Feb 2024 11:48:07 +0000 Subject: [PATCH 10/14] Linting --- .devcontainer/devcontainer.json | 8 +++---- .github/workflows/download_pipeline.yml | 2 +- docs/development/dev_docs.md | 28 ++++++++++++------------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4a9bc5c79..4ecfbfe33 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,11 +18,11 @@ "python.linting.flake8Path": "/opt/conda/bin/flake8", "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", - "python.linting.pylintPath": "/opt/conda/bin/pylint", + "python.linting.pylintPath": "/opt/conda/bin/pylint" }, // Add the IDs of extensions you want installed when the container is created. - "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"], - }, - }, + "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] + } + } } diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml index 8611458a7..8a3300450 100644 --- a/.github/workflows/download_pipeline.yml +++ b/.github/workflows/download_pipeline.yml @@ -64,4 +64,4 @@ jobs: env: NXF_SINGULARITY_CACHEDIR: ./ NXF_SINGULARITY_HOME_MOUNT: true - run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results + run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results diff --git a/docs/development/dev_docs.md b/docs/development/dev_docs.md index 13b1b9d72..56532b2fd 100644 --- a/docs/development/dev_docs.md +++ b/docs/development/dev_docs.md @@ -9,26 +9,26 @@ To add new input files or options to the reference sheet, you have to complete a 1. Add your new parameter to nextflow.config. 2. Add parameter description to schema (nf-core schema build). 3. Read in new parameter (params.) as input within the reference_indexing_single local subworkflow. - 1. Add new line to the large `.map{}` operation starting on [line 80(https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_single.nf#L80)] and add check if the file exists. `def = params. != null ? file(params., checkIfExists: true ) : ""` - 2. Add to the result of the map operation. Double-check the order! - 3. With the `ch_ref_index_single.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` - 4. Add your ch_ref_index_single. to the final emit. ` = ch_ref_index_single.` +4. Add new line to the large `.map{}` operation starting on [line 80(https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_single.nf#L80)] and add check if the file exists. `def = params. != null ? file(params., checkIfExists: true ) : ""` +5. Add to the result of the map operation. Double-check the order! +6. With the `ch_ref_index_single.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` +7. Add your ch_ref_index_single. to the final emit. ` = ch_ref_index_single.` ### Multi-reference input workflow 1. Add new column named and test data to the test reference sheet (https://github.com/nf-core/test-datasets/blob/eager/reference/reference_sheet_multiref.csv). 2. Read in new input within the reference_indexing_multi local subworkflow. - 1. Add new line to the large `.map{}` operation starting on [line 30](https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_multi.nf#L30). Add check if the file exists if appropriate. `def = row[""] != "" ? file(row[""], checkIfExists: true) : ""` - 2. Add to the result of the `.map{}` operation. Double-check the order! - 3. With the `ch_input_from_referencesheet.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` - 4. Add ch_input_from_referencesheet. to the final emit. ` = ch_input_from_referencesheet.` +3. Add new line to the large `.map{}` operation starting on [line 30](https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_multi.nf#L30). Add check if the file exists if appropriate. `def = row[""] != "" ? file(row[""], checkIfExists: true) : ""` +4. Add to the result of the `.map{}` operation. Double-check the order! +5. With the `ch_input_from_referencesheet.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` +6. Add ch_input_from_referencesheet. to the final emit. ` = ch_input_from_referencesheet.` ### Combining in the Reference Indexing workflow 1. Add you new parameter channel to the `if` condition selecting between the direct parameter input or the reference sheet input. - 1. below "REFERENCE_INDEXING_MULTI" for reference sheet input ` = REFERENCE_INDEXING_MULTI.out.` - 2. below "REFERENCE_INDEXING_SINGLE" ` = REFERENCE_INDEXING_SINGLE.out.` - 3. Filter out options that have not been provided. ` = .filter{ it[1] != "" }` - 4. Add unzipping of zipped input files with GUNZIP. - 5. Add to the final emit. ` = ` - 6. Call new inputs within the main eager.nf with `REFERENCE_INDEXING.out.`. +1. below "REFERENCE_INDEXING_MULTI" for reference sheet input ` = REFERENCE_INDEXING_MULTI.out.` +1. below "REFERENCE_INDEXING_SINGLE" ` = REFERENCE_INDEXING_SINGLE.out.` +1. Filter out options that have not been provided. ` = .filter{ it[1] != "" }` +1. Add unzipping of zipped input files with GUNZIP. +1. Add to the final emit. ` = ` +1. Call new inputs within the main eager.nf with `REFERENCE_INDEXING.out.`. From f09a1c62580d36bd7d8181817ba421039972b4d7 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Fri, 2 Feb 2024 11:52:50 +0000 Subject: [PATCH 11/14] Revert "Linting" This reverts commit 461db3c4d9480e8162eddc7d50878edf9fe6ceeb. --- .devcontainer/devcontainer.json | 8 +++---- .github/workflows/download_pipeline.yml | 2 +- docs/development/dev_docs.md | 28 ++++++++++++------------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4ecfbfe33..4a9bc5c79 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,11 +18,11 @@ "python.linting.flake8Path": "/opt/conda/bin/flake8", "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", - "python.linting.pylintPath": "/opt/conda/bin/pylint" + "python.linting.pylintPath": "/opt/conda/bin/pylint", }, // Add the IDs of extensions you want installed when the container is created. - "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] - } - } + "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"], + }, + }, } diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml index 8a3300450..8611458a7 100644 --- a/.github/workflows/download_pipeline.yml +++ b/.github/workflows/download_pipeline.yml @@ -64,4 +64,4 @@ jobs: env: NXF_SINGULARITY_CACHEDIR: ./ NXF_SINGULARITY_HOME_MOUNT: true - run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results + run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results diff --git a/docs/development/dev_docs.md b/docs/development/dev_docs.md index 56532b2fd..13b1b9d72 100644 --- a/docs/development/dev_docs.md +++ b/docs/development/dev_docs.md @@ -9,26 +9,26 @@ To add new input files or options to the reference sheet, you have to complete a 1. Add your new parameter to nextflow.config. 2. Add parameter description to schema (nf-core schema build). 3. Read in new parameter (params.) as input within the reference_indexing_single local subworkflow. -4. Add new line to the large `.map{}` operation starting on [line 80(https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_single.nf#L80)] and add check if the file exists. `def = params. != null ? file(params., checkIfExists: true ) : ""` -5. Add to the result of the map operation. Double-check the order! -6. With the `ch_ref_index_single.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` -7. Add your ch_ref_index_single. to the final emit. ` = ch_ref_index_single.` + 1. Add new line to the large `.map{}` operation starting on [line 80(https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_single.nf#L80)] and add check if the file exists. `def = params. != null ? file(params., checkIfExists: true ) : ""` + 2. Add to the result of the map operation. Double-check the order! + 3. With the `ch_ref_index_single.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` + 4. Add your ch_ref_index_single. to the final emit. ` = ch_ref_index_single.` ### Multi-reference input workflow 1. Add new column named and test data to the test reference sheet (https://github.com/nf-core/test-datasets/blob/eager/reference/reference_sheet_multiref.csv). 2. Read in new input within the reference_indexing_multi local subworkflow. -3. Add new line to the large `.map{}` operation starting on [line 30](https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_multi.nf#L30). Add check if the file exists if appropriate. `def = row[""] != "" ? file(row[""], checkIfExists: true) : ""` -4. Add to the result of the `.map{}` operation. Double-check the order! -5. With the `ch_input_from_referencesheet.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` -6. Add ch_input_from_referencesheet. to the final emit. ` = ch_input_from_referencesheet.` + 1. Add new line to the large `.map{}` operation starting on [line 30](https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_multi.nf#L30). Add check if the file exists if appropriate. `def = row[""] != "" ? file(row[""], checkIfExists: true) : ""` + 2. Add to the result of the `.map{}` operation. Double-check the order! + 3. With the `ch_input_from_referencesheet.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` + 4. Add ch_input_from_referencesheet. to the final emit. ` = ch_input_from_referencesheet.` ### Combining in the Reference Indexing workflow 1. Add you new parameter channel to the `if` condition selecting between the direct parameter input or the reference sheet input. -1. below "REFERENCE_INDEXING_MULTI" for reference sheet input ` = REFERENCE_INDEXING_MULTI.out.` -1. below "REFERENCE_INDEXING_SINGLE" ` = REFERENCE_INDEXING_SINGLE.out.` -1. Filter out options that have not been provided. ` = .filter{ it[1] != "" }` -1. Add unzipping of zipped input files with GUNZIP. -1. Add to the final emit. ` = ` -1. Call new inputs within the main eager.nf with `REFERENCE_INDEXING.out.`. + 1. below "REFERENCE_INDEXING_MULTI" for reference sheet input ` = REFERENCE_INDEXING_MULTI.out.` + 2. below "REFERENCE_INDEXING_SINGLE" ` = REFERENCE_INDEXING_SINGLE.out.` + 3. Filter out options that have not been provided. ` = .filter{ it[1] != "" }` + 4. Add unzipping of zipped input files with GUNZIP. + 5. Add to the final emit. ` = ` + 6. Call new inputs within the main eager.nf with `REFERENCE_INDEXING.out.`. From fda38c699ae4358c7237b31748fba9f8e2877ad6 Mon Sep 17 00:00:00 2001 From: Thiseas Christos Lamnidis Date: Fri, 2 Feb 2024 13:10:45 +0100 Subject: [PATCH 12/14] remove unnecessary comment --- subworkflows/local/merge_libraries.nf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/subworkflows/local/merge_libraries.nf b/subworkflows/local/merge_libraries.nf index 68d806abe..b4b0e473a 100644 --- a/subworkflows/local/merge_libraries.nf +++ b/subworkflows/local/merge_libraries.nf @@ -16,10 +16,9 @@ workflow MERGE_LIBRARIES { ch_multiqc_files = Channel.empty() ch_library_merge_input = ch_bam_bai - // TODO add 'id_index' to final meta? (once that also gets added to bam input). Maybe also keep SE/PE? (for now, we assume SE, see comment below) .map { WorkflowEager.addNewMetaFromAttributes( it, ["id", "sample_id", "strandedness", "reference"], ["id", "sample_id", "strandedness", "reference"], false ) } .groupTuple(by: 0) - // Discrad library-level metas, and bais. Add single_end: true to all metas (no SE/PE distinction at this point, right?) + // Discrad library-level metas, and bais. Add single_end: true to all metas (no SE/PE distinction from here on) .map { meta, lib_metas, bam, bai -> [ meta + [ 'single_end': true ], bam ] From a7e5b632c73e5d321a3a46fc6d10251c5b6aee94 Mon Sep 17 00:00:00 2001 From: Thiseas Lamnidis Date: Fri, 2 Feb 2024 12:23:14 +0000 Subject: [PATCH 13/14] ignore dev_docs.md when linting. fix indent --- .prettierignore | 1 + docs/development/dev_docs.md | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.prettierignore b/.prettierignore index 6f762db0b..30f2a16d8 100644 --- a/.prettierignore +++ b/.prettierignore @@ -12,3 +12,4 @@ testing* bin/ *.cff test/ +dev_docs.md diff --git a/docs/development/dev_docs.md b/docs/development/dev_docs.md index 13b1b9d72..e7c0a0f57 100644 --- a/docs/development/dev_docs.md +++ b/docs/development/dev_docs.md @@ -9,26 +9,26 @@ To add new input files or options to the reference sheet, you have to complete a 1. Add your new parameter to nextflow.config. 2. Add parameter description to schema (nf-core schema build). 3. Read in new parameter (params.) as input within the reference_indexing_single local subworkflow. - 1. Add new line to the large `.map{}` operation starting on [line 80(https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_single.nf#L80)] and add check if the file exists. `def = params. != null ? file(params., checkIfExists: true ) : ""` - 2. Add to the result of the map operation. Double-check the order! - 3. With the `ch_ref_index_single.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` - 4. Add your ch_ref_index_single. to the final emit. ` = ch_ref_index_single.` + 1. Add new line to the large `.map{}` operation starting on [line 80](https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_single.nf#L80) and add check if the file exists. `def = params. != null ? file(params., checkIfExists: true ) : ""` + 2. Add to the result of the map operation. Double-check the order! + 3. With the `ch_ref_index_single.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` + 4. Add your ch_ref_index_single. to the final emit. ` = ch_ref_index_single.` ### Multi-reference input workflow 1. Add new column named and test data to the test reference sheet (https://github.com/nf-core/test-datasets/blob/eager/reference/reference_sheet_multiref.csv). 2. Read in new input within the reference_indexing_multi local subworkflow. - 1. Add new line to the large `.map{}` operation starting on [line 30](https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_multi.nf#L30). Add check if the file exists if appropriate. `def = row[""] != "" ? file(row[""], checkIfExists: true) : ""` - 2. Add to the result of the `.map{}` operation. Double-check the order! - 3. With the `ch_input_from_referencesheet.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` - 4. Add ch_input_from_referencesheet. to the final emit. ` = ch_input_from_referencesheet.` + 1. Add new line to the large `.map{}` operation starting on [line 30](https://github.com/nf-core/eager/blob/d4211582f349cc30c88202c12942218f99006041/subworkflows/local/reference_indexing_multi.nf#L30). Add check if the file exists if appropriate. `def = row[""] != "" ? file(row[""], checkIfExists: true) : ""` + 2. Add to the result of the `.map{}` operation. Double-check the order! + 3. With the `ch_input_from_referencesheet.multiMap{}` below you add the reference name as a meta. You can also combine your new parameter with others if useful for the workflow step. `: [ meta, ]` + 4. Add ch_input_from_referencesheet. to the final emit. ` = ch_input_from_referencesheet.` ### Combining in the Reference Indexing workflow 1. Add you new parameter channel to the `if` condition selecting between the direct parameter input or the reference sheet input. - 1. below "REFERENCE_INDEXING_MULTI" for reference sheet input ` = REFERENCE_INDEXING_MULTI.out.` - 2. below "REFERENCE_INDEXING_SINGLE" ` = REFERENCE_INDEXING_SINGLE.out.` - 3. Filter out options that have not been provided. ` = .filter{ it[1] != "" }` - 4. Add unzipping of zipped input files with GUNZIP. - 5. Add to the final emit. ` = ` - 6. Call new inputs within the main eager.nf with `REFERENCE_INDEXING.out.`. + 1. below "REFERENCE_INDEXING_MULTI" for reference sheet input ` = REFERENCE_INDEXING_MULTI.out.` + 2. below "REFERENCE_INDEXING_SINGLE" ` = REFERENCE_INDEXING_SINGLE.out.` + 3. Filter out options that have not been provided. ` = .filter{ it[1] != "" }` + 4. Add unzipping of zipped input files with GUNZIP. + 5. Add to the final emit. ` = ` + 6. Call new inputs within the main eager.nf with `REFERENCE_INDEXING.out.`. From eaca1d54fdf9d44df74e3ed80645403ac479254a Mon Sep 17 00:00:00 2001 From: Thiseas Christos Lamnidis Date: Fri, 2 Feb 2024 13:25:38 +0100 Subject: [PATCH 14/14] fix template linting --- .devcontainer/devcontainer.json | 8 ++++---- .github/workflows/download_pipeline.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4a9bc5c79..4ecfbfe33 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,11 +18,11 @@ "python.linting.flake8Path": "/opt/conda/bin/flake8", "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", - "python.linting.pylintPath": "/opt/conda/bin/pylint", + "python.linting.pylintPath": "/opt/conda/bin/pylint" }, // Add the IDs of extensions you want installed when the container is created. - "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"], - }, - }, + "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] + } + } } diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml index 8611458a7..8a3300450 100644 --- a/.github/workflows/download_pipeline.yml +++ b/.github/workflows/download_pipeline.yml @@ -64,4 +64,4 @@ jobs: env: NXF_SINGULARITY_CACHEDIR: ./ NXF_SINGULARITY_HOME_MOUNT: true - run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results + run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results