Description of the bug
fetchngs 1.8 produces empty runinfo.tsv because ENA no longer accepts parent_study
I encountered a failure in nf-core/fetchngs 1.12 while processing valid SRA run accessions such as:
The pipeline fails at:
NFCORE_FETCHNGS:SRA:SRA_RUNINFO_TO_FTP
with:
Missing output file(s) `*.tsv` expected by process
`NFCORE_FETCHNGS:SRA:SRA_RUNINFO_TO_FTP`
The preceding *.runinfo.tsv files are created, but contain only the header and no data rows, for example:
run_accession experiment_accession sample_accession ... fastq_ftp ...
The accessions themselves are valid. NCBI SRA returns complete metadata for them, and ENA also resolves both the run and experiment accessions correctly.
For example:
curl -L -G \
'https://www.ebi.ac.uk/ena/portal/api/filereport' \
--data-urlencode 'accession=SRX4201949' \
--data-urlencode 'result=read_run' \
--data-urlencode 'fields=run_accession,experiment_accession,fastq_ftp,fastq_md5,fastq_bytes'
returns the expected record for SRR7299460, including both paired FASTQ URLs.
However, reproducing the full ENA field request used by fetchngs 1.12 results in:
Invalid fieldName(s) supplied: parent_study
The field list in bin/sra_ids_to_runinfo.py includes:
which is apparently no longer accepted by the current ENA read_run filereport API.
Because the script creates the output file and writes its header before attempting to write returned metadata records, the failed/empty ENA response results in a header-only *.runinfo.tsv.
The subsequent sra_runinfo_to_ftp.py process then iterates over zero records and does not create the expected *.runinfo_ftp.tsv, resulting in the Nextflow error:
Missing output file(s) `*.tsv`
I confirmed that removing parent_study from the requested ENA metadata fields resolves the issue.
For example, this ENA request succeeds:
curl -L -G \
'https://www.ebi.ac.uk/ena/portal/api/filereport' \
--data-urlencode 'accession=SRX4201949' \
--data-urlencode 'result=read_run' \
--data-urlencode 'fields=run_accession,experiment_accession,sample_accession,secondary_sample_accession,study_accession,secondary_study_accession,submission_accession,run_alias,experiment_alias,sample_alias,study_alias,library_layout,library_selection,library_source,library_strategy,library_name,instrument_model,instrument_platform,base_count,read_count,tax_id,scientific_name,sample_title,experiment_title,study_title,sample_description,fastq_md5,fastq_bytes,fastq_ftp,fastq_galaxy,fastq_aspera'
As a workaround, running fetchngs with an explicit --ena_metadata_fields list that excludes parent_study allows the metadata query to succeed.
It may therefore be useful to:
- Remove or replace
parent_study from the default ENA metadata field list.
- Add validation that the ENA response contains at least one data record rather than silently creating a header-only TSV.
- Report the ENA API error response directly so that the upstream cause is visible instead of only failing later in
SRA_RUNINFO_TO_FTP.
Environment:
nf-core/fetchngs: 1.12
Executor: Slurm
System: Pawsey Setonix
Profile: pawsey_setonix / Singularity
Command used and terminal output
nextflow run nf-core/fetchngs \
-r 1.12.0 \
-resume \
--input sra_ids.csv \
--download_method sratools \
--outdir "$MYSCRATCH/fetchngs_results" \
-profile singularity,pawsey_setonix
Relevant files
No response
System information
No response
Description of the bug
fetchngs 1.8 produces empty runinfo.tsv because ENA no longer accepts
parent_studyI encountered a failure in
nf-core/fetchngs1.12 while processing valid SRA run accessions such as:The pipeline fails at:
with:
The preceding
*.runinfo.tsvfiles are created, but contain only the header and no data rows, for example:The accessions themselves are valid. NCBI SRA returns complete metadata for them, and ENA also resolves both the run and experiment accessions correctly.
For example:
returns the expected record for
SRR7299460, including both paired FASTQ URLs.However, reproducing the full ENA field request used by fetchngs 1.12 results in:
The field list in
bin/sra_ids_to_runinfo.pyincludes:"parent_study"which is apparently no longer accepted by the current ENA
read_runfilereport API.Because the script creates the output file and writes its header before attempting to write returned metadata records, the failed/empty ENA response results in a header-only
*.runinfo.tsv.The subsequent
sra_runinfo_to_ftp.pyprocess then iterates over zero records and does not create the expected*.runinfo_ftp.tsv, resulting in the Nextflow error:I confirmed that removing
parent_studyfrom the requested ENA metadata fields resolves the issue.For example, this ENA request succeeds:
As a workaround, running fetchngs with an explicit
--ena_metadata_fieldslist that excludesparent_studyallows the metadata query to succeed.It may therefore be useful to:
parent_studyfrom the default ENA metadata field list.SRA_RUNINFO_TO_FTP.Environment:
Command used and terminal output
Relevant files
No response
System information
No response