TRANSMUTE(1)

πŸ“¦
version 24.0.20250523 Β· 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– TRANSMUTE(1) πŸ’–

okay bestie, sit down, hydrate, because this is the Swiss-Army-knife-of-a-tool from the NCBI Entrez Direct User's Manual and she does. literally. everything. πŸ’…

transmute is one of those commands where you type the name and then a flag and suddenly your whole data pipeline is fixed. it's giving ✨main character energy✨. we're gonna go through her whole resume, flag by flag, no cap.


✨ NAME ✨

transmute β€” transform data, particularly within NCBI Entrez Direct πŸ¦‹


✨ SYNOPSIS ✨

okay so here's the whole menu of vibes. no skipping, we're listing every single one 🫢

the little plain-ification trio:

transmute -x2p|-j2p|-f2p

sequence alignment moment:

transmute -align [-a codes] [-g N] [-h N] [-w N]

JSON β†’ XML, and her cousin:

transmute -j2x (json2xml) [-set tag] [-rec tag]
[-nest flat|recurse|plural|singular|depth|element]
transmute -a2x [-set tag] [-rec tag]

table / CSV / SCN β†’ XML (the whole little 2x clique ✨):

transmute -t2x|-c2x|-s2x (tbl2xml / csv2xml / scn2xml) [-set tag]
[-rec tag] [-skip N] [-header] [-lower|-upper] [-indent|-flush]
columnName1 ...

ini β†’ XML:

transmute -i2x (ini2xml)

TOML β†’ XML:

transmute -m2x (toml2xml)

YAML β†’ XML:

transmute -y2x (yaml2xml)

filtering records, i.e. the βœ‚οΈ era:

transmute -txf (filter-record) [-pattern str] [-exclude str]
[-require str] [-min N] [-max N]

FSA β†’ XML:

transmute -f2x (fsa2xml)

GenBank flat file β†’ XML, and flat file β†’ reference:

transmute -g2x (gbf2xml)
transmute -g2r (gbf2ref)

references β†’ PMIDs, with a whole pile of little -options:

transmute -r2p (ref2pmid) [-options confirm|verbose|fast|slow|exact ...]

filtering GenBank, this time by accession, taxid, organism, all of it:

transmute -gbf (filter-genbank) [-accession acc|-accessions file]
[-taxid id|-taxids file] [-organism name] [-exclude str] [-require str]
[-truncate]

reverse complement szn:

transmute -revcomp

chopping from the front, chopping from the back:

transmute -remove [-first N] [-last N]

keeping a middle slice, -leading through -trailing:

transmute -retain -leading N-trailing N

the editor era β€” delete, insert, lowercase, offset or column:

transmute -replace -offset N|-column N [-delete N] [-insert seq]
[-lower]

extract a feature location, and yes you pick your indexing:

transmute -extract [-1-based|-0-based] [-lower] feat_loc

CDS β†’ protein, with so many options bestie:

transmute -cds2prot [-gcode N] [-frame N|-all] [-stop] [-trim] [-part5]
[-part3] [-every] [-between str] [-circular] [-orf] [-max N]

molecular weight, with a little methionine flourish:

transmute -molwt [-met|-fmet]

HGVS things:

transmute -hgvs

counting things:

transmute -counts

comparing things:

transmute -diff

codon check β€” nuc vs prot, frame optional, three-letter optional:

transmute -codons -nuc seq -prot seq [-frame N] [-three]

searching, protein and/or circular, maybe just the top hit:

transmute -search [-protein] [-circular] [-top] pattern ...

finding, with relaxed / sensitive / whole modes:

transmute -find [-relaxed] [-sensitive] [-whole] pattern ...

the XML encoding squad πŸŽ€:

transmute -encodeXML|-decodeXML|-plainXML

the URL encoding squad:

transmute -encodeURL|-decodeURL

the base64 squad:

transmute -encode64|-decode64

strip it back:

transmute -plain

case it up, case it down:

transmute -upper|-lower

amino acids, one letter ↔ three letter:

transmute -aa1to3|-aa3to1

the relaxer:

transmute -relax

the ✨format✨ girl β€” she has opinions on declarations, comments, CDATA, combining, self-closing, unicode, script, mathml:

