pma2pme
Quick Start
- Command:
efetch -db pubmed -id <PMID> -format xml | pma2pme - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/pma2pme - Primary modes: default ASN.1 text,
-xmlfor intermediate XML,-stdor-mlfor author encoding style
When To Use This Tool
- Convert PubMed XML into
Pubmed-entryrecords for older NCBI / EDirect archival or interchange workflows. - Choose between Medline-style author strings (
-ml, default) and split standard author fields (-std). - Inspect the intermediate XML structure before the final ASN.1 rendering step.
- Stay in a shell / EDirect pipeline instead of rewriting the transformation in another language.
Common Patterns
# 1) Default Pubmed-entry ASN.1 text
efetch -db pubmed -id 2539356 -format xml | pma2pme
# 2) Use standard split author fields instead of Medline-style names
efetch -db pubmed -id 2539356 -format xml | pma2pme -std
# 3) Keep the intermediate XML instead of flattening to ASN.1
efetch -db pubmed -id 2539356 -format xml | pma2pme -xml
Recommended Workflow
- Fetch one or more
PubmedArticlerecords as XML withefetch. - Pick the author style deliberately: default
-mlfor Medline-like compact names, or-stdfor separate last name / initials fields. - Use
-xmlwhen debugging transformations or when another XML-aware step should consume the record before ASN.1 conversion. - Validate the generated identifiers, title, journal block, and author representation before archiving the output.
Guardrails
- The wrapper reads XML from stdin and does not fetch PMIDs on its own.
- There is no built-in
--helpor--version; unknown arguments fail withUnrecognized argument .... - Default behavior is
-mlplus ASN.1 output;-asnmerely reasserts the default final rendering mode. -xmlskips the lastxtractflattening step and returns the intermediate XML record instead of ASN.1 text.- Accepted author-style flags include
std/-std/-STDandml/-ml/-ML. - The wrapper depends on EDirect helpers such as
transmuteandxtractbeing available onPATH.