I'm having a relatively baffling problem - I'm trying to access the info for a bunch of BioSample IDs via the Entrez API in Python using Biopython v1.68, here's a minimal example. I'm looking for BioSample SAMEA2467098, URL: https://www.ncbi.nlm.nih.gov/biosample/?term=SAMEA2467098
This should be Brassica napus, cv. Beluga
In Python:
from Bio import Entrez
Entrez.email = 'SNIP'
sample = 'SAMEA2467098'
handle = Entrez.efetch('BioSample', id=sample, retmode='text')
print(handle.readlines())
['1: Non-tumor DNA sample from blood of a human participant in the dbGaP study "An APOBEC Cytidine Deaminase Mutagenesis in Human Cancers"\n', 'Identifiers: BioSample: SAMN02467098\n', 'Organism: Homo sapiens\n', 'Attributes:\n', ' /submitter handle="NHGRI_APOBEC_CytidineDeaminase"\n', ' /biospecimen repository="NHGRI_APOBEC_CytidineDeaminase"\n', ' /study name="An APOBEC Cytidine Deaminase Mutagenesis in Human Cancers"\n', ' /study design="Cross-Sectional"\n', ' /biospecimen repository sample id="TCGA-BP-5199-11A-01D-1429-08"\n', ' /submitted sample id="TCGA-BP-5199-11A-01D-1429-08"\n', ' /submitted subject id="TCGA-BP-5199-11A-01D-1429-08"\n', ' /study disease="Neoplasms"\n', ' /tissue="blood"\n', ' /analyte type="DNA"\n', ' /is tumor="No"\n', ' /subject is affected="Yes"\n', ' /molecular data type="SNV (.MAF)"\n', 'Accession: SAMN02467098\tID: 2467098\n', '\n', '\n']
Suddenly it's human, and the accession changed from SAME A 2467098 to SAM N0 2467098, which is indeed human: https://www.ncbi.nlm.nih.gov/biosample/?term=SAMN02467098
What am I doing wrong here? It works for most of my other BioSample IDs!
Edit: It's not a Biopython problem, using the API manually gives the same result: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=biosample&id=SAMEA2467098&retmode=text
May be worth creating a ticket at NCBI support. Looks like some sort of a bug in their code.
I dropped them a message late last night, looks like they'll file it as a bug, will update here
Any update on this issue ?
The bug doesn't seem to be fixed yet.
I haven't heard back anything, but just going over the middle step of using the returned ID works