transmute -format [fmt] [-xml declaration] [-doctype declaration]
[-comment] [-cdata] [-combine] [-self] [-unicode style] [-script style]
[-mathml terse]

filter by element, action, target:

transmute -filter element action target

and normalize a database:

transmute -normalize database

✨ DESCRIPTION ✨

okay so the whole plot: transmute reads data from standard input, transforms it according to the specified mode, and writes the transformed data to standard output. that's it. that's the girl. 🌸

in β†’ mode β†’ out. iconic behavior, honestly. πŸ’œ


and bestie, we are so not done β€” the flags and the details are still coming πŸ’…

✨ OPTIONS ✨

okay bestie, here's the whole menu, and it's a LOT. we're not skipping a single flag, so grab a snack πŸ“


Pretty-Printing πŸ’…

  • -x2p β€” reformats XML. glow-up for your markup ✨
  • -j2p β€” reformats JSON. same energy, curly braces edition πŸŽ€
  • -f2p β€” reformats FASTA. yes, even your sequences get the treatment 🧬
  • -align β€” table column alignment. lining everything up like the icon it is πŸ‘‘
    • -a codes β€” the column alignment codes, pick your fave:
      • l β€” left.
      • c β€” center.
      • r β€” right.
      • n β€” numeric align on decimal point.
      • N β€” trailing zero-pad decimals.
      • z β€” leading zero-pad integers.
      • m β€” commas to group by 3 digits.
      • M β€” commas plus zero-pad decimals.
      • w β€” just print colum widths.
    • -g N β€” spacing between columns.
    • -h N β€” indentation before columns.
    • -w N β€” minimum column width.

Data Conversion πŸ”„

  • -j2x β€” convert a JSON stream to XML that's suitable for -path navigation. json girlies stay winning πŸ’–
    • -set tag β€” replace the set wrapper tag.
    • -rec tag β€” replace the record wrapper tag.
    • -nest flat|recurse|plural|singular|depth|element β€” the nested array naming policy. choose your fighter.
  • -a2x β€” convert a text ASN.1 stream to XML suitable for -path navigation.
    • -set tag β€” replace the set wrapper tag.
    • -rec tag β€” replace the record wrapper tag.
  • -t2x, -c2x, -s2x β€” convert a tab-delimited table, a comma-separated values file, or a semicolon-delimited table (respectively) to XML. three besties, one job ✨
    • -set tag β€” replace the set wrapper tag.
    • -rec tag β€” replace the record wrapper tag.
    • -skip N β€” skip the first N lines.
    • -header β€” use fields from the first row for column names.
    • -lower β€” convert text to lowercase.
    • -upper β€” convert text to uppercase.
    • -indent β€” indent XML output.
    • -flush β€” do not indent XML output.
    • columnName1 ... β€” XML object names per column.
  • -i2x β€” convert .ini configuration file format to XML.
  • -m2x β€” convert TOML configuration file format to XML.
  • -y2x β€” convert YAML configuration file format to XML.
  • -txf β€” text file filtering. the bouncer at the door of your file πŸšͺ
    • -pattern str β€” pattern at start of record.
    • -exclude str β€” reject if string is present.
    • -require str β€” require presence of string.
    • -min N β€” minimum record number.
    • -max N β€” maximum record number.
  • -f2x β€” convert a FASTA stream to corresponding XML.
  • -g2x β€” convert GenBank/GenPept flatfile format to INSDSeq XML.
  • -g2r β€” convert GenBank/GenPept flatfile format to Reference XML.
  • -r2p [-options option ...] β€” Reference Index XML lookup to find PMIDs. here's what you can throw in option:
    • confirm β€” recheck existing PMID claims.
    • verbose β€” add NOTE nodes explaining the reasoning.
    • fast β€” prefilter candidates relatively heavily (this is the default, bestie).
    • slow β€” prefilter candidates less heavily.
    • exact β€” require exact, unique title matches.
  • -gbf β€” GenBank/GenPept filtering.
    • -accession acc β€” single accession.
    • -accessions file β€” file of accessions.
    • -taxid id β€” single taxon identifier.
    • -taxids file β€” file of taxon identifiers.
    • -organism name β€” organism scientific name.
    • -exclude str β€” reject if string is present.
    • -require str β€” require presence of string.
    • -truncate β€” remove features and sequence. bye bye πŸ‘‹

