bokulich-lab / q2-fondue

Functions for reproducibly Obtaining and Normalizing Data re-Used from Elsewhere
BSD 3-Clause "New" or "Revised" License
20 stars 6 forks source link

Raise warning when no run IDs are linked to aggregate ID #137

Open adamovanja opened 2 years ago

adamovanja commented 2 years ago

As a plugin user, I want get-metadata to return a warning or a Q2 error in case one aggregate ID (e.g. BioProject ID, Study ID) of many has no linked run ID entires in the SRA database.

Steps to reproduce:

Current behaviour: get-metadata exits with an empty SRAFailedIDs artifact and the output SRAMetadata only containing metadata of the second accession ID PRJNA18197 and no information on the first accession ID (PRJNA290381) for which no run IDs are linked in the SRA:

2022-08-08 11:06:18,718 [MainThread] [INFO] [entrezpy.conduit.Conduit]: {"querying": {"queryid": "nENHoXsWTd2Q0XdxXQDDSw==", "util": "esearch"}}
2022-08-08 11:06:20,730 [MainThread] [INFO] [entrezpy.conduit.Conduit]: {"querying": {"queryid": "Vq23ZxROQs26_xhKiBLZ1A==", "util": "elink"}}
2022-08-08 11:06:22,740 [MainThread] [INFO] [entrezpy.conduit.Conduit]: {"querying": {"queryid": "vw0N_jJNRoWqb8s_k-2zRA==", "util": "efetch"}}
2022-08-08 11:06:23,747 [MainThread] [INFO] [q2_fondue.metadata]: Fetching metadata for 4 run IDs.
Saved SRAMetadata to: diab_fail/metadata.qza
Saved SRAFailedIDs to: diab_fail/failed_runs.qza

Expected behaviour: A warning or an error should be raised in case the run IDs of one aggregate ID could not be fetched (by q2_fondue.entrezpy_clients._pipelines._get_run_ids).

adamovanja commented 1 year ago

hi @valentynbez,

the error that should appear in your case is not the same one as the one described above: above no error is falsely raised because multiple BioProjectIDs are queried with the get-metadata action and only one of them contains matching runIDs. In your case, you are querying just one BioProjectID with another methods (get-ids-from-query).

Could you open a separate issue for your case?

valentynbez commented 1 year ago

Hi,

I inspected the error further and yes, it is a separate issue. Sorry.