Closed bradfordcondon closed 5 years ago
case 1:
https://www.ncbi.nlm.nih.gov/bioproject/243935 vs https://www.ncbi.nlm.nih.gov/bioproject/342675
The latter is PRJNA243935 obviously, and theo ther has a different accession (PRJNA342675) - so why isnt it caught in our accession filter?
answer:
</IdList><TranslationSet/><TranslationStack> <TermSet> <Term>PRJNA243935[All Fields]</Term> <Field>All Fields</Field> <Count>2</Count> <Explode>N</Explode> </TermSet> <OP>GROUP</OP> </TranslationStack><QueryTranslation>PRJNA243935[All Fields]</QueryTranslation></eSearchResult>
For some reason, it doesnt have the accession filter.
And yet, we definitely pass in the accession field filter?
The query is correct. bioproject db must not support the field parameter.
Instead it needs to be PRJNA243935[Project Accession]
if ($db == 'bioproject') {
// Bioproject doesnt support field filter, so instead, do this.
$provider->addParam('term', $accession . '[Project Accession]');
}
else {
$provider->addParam('term', $accession);
$provider->addParam('field', 'accession');
}
Note that if we keep adding all these exceptions by database, we're going to want to handle it more elegantly.
this actually resolves all the failed projects!
for the future, if we go to the advanced search, https://www.ncbi.nlm.nih.gov/bioproject/advanced it will let us see what fields we are allowed to filter by! It's different for each db, and a bit inconsistent (ie bioproject -> project accession, bioproject => accession, assembly => Assembly Accession
resolved in #172
Some of the mega bioprojects could not be found. Probably a similar issue to #167