ds2pme
Quick Start
- Command:
efetch -db pubmed -id <PMID> -format docsum | ds2pme - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/ds2pme - Primary modes: default ASN.1 text,
-xmlfor intermediate XML
When To Use This Tool
- Convert PubMed
DocumentSummaryrecords, rather than fullPubmedArticleXML, intoPubmed-entrystructures. - Stay inside a docsum-oriented EDirect workflow when ASN.1 text is the desired downstream format.
- Inspect the intermediate XML before the last flattening step when debugging or archiving conversions.
- Use a lighter-weight alternative to
pma2pmewhen your upstream source is already docsum output.
Common Patterns
# 1) Default Pubmed-entry ASN.1 text
efetch -db pubmed -id 2539356 -format docsum | ds2pme
# 2) Keep the intermediate XML instead of flattening to ASN.1
efetch -db pubmed -id 2539356 -format docsum | ds2pme -xml
# 3) Feed the result into another XML-aware EDirect step
efetch -db pubmed -id 2539356 -format docsum | ds2pme -xml |
xtract -pattern Pubmed-entry -element pmid_
Recommended Workflow
- Fetch PubMed records as
-format docsum. - Use plain
ds2pmewhen you need final ASN.1 text, or-xmlwhen you want the structured intermediate. - Confirm that identifiers, title, journal, and article IDs look sensible before storing or reusing the output.
- Switch to
pma2pmeinstead if your upstream source is fullPubmedArticleXML rather than docsum output.
Guardrails
- The wrapper expects PubMed
DocumentSummaryXML on stdin, not fullPubmedArticleinput. - There is no built-in
--helpor--version; unknown arguments fail withUnrecognized argument .... - Accepted mode switches are
xml/-xmlandasn/-asn. - The default mode emits ASN.1 text beginning with
Pubmed-entry ::= {. -xmlstops before the finalxtract -pattern Pubmed-entry -element "."flattening step.- The wrapper depends on EDirect helpers such as
transmuteandxtractbeing onPATH.