Comments (4)
esearch -db sra -query SRR5381359 | elink -target biosample | efetch -format docsum | xtract -pattern DocumentSummary -element Attribute
@mikeadavidson -- any idea why Attribute@lat_lon doesnt work?
from edirectcookbook.
I'm by no means an expert on sra (I'm not even sure what it stands for), but Attribute@lat_lon would only identify <Attribute> elements (putting in angle brackets to differentiate from XML attributes...this is an unfortunately named element!) with an attribute named "lat_lon".
In this case, "lat_lon" is the value of the "attribute_name" attribute.
Try something like this for your xtract:
xtract -pattern DocumentSummary -block Attribute -if Attribute@attribute_name -equals lat_lon -element Attribute
from edirectcookbook.
Thanks Mike!
esearch -db sra -query SRR5381359 | elink -target biosample | efetch -format docsum | xtract -pattern DocumentSummary -block Attribute -if Attribute@attribute_name -equals lat_lon -element Attribute
so:
for i in cat <ACCN_LIST>
; do echo -n $i; esearch -db sra -query $i | elink -target biosample | efetch -format docsum | xtract -pattern DocumentSummary -block Attribute -if Attribute@attribute_name -equals lat_lon -element Attribute; done (not tested)
Ill push after I test.
from edirectcookbook.
yes, that works.
for i in $(cat sra_ids.txt); do ll=$(esearch -db sra -query $i | elink -target biosample | efetch -format docsum | xtract -pattern DocumentSummary -block Attribute -if Attribute@attribute_name -equals lat_lon -element Attribute); echo -e "$i\t$ll"; done
from edirectcookbook.
Related Issues (20)
- How to use xtract to get <name value> pairs of all the attributes?
- The “-if” and “-unless” statements in xtract did not seem to work for me when extracting Attributes in BioSample HOT 3
- The efetch command reported BioSamples’ Attributes completely different from those displayed at the NCBI website HOT 2
- Get entries that have specific keyword in the tag "Isolation source"
- get nucleotide sequence by gene ID HOT 12
- Get Transcription Factors ChiP-seq experiments
- The importance of adding < /dev/null with while loops
- Retrieve Bioproject IDs and related SRAs within given timerange HOT 2
- curl: (60) SSL certificate problem: unable to get local issuer certificate
- Citation List
- Overall design
- Retrieve bioproject IDs and SRA IDs from PMIDs? HOT 3
- getting the fastq reads from accession ids HOT 1
- Download 1,000 Random Human RefSeq Transcripts HOT 2
- Downloading FASTA Records with GI Number via efetch? HOT 2
- Download Symbol via EFetch HOT 9
- Retrieve all metadata from edirect that is accessible from SRArunTable
- Get coding sequences for a gene id HOT 2
- How to merge data from two different databases into one output file? HOT 3
- How to print an empty field if no data is found?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edirectcookbook.