<p>You'll want something like:</p>
<pre><code>esearch -db sra -query SRX1596422 | efetch -format runinfo
</code></pre>
<p>This will produce a CSV output to the screen with columns containing the meta information available in SRA:</p>
<pre><code>Run,ReleaseDate,LoadDate,spots,bases,spots_with_mates,avgLength,size_MB,AssemblyName,download_path,Experiment,LibraryName,LibraryStrategy,LibrarySelection,LibrarySource,LibraryLayout,InsertSize,InsertDev,Platform,Model,SRAStudy,BioProject,Study_Pubmed_id,ProjectID,Sample,BioSample,SampleType,TaxID,ScientificName,SampleName,g1k_pop_code,source,g1k_analysis_group,Subject_ID,Sex,Disease,Tumor,Affection_Status,Analyte_Type,Histological_Type,Body_Site,CenterName,Submission,dbgap_study_accession,Consent,RunHash,ReadHash
SRR3184375,2016-02-24 00:00:00,2016-02-23 23:14:45,556018223,111203644600,556018223,200,57997,GCA_000001635.1,https://sra-downloadb.be-md.ncbi.nlm.nih.gov/sos2/sra-pub-run-7/SRR3184375/SRR3184375.1,SRX1596422,,WGS,size fractionation,GENOMIC,PAIRED,0,0,ILLUMINA,Illumina HiSeq 2000,SRP070623,PRJNA312530,,312530,SRS1306521,SAMN04492320,simple,10090,Mus musculus,MCNT_E1,,,,,female,,no,,,,,THE SCRIPPS RESEARCH INSTITUTE,SRA356784,,public,52A6F836C13F2D15755EDE3E52A18D78,240E7130CFE36405818DA5EE2A10E24C
</code></pre>
<p>The more relevant fields are: Subject_ID, Sex, Disease, Tumor, Affection_Status, Analyte_Type, Histological_Type, Body_Site. Note that not all of these are available for that particular sample.</p>

CC BY-SA 4.0
2020-07-21T21:50:37.483Z
2020-07-21T21:50:37.483Z
Devon Ryan
<p>I want to extract metadata from experiment SRX1596422. I have sratoolkit and Entrex direct but not sure what line of code to use. Here's the link for the experiment: <a href="https://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=run_browser&amp;run=SRR390728" rel="nofollow noreferrer">experiment SRX1596422</a></p>

CC BY-SA 4.0
2020-07-21T20:02:04.970Z
Hi and welcome. This is certainly a good question, but its not described clearly. If you describe the code you used so far and instead of  singly linking the experiment, just briefly explaining it to us?
M__
<phylogenetics><sratoolkit><entrez>
How to extract metadata from NCBI's experiment?
# How to extract metadata from NCBI's experiment?

(Asked by: username_0 on 2020-07-21)

I want to extract metadata from experiment SRX1596422. I have sratoolkit and Entrex direct but not sure what line of code to use. Here's the link for the experiment: [experiment SRX1596422](https://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=run_browser&run=SRR390728)

**Tags:** phylogenetics, sratoolkit, entrez
> **Comments:**
> **username_1**: Hi and welcome. This is certainly a good question, but its not described clearly. If you describe the code you used so far and instead of  singly linking the experiment, just briefly explaining it to us?  

---

## 1 answers

### Answer by username_2 on 2020-07-21. Score: 3

You'll want something like:
esearch -db sra -query SRX1596422 | efetch -format runinfo

This will produce a CSV output to the screen with columns containing the meta information available in SRA:
Run,ReleaseDate,LoadDate,spots,bases,spots_with_mates,avgLength,size_MB,AssemblyName,download_path,Experiment,LibraryName,LibraryStrategy,LibrarySelection,LibrarySource,LibraryLayout,InsertSize,InsertDev,Platform,Model,SRAStudy,BioProject,Study_Pubmed_id,ProjectID,Sample,BioSample,SampleType,TaxID,ScientificName,SampleName,g1k_pop_code,source,g1k_analysis_group,Subject_ID,Sex,Disease,Tumor,Affection_Status,Analyte_Type,Histological_Type,Body_Site,CenterName,Submission,dbgap_study_accession,Consent,RunHash,ReadHash
SRR3184375,2016-02-24 00:00:00,2016-02-23 23:14:45,556018223,111203644600,556018223,200,57997,GCA_000001635.1,https://sra-downloadb.be-md.ncbi.nlm.nih.gov/sos2/sra-pub-run-7/SRR3184375/SRR3184375.1,SRX1596422,,WGS,size fractionation,GENOMIC,PAIRED,0,0,ILLUMINA,Illumina HiSeq 2000,SRP070623,PRJNA312530,,312530,SRS1306521,SAMN04492320,simple,10090,Mus musculus,MCNT_E1,,,,,female,,no,,,,,THE SCRIPPS RESEARCH INSTITUTE,SRA356784,,public,52A6F836C13F2D15755EDE3E52A18D78,240E7130CFE36405818DA5EE2A10E24C

The more relevant fields are: Subject_ID, Sex, Disease, Tumor, Affection_Status, Analyte_Type, Histological_Type, Body_Site. Note that not all of these are available for that particular sample.


---

