text: user8601: I previously asked a question about how to retrieve the Accession List associated with a SRA project. The answer was:
  esearch -db sra -query 'PRJNA491191[bioproject]' | efetch -format runinfo
  where PRJNA491191 is the bioproject that I'm interested in in this example. How can I do the same for the metadata file (the arrow in the picture below is pointing to accession list. It should point to metadata, which is what I'm interested in now)?
  
  
  user3577: Depending on exactly which information you seek, you can try:
  esearch -db sra -query 'PRJNA491191[bioproject]' | efetch -format native -mode xml
  
  This will return an XML with additional information that is not present in the runinfo table. You can use the Entrez Direct tool xtract to parse the output XML and extract the fields of interest into a tabular format.
  Alternatively, you can try:
  esearch -db sra -query 'PRJNA491191[bioproject]' | esummary
  
  to retrieve a summary output that includes fewer fields than the efetch option shown above. Perhaps all of the fields that are of interest to you are present in the summary output... it will save you time and effort in parsing the XML and retrieving the information you want.
  For example, you can use the following to retrieve some fields using xtract from the esummary output:
  $ esearch -db sra -query 'PRJNA491191[bioproject]' \
    | esummary \
    | xtract -pattern DocumentSummary -element Summary/Title,Statistics@total_size,Study@acc 
  GSM3391430: hsf-1(OE) rep3; Caenorhabditis elegans; RNA-Seq  731402855  SRP161795
  GSM3391429: hsf-1(OE) rep2; Caenorhabditis elegans; RNA-Seq  703822418  SRP161795
  GSM3391428: hsf-1(OE) rep1; Caenorhabditis elegans; RNA-Seq  715482490  SRP161795
  ...
  
  
original_text: 8601: <p>I previously <a href="https://bioinformatics.stackexchange.com/questions/13845/programmatically-retrieve-accession-list-from-ncbi">asked a question</a> about how to retrieve the Accession List associated with a SRA project. The answer was:</p>
  <p><code>esearch -db sra -query 'PRJNA491191[bioproject]' | efetch -format runinfo</code></p>
  <p>where <code>PRJNA491191</code> is the bioproject that I'm interested in in this example. How can I do the same for the <code>metadata</code> file (the arrow in the picture below is pointing to accession list. It should point to metadata, which is what I'm interested in now)?
  <a href="https://i.stack.imgur.com/3hySD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3hySD.png" alt="enter image description here" /></a></p>
   3577: <p>Depending on exactly which information you seek, you can try:</p>
  <pre><code>esearch -db sra -query 'PRJNA491191[bioproject]' | efetch -format native -mode xml
  </code></pre>
  <p>This will return an XML with additional information that is not present in the <code>runinfo</code> table. You can use the <a href="https://www.ncbi.nlm.nih.gov/books/NBK179288/" rel="nofollow noreferrer">Entrez Direct</a> tool <code>xtract</code> to parse the output XML and extract the fields of interest into a tabular format.</p>
  <p>Alternatively, you can try:</p>
  <pre><code>esearch -db sra -query 'PRJNA491191[bioproject]' | esummary
  </code></pre>
  <p>to retrieve a summary output that includes fewer fields than the <code>efetch</code> option shown above. Perhaps all of the fields that are of interest to you are present in the summary output... it will save you time and effort in parsing the XML and retrieving the information you want.</p>
  <p>For example, you can use the following to retrieve some fields using <code>xtract</code> from the <code>esummary</code> output:</p>
  <pre><code>$ esearch -db sra -query 'PRJNA491191[bioproject]' \
    | esummary \
    | xtract -pattern DocumentSummary -element Summary/Title,Statistics@total_size,Study@acc 
  GSM3391430: hsf-1(OE) rep3; Caenorhabditis elegans; RNA-Seq  731402855  SRP161795
  GSM3391429: hsf-1(OE) rep2; Caenorhabditis elegans; RNA-Seq  703822418  SRP161795
  GSM3391428: hsf-1(OE) rep1; Caenorhabditis elegans; RNA-Seq  715482490  SRP161795
  ...
  </code></pre>
  