diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml index a7bf4fc..81b6e42 100644 --- a/.github/workflows/download_pipeline.yml +++ b/.github/workflows/download_pipeline.yml @@ -18,6 +18,8 @@ on: env: NXF_ANSI_LOG: false + WEBIN_ACCOUNT: ${{ secrets.WEBIN_ACCOUNT }} + WEBIN_PASSWORD: ${{ secrets.WEBIN_PASSWORD }} jobs: configure: @@ -32,7 +34,7 @@ jobs: run: | echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT" - echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT" + echo "REPO_BRANCH=${{ github.event.inputs.testbranch || github.head_ref || 'dev' }}" >> "$GITHUB_OUTPUT" download: runs-on: ubuntu-latest @@ -97,6 +99,12 @@ jobs: echo "Initial container image count: $image_count" echo "IMAGE_COUNT_INITIAL=$image_count" >> "$GITHUB_OUTPUT" + - name: Configure Nextflow secrets + shell: bash + run: | + nextflow secrets set ENA_WEBIN "$WEBIN_ACCOUNT" + nextflow secrets set ENA_WEBIN_PASSWORD "$WEBIN_PASSWORD" + - name: Run the downloaded pipeline (stub) id: stub_run_pipeline continue-on-error: true @@ -104,6 +112,7 @@ jobs: NXF_SINGULARITY_CACHEDIR: ./singularity_container_images NXF_SINGULARITY_HOME_MOUNT: true run: nextflow run ./${{needs.configure.outputs.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ needs.configure.outputs.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results + - name: Run the downloaded pipeline (stub run not supported) id: run_pipeline if: ${{ steps.stub_run_pipeline.outcome == 'failure' }} diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index 7a3ddf8..0b8fd68 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -83,8 +83,6 @@ jobs: - "25.10.4" - "latest-everything" env: - WEBIN_ACCOUNT: ${{ secrets.WEBIN_ACCOUNT }} - WEBIN_PASSWORD: ${{ secrets.WEBIN_PASSWORD }} NXF_ANSI_LOG: false TOTAL_SHARDS: ${{ needs.nf-test-changes.outputs.total_shards }} @@ -100,8 +98,6 @@ jobs: env: NFT_WORKDIR: ${{ env.NFT_WORKDIR }} NXF_VERSION: ${{ matrix.NXF_VER }} - WEBIN_ACCOUNT: ${{ secrets.WEBIN_ACCOUNT }} - WEBIN_PASSWORD: ${{ secrets.WEBIN_PASSWORD }} with: profile: ${{ matrix.profile }} shard: ${{ matrix.shard }} diff --git a/.nf-core.yml b/.nf-core.yml index ae0fc89..17fb632 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -13,7 +13,7 @@ lint: nf_core_version: 4.0.2 repository_type: pipeline template: - author: Martin Beracochea, Ekaterina Sakharova, Sofia Ochkalova, Evangelos Karatzas + author: Martin Beracochea, Ekaterina Sakharova, Sofia Ochkalova, Evangelos Karatzas, Tim Rozday description: Submit sequences, assemblies, MAGs, etc., to public archives force: false is_nfcore: true diff --git a/assets/seqsubmit_schema.png b/assets/seqsubmit_schema.png index 351876b..475bdf3 100644 Binary files a/assets/seqsubmit_schema.png and b/assets/seqsubmit_schema.png differ diff --git a/modules/local/count_rna/main.nf b/modules/local/count_rna/main.nf index dcb6860..b2594b7 100644 --- a/modules/local/count_rna/main.nf +++ b/modules/local/count_rna/main.nf @@ -33,6 +33,6 @@ process COUNT_RNA { stub: """ - echo -e "genome\tYes" > ${meta.id}_rna_decision.tsv + touch ${meta.id}_rna_decision.tsv """ } diff --git a/modules/local/count_rna/tests/main.nf.test.snap b/modules/local/count_rna/tests/main.nf.test.snap index 1b9093d..46ab55a 100644 --- a/modules/local/count_rna/tests/main.nf.test.snap +++ b/modules/local/count_rna/tests/main.nf.test.snap @@ -23,14 +23,14 @@ { "id": "test" }, - "test_rna_decision.tsv:md5,cf8ebf06bf0641ceec14c8b034c639af" + "test_rna_decision.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ] ], - "timestamp": "2026-06-25T21:38:27.45503", + "timestamp": "2026-07-01T18:37:30.337186", "meta": { "nf-test": "0.9.5", - "nextflow": "26.04.0" + "nextflow": "26.04.1" } } } \ No newline at end of file diff --git a/modules/local/genome_upload/main.nf b/modules/local/genome_upload/main.nf index dd99181..651b281 100644 --- a/modules/local/genome_upload/main.nf +++ b/modules/local/genome_upload/main.nf @@ -48,7 +48,7 @@ process GENOME_UPLOAD { stub: """ - mkdir results/MAG_upload + mkdir -p results/MAG_upload touch results/MAG_upload/ENA_backup.json touch results/MAG_upload/genome_samples.xml touch results/MAG_upload/submission.xml diff --git a/modules/local/registerstudy/main.nf b/modules/local/registerstudy/main.nf index 502c0b2..2eb8378 100644 --- a/modules/local/registerstudy/main.nf +++ b/modules/local/registerstudy/main.nf @@ -9,7 +9,7 @@ process REGISTERSTUDY { // ENA_WEBIN and ENA_WEBIN_PASSWORD must be set in the process environment. // In the pipeline, map Nextflow secrets via conf/modules.config or nextflow.config: - // env { ENA_WEBIN = secrets.WEBIN_ACCOUNT; ENA_WEBIN_PASSWORD = secrets.WEBIN_PASSWORD } + // env { ENA_WEBIN = secrets.ENA_WEBIN; ENA_WEBIN_PASSWORD = secrets.ENA_WEBIN_PASSWORD } input: tuple val(meta), path(study_metadata) diff --git a/modules/local/registerstudy/tests/nextflow.config b/modules/local/registerstudy/tests/nextflow.config index cc4fa72..8c88472 100644 --- a/modules/local/registerstudy/tests/nextflow.config +++ b/modules/local/registerstudy/tests/nextflow.config @@ -3,8 +3,7 @@ // --validate : validate and build XML but do not submit to ENA // // Dummy credentials are sufficient for --validate mode since -// no HTTP calls are made. For real submission tests, replace with secrets: -// env { ENA_WEBIN = secrets.WEBIN_ACCOUNT; ENA_WEBIN_PASSWORD = secrets.WEBIN_PASSWORD } +// no HTTP calls are made. For real submission tests, use Nextflow secrets env { ENA_WEBIN = secrets.ENA_WEBIN diff --git a/workflows/genomesubmit.nf b/workflows/genomesubmit.nf index 9d193a3..18edd96 100644 --- a/workflows/genomesubmit.nf +++ b/workflows/genomesubmit.nf @@ -128,9 +128,11 @@ workflow GENOMESUBMIT { // Update metadata for records missing coverage fasta_updated_with_coverage = COVERM_GENOME.out.coverage.join(branched_coverage_results.genome_coverage_ref_input) .map{ meta, coverage_tsv, fasta -> - def coverage = coverage_tsv.readLines()[1].split('\t')[1]; // skip header + def lines = coverage_tsv.readLines() + // support for empty coverage files required for -stub mode + def coverage = lines ? lines[1].split('\t')[1] : null def updated_meta = meta.clone() - updated_meta.genome_coverage = coverage; + updated_meta.genome_coverage = coverage return [updated_meta, fasta] } .mix(branched_coverage_results.genome_coverage_present) @@ -153,9 +155,11 @@ workflow GENOMESUBMIT { // Update metadata for records missing RNA fasta_updated_with_rna = RNA_DETECTION.out.rna_detected.join(branched_rna_results.rna_prediction_input) .map{ meta, rna_decision, fasta -> - def decision = rna_decision.readLines()[0].split('\t')[1]; + def lines = rna_decision.readLines() + // support for empty decision files required for -stub mode + def decision = lines ? lines[0].split('\t')[1] : null def updated_meta = meta.clone() - updated_meta.RNA_presence = decision; + updated_meta.RNA_presence = decision return [updated_meta, fasta] } .mix(branched_rna_results.rna_present) @@ -192,12 +196,12 @@ workflow GENOMESUBMIT { .join(branched_stats_results.genome_evaluation_input) .combine(stats_version_ch) .map { meta, stats_tsv, fasta, stats_version -> - def line = stats_tsv.readLines()[1].split('\t') + def lines = stats_tsv.readLines() + // support for empty checkm files required for -stub mode def updated_meta = meta.clone() - updated_meta.completeness = line[1] - updated_meta.contamination = line[2] + updated_meta.completeness = lines ? lines[1].split('\t')[1] : null + updated_meta.contamination = lines ? lines[1].split('\t')[2] : null updated_meta.stats_generation_software = stats_version - return [updated_meta, fasta] } .mix(branched_stats_results.evaluation_present) @@ -236,9 +240,10 @@ workflow GENOMESUBMIT { fasta_updated_with_taxonomy = FASTA_CLASSIFY_CATPACK.out.bat_classification .join(branched_taxonomy_results.genome_taxonomy_input) .map { meta, taxa_tsv, fasta -> - def line = taxa_tsv.readLines()[1].split('\t') + def lines = taxa_tsv.readLines() def updated_meta = meta.clone() - updated_meta.NCBI_lineage = line[3] + // support for empty taxonomy files required for -stub mode + updated_meta.NCBI_lineage = lines ? lines[1].split('\t')[3] : null return [updated_meta, fasta] } .mix(branched_taxonomy_results.taxonomy_present)