Question: How many ID's exist in BioSample?
2
gravatar for pedrorvc
2.3 years ago by
pedrorvc30
pedrorvc30 wrote:

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!

bioproject eutils biosample ncbi • 1.3k views
ADD COMMENTlink modified 2.3 years ago by Pierre Lindenbaum126k • written 2.3 years ago by pedrorvc30
2
gravatar for Pierre Lindenbaum
2.3 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum126k wrote:

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

ADD COMMENTlink written 2.3 years ago by Pierre Lindenbaum126k
2
gravatar for LLTommy
2.3 years ago by
LLTommy1.2k
LLTommy1.2k wrote:

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 COMMENTlink written 2.3 years ago by LLTommy1.2k

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 REPLYlink written 2.3 years ago by pedrorvc30
1

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 REPLYlink modified 2.3 years ago • written 2.3 years ago by genomax78k
2
gravatar for genomax
2.3 years ago by
genomax78k
United States
genomax78k wrote:

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 COMMENTlink modified 2.3 years ago • written 2.3 years ago by genomax78k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1076 users visited in the last hour