Sequence Editing βœ‚οΈ

  • -revcomp β€” reverse complement nucleotide sequence. flip it and reverse it πŸ”
  • -remove β€” trim at the ends of the sequence.
    • -first N β€” delete first N bases or residues.
    • -last N β€” delete last N bases or residues.
  • -retain β€” save either end of the sequence. keep the good parts 🫢
    • -leading N β€” keep first N bases or residues.
    • -trailing N β€” keep last N bases or residues.
  • -replace β€” apply a base or residue substitution.
    • -offset N β€” skip ahead by 0-based count (SPDI), or
    • -column N β€” move just before 1-based position (HGVS).
    • -delete N β€” delete N bases or residues.
    • -insert seq β€” insert the given sequence.
    • -lower β€” lower-case the original sequence.
  • -extract β€” use xtract -insd ... feat_location instructions.
    • -1-based β€” GenBank feat_location convention.
    • -0-based β€” alignment, or -insd feat_intervals.
    • -lower β€” lower-case the extracted sequence.
    • feat_loc β€” feature location.

Sequence Processing 🧬

  • -cds2prot β€” translate a coding region into protein. the main character transformation arc ✨
    • -gcode N β€” genetic code (1 by default).
    • -frame N β€” offset in sequence (0-based).
    • -stop β€” include stop residue.
    • -trim β€” remove trailing Xs and *s.
    • -part5 β€” CDS partial at 5' end.
    • -part3 β€” CDS extends past 3' end.
    • -every β€” translate all codons.
    • -between str β€” optional string between residues.
    • -all β€” simultaneous six-frame translations.
    • -circular β€” reprocess the first two priming bases at the end.
    • -orf β€” only capitalize residues at start states.
    • -max N β€” number of residues per line.
  • -molwt β€” calculate the molecular weight of a peptide. it's giving chemistry πŸ’…
    • -met β€” do not cleave the leading methionine.
    • -fmet β€” retain leading formyl-methionine.

Variation Processing πŸ¦‹

  • -hgvs β€” convert Human Genome Variation Society variation format to XML.

Sequence Comparison πŸ”

  • -counts β€” print a summary of base or residue counts.
  • -diff β€” compare two aligned files for point differences.
  • -codons β€” display nucleotide codons above amino acid residues.
    • -nuc seq β€” nucleotide sequence.
    • -prot seq β€” protein sequence.
    • [-frame N] β€” offset in nucleotide sequence.
    • [-three] β€” use three-letter residue abbreviations.

Sequence Searching πŸ”Ž

  • -search β€” search for one or more patterns in a sequence, skipping any FASTA definition line (the one with a leading >). each pattern can have an optional alias, like GGATCC:BamHI.
    • -protein β€” do not expand nucleotide ambiguity characters.
    • -circular β€” match patterns spanning the origin of a circular molecule.
    • -top β€” do not search reverse complements of non-palindromic patterns.
    • pattern β€” pattern to search for.

Text Searching πŸ“

  • -find β€” find one or more patterns in text, allowing digits, spaces, punctuation, and phrases, like "double, double toil and trouble". shakespeare coded, no cap 🎭
    • -relaxed β€” match on words with letters and digits, ignoring spacing and punctuation.
    • -sensitive β€” case-sensitive match, distinguishing upper-case and lower-case letters.
    • -whole β€” match on whole words or multi-word phrases; implies -relaxed.
    • pattern β€” pattern to search for.

String Transformations πŸͺ„

XML

  • -encodeXML β€” XML-encode <, >, &, ", and ' characters.
  • -decodeXML β€” decode XML entity references.
  • -plainXML β€” remove embedded mixed-content tags and compress runs of spaces.

URL

  • -encodeURL β€” compress runs of spaces, and URI-escape the result.
  • -decodeURL β€” URI-unescape the input.

Base64

  • -encode64 β€” Base64-encode the input.
  • -decode64 β€” Base64-decode the input.

