efetch2jsonl

Crates.ioefetch2jsonl
lib.rsefetch2jsonl
version1.0.0
sourcesrc
created_at2024-06-18 10:39:53.105436
updated_at2024-06-18 10:39:53.105436
descriptionConvert EFetch XML to JSON Lines
homepage
repository
max_upload_size
id1275370
size18,274
Eric van der Toorn (ericvdtoorn)

documentation

README

Efetch2jsonl

A simple parser to convert from the output from efetch to a more parseable format.

This tool was built for converting from a query of SRA biosamples, though it should be applicable beyond that due to the configurable nature.

Example use case: You want to get the metadata from all the SRA runs of a single bioproject:

BIOPROJECT_ID=1081646
efetch -db bioproject -id $BIOPROJECT_ID -format xml | elink -db bioproject -target sra > bioproject_query.elink
cat bioproject_query.elink | efetch -mode xml -format xml > biosamples.out.xml
efetch2jsonl -i biosamples.out.xml -o biosamples.jsonl -k . -r EXPERIMENT_PACKAGE

Further processing to a clean table can be done trivially with something like Polars.

Commit count: 0

cargo fmt