diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 8b0f88c3..30e66026 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -11,12 +11,12 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - - name: Set up Python 3.13 - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + - name: Set up Python 3.14 + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 with: - python-version: "3.13" + python-version: "3.14" - name: Install pre-commit run: pip install pre-commit @@ -28,14 +28,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out pipeline code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - name: Install Nextflow uses: nf-core/setup-nextflow@v2 - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 with: - python-version: "3.13" + python-version: "3.14" architecture: "x64" - name: read .nf-core.yml diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml index d43797d9..e6e9bc26 100644 --- a/.github/workflows/linting_comment.yml +++ b/.github/workflows/linting_comment.yml @@ -21,7 +21,7 @@ jobs: run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT - name: Post PR comment - uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2 + uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} number: ${{ steps.pr_number.outputs.pr_number }} diff --git a/.prettierignore b/.prettierignore index edd29f01..2255e3e3 100644 --- a/.prettierignore +++ b/.prettierignore @@ -10,4 +10,5 @@ testing/ testing* *.pyc bin/ +.nf-test/ ro-crate-metadata.json diff --git a/modules/local/aspera_cli/environment.yml b/modules/local/aspera_cli/environment.yml new file mode 100644 index 00000000..9fbc162f --- /dev/null +++ b/modules/local/aspera_cli/environment.yml @@ -0,0 +1,7 @@ +name: aspera_cli +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::aspera-cli=4.14.0 diff --git a/modules/local/sra_to_samplesheet/main.nf b/modules/local/sra_to_samplesheet/main.nf index 92edf5df..b663692b 100644 --- a/modules/local/sra_to_samplesheet/main.nf +++ b/modules/local/sra_to_samplesheet/main.nf @@ -44,6 +44,8 @@ process SRA_TO_SAMPLESHEET { pipeline_map << [ replicate: 1 ] } else if (pipeline == 'taxprofiler') { pipeline_map << [ fasta: '' ] + } else if (pipeline == 'ampliseq'){ + pipeline_map << [ run: ''] } } pipeline_map << meta_clone diff --git a/modules/nf-core/custom/sratoolsncbisettings/environment.yml b/modules/nf-core/custom/sratoolsncbisettings/environment.yml new file mode 100644 index 00000000..44a1b008 --- /dev/null +++ b/modules/nf-core/custom/sratoolsncbisettings/environment.yml @@ -0,0 +1,7 @@ +name: custom_sratoolsncbisettings +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::sra-tools=3.0.8 diff --git a/nextflow_schema.json b/nextflow_schema.json index 2401b6aa..a693e331 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -38,7 +38,7 @@ "type": "string", "fa_icon": "fab fa-apple", "description": "Name of supported nf-core pipeline e.g. 'rnaseq'. A samplesheet for direct use with the pipeline will be created with the appropriate columns.", - "enum": ["rnaseq", "atacseq", "viralrecon", "taxprofiler"] + "enum": ["rnaseq", "atacseq", "viralrecon", "taxprofiler", "ampliseq"] }, "nf_core_rnaseq_strandedness": { "type": "string", diff --git a/workflows/sra/tests/main.nf.test b/workflows/sra/tests/main.nf.test index b0c19a25..1e2856c1 100644 --- a/workflows/sra/tests/main.nf.test +++ b/workflows/sra/tests/main.nf.test @@ -15,9 +15,6 @@ nextflow_workflow { test("Parameters: default") { when { - params { - outdir = "$outputDir" - } workflow { """ input[0] = Channel.from("DRX026011", "ERX1234253", "SRX6725035") @@ -26,15 +23,29 @@ nextflow_workflow { } then { + assert workflow.success + assertAll( - { assert workflow.success}, - { assert snapshot( - file(workflow.out.samplesheet[0]).name, - workflow.out.mappings, - workflow.out.sample_mappings, - workflow.out.sra_metadata, - workflow.out.versions - ).match() } + { + with(workflow.out.samplesheet) { + assert path(get(0)).readLines().size() == 4 + assert path(get(0)).readLines()*.split(',')[0].take(4) == ['"sample"', '"fastq_1"', '"fastq_2"', '"run_accession"'] + assert path(get(0)).readLines()*.split(',').collect { it[0] } == ['"sample"', '"DRX026011"', '"ERX1234253"', '"SRX6725035"'] + assert path(get(0)).text.contains('Illumina HiSeq 2500') + } + }, + { + with(workflow.out.mappings) { + assert path(get(0)).readLines().size() == 4 + assert path(get(0)).readLines()*.split(',').collect { it[0] } == ['"sample"', '"DRX026011"', '"ERX1234253"', '"SRX6725035"'] + assert path(get(0)).text.contains('Illumina HiSeq 2500') + } + }, + { + with(workflow.out.sample_mappings) { + assert path(get(0)[0]).md5 == "1ac06bb95b503703430e74660bbdd768" + } + } ) } } diff --git a/workflows/sra/tests/sra_nf_core_pipeline_ampliseq.nf.test b/workflows/sra/tests/sra_nf_core_pipeline_ampliseq.nf.test new file mode 100644 index 00000000..cd0a0908 --- /dev/null +++ b/workflows/sra/tests/sra_nf_core_pipeline_ampliseq.nf.test @@ -0,0 +1,42 @@ +nextflow_workflow { + + name "Test workflow: sra/main.nf" + script "../main.nf" + workflow "SRA" + tag "SRA_NF_CORE_PIPELINE_AMPLISEQ" + + // Dependencies + tag "SRA_IDS_TO_RUNINFO" + tag "SRA_RUNINFO_TO_FTP" + tag "SRA_FASTQ_FTP" + tag "SRA_TO_SAMPLESHEET" + tag "MULTIQC_MAPPINGS_CONFIG" + + test("Parameters: --nf_core_pipeline ampliseq") { + + when { + params { + outdir = "$outputDir" + nf_core_pipeline = "ampliseq" + } + workflow { + """ + input[0] = Channel.from("DRX026011", "ERX1234253", "SRX6725035") + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot( + file(workflow.out.samplesheet[0]).name, + workflow.out.mappings, + workflow.out.sample_mappings, + workflow.out.sra_metadata, + workflow.out.versions + ).match() } + ) + } + } +} diff --git a/workflows/sra/tests/sra_nf_core_pipeline_ampliseq.nf.test.snap b/workflows/sra/tests/sra_nf_core_pipeline_ampliseq.nf.test.snap new file mode 100644 index 00000000..f84dcfc5 --- /dev/null +++ b/workflows/sra/tests/sra_nf_core_pipeline_ampliseq.nf.test.snap @@ -0,0 +1,143 @@ +{ + "Parameters: --nf_core_pipeline ampliseq": { + "content": [ + "samplesheet.csv", + [ + "id_mappings.csv:md5,3e41ce6ab19feb76f2b20fa77a910ad3" + ], + [ + "multiqc_config.yml:md5,1ac06bb95b503703430e74660bbdd768" + ], + [ + { + "base_count": "194930", + "experiment_accession": "DRX026011", + "experiment_alias": "DRX026011", + "experiment_title": "Illumina HiSeq 2500 paired end sequencing: Illumina HiSeq 2500 paired end sequencing of SAMD00024405", + "fastq_1": "DRX026011_DRR028935_1.fastq.gz:md5,f9b4a5d25aa7d6ab4050dbe0764eb04d", + "fastq_2": "DRX026011_DRR028935_2.fastq.gz:md5,dc0d2e1fc46f4d4581a477f87ec3ff15", + "fastq_aspera": "fasp.sra.ebi.ac.uk:/vol1/fastq/DRR028/DRR028935/DRR028935_1.fastq.gz;fasp.sra.ebi.ac.uk:/vol1/fastq/DRR028/DRR028935/DRR028935_2.fastq.gz", + "fastq_bytes": "60275;61610", + "fastq_ftp": "ftp.sra.ebi.ac.uk/vol1/fastq/DRR028/DRR028935/DRR028935_1.fastq.gz;ftp.sra.ebi.ac.uk/vol1/fastq/DRR028/DRR028935/DRR028935_2.fastq.gz", + "fastq_galaxy": "ftp.sra.ebi.ac.uk/vol1/fastq/DRR028/DRR028935/DRR028935_1.fastq.gz;ftp.sra.ebi.ac.uk/vol1/fastq/DRR028/DRR028935/DRR028935_2.fastq.gz", + "fastq_md5": "cc01df82a9354bb6b3be93483b20c35a;941c9998d746416dad53c94c480ddf30", + "id": "DRX026011_DRR028935", + "instrument_model": "Illumina HiSeq 2500", + "instrument_platform": "ILLUMINA", + "library_layout": "PAIRED", + "library_name": "day0_BbSQE-I", + "library_selection": "cDNA", + "library_source": "TRANSCRIPTOMIC", + "library_strategy": "RNA-Seq", + "md5_1": "cc01df82a9354bb6b3be93483b20c35a", + "md5_2": "941c9998d746416dad53c94c480ddf30", + "read_count": "965", + "run_accession": "DRR028935", + "run_alias": "DRR028935", + "sample_accession": "SAMD00024405", + "sample_alias": "SAMD00024405", + "sample_description": "Liquid culture", + "sample_title": "Botryococcus braunii Showa at day 0 after inoculation into fresh culture medium", + "scientific_name": "Botryococcus braunii Showa", + "secondary_sample_accession": "DRS019431", + "secondary_study_accession": "DRP002616", + "single_end": false, + "study_accession": "PRJDB3420", + "study_alias": "DRP002616", + "study_title": "Liquid culture of Botryococcus braunii, race B, Showa", + "submission_accession": "DRA002949", + "tax_id": "1202541" + }, + { + "base_count": "1996273", + "experiment_accession": "SRX6725035", + "experiment_alias": "Emb289P1_bin131", + "experiment_title": "Illumina HiSeq 2500 sequencing: Binning of metagenomic reads from the P1 gut compartment of Embiratermes neotenicus", + "fastq_1": "SRX6725035_SRR9984183.fastq.gz:md5,c9b4c2c4abf19da7082caf442fdefea7", + "fastq_2": "", + "fastq_aspera": "fasp.sra.ebi.ac.uk:/vol1/fastq/SRR998/003/SRR9984183/SRR9984183.fastq.gz", + "fastq_bytes": "605358", + "fastq_ftp": "ftp.sra.ebi.ac.uk/vol1/fastq/SRR998/003/SRR9984183/SRR9984183.fastq.gz", + "fastq_galaxy": "ftp.sra.ebi.ac.uk/vol1/fastq/SRR998/003/SRR9984183/SRR9984183.fastq.gz", + "fastq_md5": "0b512d2dc31685983456bd56fd836544", + "id": "SRX6725035_SRR9984183", + "instrument_model": "Illumina HiSeq 2500", + "instrument_platform": "ILLUMINA", + "library_layout": "SINGLE", + "library_name": "Emb289P1_bin131", + "library_selection": "RANDOM", + "library_source": "METAGENOMIC", + "library_strategy": "WGS", + "md5_1": "0b512d2dc31685983456bd56fd836544", + "md5_2": "", + "read_count": "58", + "run_accession": "SRR9984183", + "run_alias": "Emb289P1_bin131.fastq", + "sample_accession": "SAMN12581720", + "sample_alias": "Emb289P1_bin131", + "sample_description": "Keywords: GSC:MIxS MIMAG:5.0", + "sample_title": "MIMAG Metagenome-assembled Genome sample from Defluviitaleaceae bacterium", + "scientific_name": "Defluviitaleaceae bacterium", + "secondary_sample_accession": "SRS5277011", + "secondary_study_accession": "SRP218535", + "single_end": true, + "study_accession": "PRJNA560329", + "study_alias": "PRJNA560329", + "study_title": "Phylogenomic analysis of 589 metagenome-assembled genomes encompassing all major prokaryotic lineages from the gut of higher termites", + "submission_accession": "SRA942061", + "tax_id": "2660712" + }, + { + "base_count": "35658", + "experiment_accession": "ERX1234253", + "experiment_alias": "qiita_ptid_1263:10317.BLANK.93.3E.r22", + "experiment_title": "Illumina HiSeq 2500 sequencing: qiita_ptid_1263:10317.BLANK.93.3E.r22", + "fastq_1": "ERX1234253_ERR1160846.fastq.gz:md5,b1de59f829fbd2d60a1ed4bc3da55709", + "fastq_2": "", + "fastq_aspera": "fasp.sra.ebi.ac.uk:/vol1/fastq/ERR116/006/ERR1160846/ERR1160846.fastq.gz", + "fastq_bytes": "18077", + "fastq_ftp": "ftp.sra.ebi.ac.uk/vol1/fastq/ERR116/006/ERR1160846/ERR1160846.fastq.gz", + "fastq_galaxy": "ftp.sra.ebi.ac.uk/vol1/fastq/ERR116/006/ERR1160846/ERR1160846.fastq.gz", + "fastq_md5": "5924f20ef547ebdfed7cad795bbab6e6", + "id": "ERX1234253_ERR1160846", + "instrument_model": "Illumina HiSeq 2500", + "instrument_platform": "ILLUMINA", + "library_layout": "SINGLE", + "library_name": "10317.BLANK.93.3E.r22", + "library_selection": "PCR", + "library_source": "METAGENOMIC", + "library_strategy": "AMPLICON", + "md5_1": "5924f20ef547ebdfed7cad795bbab6e6", + "md5_2": "", + "read_count": "283", + "run_accession": "ERR1160846", + "run_alias": "qiita_ppdid_706:10317.BLANK.93.3E.r22", + "sample_accession": "SAMEA3687214", + "sample_alias": "qiita_sid_10317:10317.BLANK.93.3E.r22", + "sample_description": "American Gut control", + "sample_title": "10317.BLANK.93.3E.r22", + "scientific_name": "metagenome", + "secondary_sample_accession": "ERS994363", + "secondary_study_accession": "ERP012803", + "single_end": true, + "study_accession": "PRJEB11419", + "study_alias": "qiita_sid_10317", + "study_title": "American Gut Project", + "submission_accession": "ERA541392", + "tax_id": "256318" + } + ], + [ + "versions.yml:md5,1496d1cbc9041e07ab8a0c25f0b054d9", + "versions.yml:md5,9b17045ca8bdc272cb3f9d349a81d206", + "versions.yml:md5,b52279f7d6b891a6523d9321f3f85b47", + "versions.yml:md5,c19fc0f920e57875881761cc944a46d7" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.10.0" + }, + "timestamp": "2025-10-28T15:50:25.540511" + } +} \ No newline at end of file