Accent

  • -plain β€” strip accents from the input.

Case

  • -upper β€” convert the input to uppercase.
  • -lower β€” convert the input to lowercase.

Protein πŸ₯š

  • -aa1to3 β€” convert amino acids from 1-character to 3-character format.
  • -aa3to1 β€” convert amino acids from 3-character to 1-character format.

Letters plus Digits πŸ”’

  • -relax β€” remove all punctuation and compress whitespace.

Customized XML Reformatting ✨

  • -format [fmt] β€” pick your formatting vibe:
    • compact β€” compress runs of spaces.
    • flush β€” suppress line indentation.
    • indent β€” indent according to nesting depth.
    • expand β€” place each attribute on a separate line.
    • -xml declaration β€” use the given XML declaration.
    • -doctype declaration β€” use the given document type declaration.
    • -comment β€” preserve comments.
    • -cdata β€” preserve cdata blocks.
    • -combine β€” if the input contains multiple top-level documents, combine them.
    • -self β€” keep empty self-closing tags.
    • -unicode style β€” how to handle Unicode superscript and subscript digits (they get converted to ASCII form first in all cases, every single time):
      • fuse β€” run them all together, with no additional markup.
      • space β€” add spaces between digits in different positions.
      • period β€” add periods between digits in different positions.
      • brackets β€” surround superscripts by square brackets and subscripts by parentheses.
      • markdown β€” surround superscripts with carets and subscripts with tildes.
      • slash β€” add backslashes when going up in height and forward slashes when going down.
      • tag β€” put superscripts in XML sup elements and subscripts in sub elements.
    • -script style β€” how to handle XML sup and sub elements (those are superscripts and subscripts, respectively):
      • brackets β€” surround superscripts by square brackets and subscripts by parentheses.
      • markdown β€” surround superscripts with carets and subscripts with tildes.
    • -mathml terse β€” flatten MathML markup tersely.

XML Modification πŸ› οΈ

  • -filter element action target

Actions:

  • retain β€” keep matching elements (a no-op, literally does nothing bestie).
  • remove β€” remove matching elements.
  • encode β€” HTML-escape special characters.
  • decode β€” decode HTML escapes.
  • shrink β€” compress runs of spaces.
  • expand β€” place each attribute on a separate line.
  • accent β€” strip off Unicode accents.

Targets:

  • content β€” plain-text content.
  • cdata β€” CDATA blocks.
  • comment β€” comments.
  • object β€” the whole object.
  • attributes β€” attributes.
  • container β€” start and end tags.

EFetch XML Normalization 🧚

  • -normalize database β€” adjust XML fields so they conform to common conventions.

🌸 SEE ALSO 🌸

okay bestie, if you're obsessed with transmute (and honestly? same πŸ’…) here's the whole squad of sibling tools you're gonna want to know. go give them a lil follow, they all ate:

  • align-columns(1)
  • blst2tkns(1)
  • bsmp2info(1)
  • cit2pmid(1)
  • csv2xml(1)
  • disambiguate-nucleotides(1)
  • download-flatfile(1)
  • download-pubmed(1)
  • ds2pme(1)
  • efetch(1)
  • filter-columns(1)
  • filter-genbank(1)
  • gbf2info(1)
  • gbf2tbl(1)
  • gff2xml(1)
  • gff-sort(1)
  • jsonl2xml(1)
  • pma2apa(1)
  • pma2pme(1)
  • pmc2bioc(1)
  • pmc2info(1)
  • print-columns(1)
  • ref2pmid(1)
  • snp2tbl(1)
  • sort-table(1)
  • spdi2tbl(1)
  • systematic-mutations(1)
  • tbl2prod(1)
  • uniq-table(1)
  • xml2fsa(1)
  • xml2tbl(1)
  • xfetch(1)
  • xtract(1)

and that's a wrap on the whole page, bestie!! πŸŽ€βœ¨ this iconic little manual was brought to you by the fine folks at NCBI πŸ‘‘, dated 2025-05-26, and it lives under the name TRANSMUTE(1) in your friendly neighborhood section 1. now go transmute something, you absolute legend πŸ’–πŸ¦‹

πŸ“¦ where this page comes from