Skip to content

Instantly share code, notes, and snippets.

@ag1805x
Last active March 24, 2023 11:43
Show Gist options
  • Save ag1805x/2b7dfe390ff43981f759f177817dd8d5 to your computer and use it in GitHub Desktop.
Save ag1805x/2b7dfe390ff43981f759f177817dd8d5 to your computer and use it in GitHub Desktop.
Extract GSM id for a SRR id.
#Using NCBI's efetch to retrive GSM id (sample id) from a given SRR id(run id)
efetch -db sra -id SRR2453355 -format xml | xmllint --xpath "EXPERIMENT_PACKAGE_SET/EXPERIMENT_PACKAGE/EXPERIMENT/@alias" - | cut -d \" -f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment