How many ID's exist in BioSample?
3
2
Entering edit mode
6.5 years ago
pedrorvc ▴ 30

Hello everyone!

I would like to know if there is a way to get all the id's from BioSample. I already tried a link that i saw in another post that works for BioProject (https://www.ncbi.nlm.nih.gov/bioproject/browse/) but it doesn´t work for BioSample.

I also tried to download the summary of BioSample using this example from BioProject (ftp://ftp.ncbi.nlm.nih.gov/bioproject/summary.txt)

Also, can this be solved programmatically, i.e. using Eutils or EDirect?

What i really want to know is, simply, how many id's exist and how can i search for a list of them.

Thank you very much!

NCBI BioSample Eutils BioProject • 3.4k views
ADD COMMENT
2
Entering edit mode
6.5 years ago

using my tool XsltStream http://lindenb.github.io/jvarkit/XsltStream.html and the NCBI Biosample XML dump

ADD COMMENT
2
Entering edit mode
6.5 years ago
LLTommy ★ 1.2k

May I ask you why you need a list of all samples? And just the id's without any other information? I don't understand what you want to accomplish.

However, if you have a problem with ncbi's biosamples, you can try EBI's Biosample database (It should be synchronized with the ncbi one as far as I know). In this post I link to the API and the documentation, you might find that useful!

Of course, you could also access the data via RDF/SPARQL but that is a whole different story.

ADD COMMENT
0
Entering edit mode

Thank you very much for your explanation. I am trying to get the BioSample id's associated with some BioProjects and i just wanted to know how much records existed and a way to list them.

ADD REPLY
1
Entering edit mode

If you know the specific BioProject ID then use this (replace proj_ID with a real ID): esearch -db bioproject -query "proj_ID" | elink -target biosample | efetch -format docsum | xtract -pattern DocumentSummary -block Accession -element Accession

ADD REPLY
2
Entering edit mode
6.5 years ago
GenoMax 141k

You could get this file and then grep for sample accession #.

Edit: For specific BioProject ID's

esearch -db bioproject -query "BioProj_ID" | elink -target biosample | efetch -format docsum | xtract -pattern DocumentSummary -block Accession -element Accession
ADD COMMENT

Login before adding your answer.

Traffic: 1992 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6