| 1 |
Pretty-Printing |
| 2 |
|
| 3 |
Reformat XML |
| 4 |
|
| 5 |
-x2p |
| 6 |
|
| 7 |
Reformat JSON |
| 8 |
|
| 9 |
-j2p |
| 10 |
|
| 11 |
Reformat FASTA |
| 12 |
|
| 13 |
-f2p |
| 14 |
|
| 15 |
Table column alignment |
| 16 |
|
| 17 |
-align |
| 18 |
|
| 19 |
-a Column alignment codes: |
| 20 |
|
| 21 |
l left |
| 22 |
c center |
| 23 |
r right |
| 24 |
n numeric align on decimal point |
| 25 |
N trailing zero-pad decimals |
| 26 |
z leading zero-pad integers |
| 27 |
m commas to group by 3 digits |
| 28 |
M commas plus zero-pad decimals |
| 29 |
w just print column widths |
| 30 |
|
| 31 |
-g Spacing between columns |
| 32 |
-h Indent before columns |
| 33 |
-w Minimum column width |
| 34 |
|
| 35 |
Data Conversion |
| 36 |
|
| 37 |
JSON stream to XML |
| 38 |
|
| 39 |
-j2x |
| 40 |
|
| 41 |
-set setWrapper |
| 42 |
-rec recordWrapper |
| 43 |
-nest [flat|recurse|plural|singular|depth|element] |
| 44 |
|
| 45 |
ASN.1 stream to XML |
| 46 |
|
| 47 |
-a2x |
| 48 |
|
| 49 |
-set setWrapper |
| 50 |
-rec recordWrapper |
| 51 |
|
| 52 |
Tab-delimited table to XML |
| 53 |
|
| 54 |
-t2x |
| 55 |
|
| 56 |
-set setWrapper |
| 57 |
-rec recordWrapper |
| 58 |
-skip linesToSkip |
| 59 |
-header |
| 60 |
-lower | -upper |
| 61 |
-indent | -flush |
| 62 |
|
| 63 |
XML object names per column |
| 64 |
|
| 65 |
Comma-separated values file to XML |
| 66 |
|
| 67 |
-c2x |
| 68 |
|
| 69 |
-set setWrapper |
| 70 |
-rec recordWrapper |
| 71 |
-skip linesToSkip |
| 72 |
-header |
| 73 |
-lower | -upper |
| 74 |
-indent | -flush |
| 75 |
|
| 76 |
XML object names per column |
| 77 |
|
| 78 |
Configuration files to XML |
| 79 |
|
| 80 |
-i2x INI format |
| 81 |
-m2x TOML format |
| 82 |
-y2x YAML format |
| 83 |
|
| 84 |
Text File Filtering |
| 85 |
|
| 86 |
-txf |
| 87 |
|
| 88 |
-pattern Pattern at start of record |
| 89 |
-exclude Reject if string is present |
| 90 |
-require Require presence of string |
| 91 |
-min Minimum record number |
| 92 |
-max Maximum record number |
| 93 |
|
| 94 |
FASTA stream to XML |
| 95 |
|
| 96 |
-f2x |
| 97 |
|
| 98 |
GenBank/GenPept flatfile to INSDSeq XML |
| 99 |
|
| 100 |
-g2x |
| 101 |
|
| 102 |
GenBank/GenPept to Reference Index XML |
| 103 |
|
| 104 |
-g2r |
| 105 |
|
| 106 |
Reference Index XML Lookup to Find PMID |
| 107 |
|
| 108 |
-r2p |
| 109 |
|
| 110 |
-options [confirm|verbose|fast|slow|exact] |
| 111 |
|
| 112 |
GenBank/GenPept Filtering |
| 113 |
|
| 114 |
-gbf Filter GenBank or GenPept flatfile release records |
| 115 |
|
| 116 |
-accession Single accession |
| 117 |
-accessions File of accessions |
| 118 |
-taxid Single taxon identifiers |
| 119 |
-taxids File of taxon identifiers |
| 120 |
-organism Organism scientific name |
| 121 |
-exclude Reject if string is present |
| 122 |
-require Require presence of string |
| 123 |
-truncate Remove features and sequence |
| 124 |
|
| 125 |
Sequence Editing |
| 126 |
|
| 127 |
-revcomp Reverse complement nucleotide sequence |
| 128 |
|
| 129 |
-remove Trim at ends of sequence |
| 130 |
|
| 131 |
-first Delete first N bases |
| 132 |
-last Delete last N bases |
| 133 |
|
| 134 |
-retain Save either end of sequence |
| 135 |
|
| 136 |
-leading Keep first N bases |
| 137 |
-trailing Keep last N bases |
| 138 |
|
| 139 |
-replace Apply base or residue substitution |
| 140 |
|
| 141 |
-offset Skip ahead by 0-based count (SPDI), or |
| 142 |
-column Move just before 1-based position (HGVS) |
| 143 |
|
| 144 |
-delete Delete N bases |
| 145 |
-insert Insert given sequence |
| 146 |
|
| 147 |
-lower Lower-case original sequence |
| 148 |
|
| 149 |
-extract Use xtract -insd feat_location instructions |
| 150 |
|
| 151 |
-1-based GenBank feat_location convention |
| 152 |
-0-based Alignment, or -insd feat_intervals |
| 153 |
-lower Lower-case extracted sequence |
| 154 |
|
| 155 |
Sequence Processing |
| 156 |
|
| 157 |
-cds2prot Translate coding region into protein |
| 158 |
|
| 159 |
-gcode Genetic code |
| 160 |
-frame Offset in sequence (0-based) |
| 161 |
-stop Include stop residue |
| 162 |
-trim Remove trailing Xs and *s |
| 163 |
-part5 CDS partial at 5' end |
| 164 |
-part3 CDS extends past 3' end |
| 165 |
-every Translate all codons |
| 166 |
-between Optional string between residues |
| 167 |
-all Simultaneous 6-frame translations |
| 168 |
-circular Reprocess first two priming bases at end |
| 169 |
-orf Only capitalize residues at start states |
| 170 |
-max Number of residues per line |
| 171 |
|
| 172 |
-molwt Calculate molecular weight of peptide |
| 173 |
|
| 174 |
-met Do not cleave leading methionine |
| 175 |
-fmet Retain leading formyl-methionine |
| 176 |
|
| 177 |
Variation Processing |
| 178 |
|
| 179 |
-hgvs Convert HGVS variation format to XML |
| 180 |
|
| 181 |
Sequence Comparison |
| 182 |
|
| 183 |
-counts Print summary of base or residue counts |
| 184 |
|
| 185 |
-diff Compare two aligned files for point differences |
| 186 |
|
| 187 |
-codons Display nucleotide codons above amino acid residues |
| 188 |
|
| 189 |
-nuc Nucleotide sequence |
| 190 |
-prt Protein sequence |
| 191 |
-frame Offset in nucleotide sequence |
| 192 |
-three Use 3 letter residue abbreviations |
| 193 |
|
| 194 |
Sequence Searching |
| 195 |
|
| 196 |
-search Search for patterns in sequence, skips FASTA definition line, |
| 197 |
each pattern can have optional alias, e.g., "GGATCC:BamHI" |
| 198 |
|
| 199 |
-protein Do not expand nucleotide ambiguity characters |
| 200 |
-circular Match patterns spanning origin of circular molecule |
| 201 |
-top Do not search reverse-complement of non-palindromic patterns |
| 202 |
|
| 203 |
Text Searching |
| 204 |
|
| 205 |
-find Find one or more patterns in text, allows digits, spaces, punctuation, |
| 206 |
and phrases, e.g., "double, double toil and trouble" |
| 207 |
|
| 208 |
-relaxed Match on words with letters and digits, ignore spacing, punctuation |
| 209 |
-sensitive Case-sensitive match distinguishes upper-case and lower-case letters |
| 210 |
-whole Match on whole words or multi-word phrases, also imposes -relaxed flag |
| 211 |
|
| 212 |
String Transformations |
| 213 |
|
| 214 |
XML |
| 215 |
|
| 216 |
-encodeXML |
| 217 |
-decodeXML |
| 218 |
|
| 219 |
-plainXML |
| 220 |
|
| 221 |
URL |
| 222 |
|
| 223 |
-encodeURL |
| 224 |
-decodeURL |
| 225 |
|
| 226 |
Base64 |
| 227 |
|
| 228 |
-encode64 |
| 229 |
-decode64 |
| 230 |
|
| 231 |
Accent |
| 232 |
|
| 233 |
-plain |
| 234 |
|
| 235 |
Case |
| 236 |
|
| 237 |
-upper |
| 238 |
-lower |
| 239 |
|
| 240 |
Protein |
| 241 |
|
| 242 |
-aa1to3 |
| 243 |
-aa3to1 |
| 244 |
|
| 245 |
Letters plus Digits |
| 246 |
|
| 247 |
-relax |
| 248 |
|
| 249 |
Customized XML Reformatting |
| 250 |
|
| 251 |
-format [compact|flush|indent|expand] |
| 252 |
|
| 253 |
-xml |
| 254 |
-doctype |
| 255 |
-comment |
| 256 |
-cdata |
| 257 |
-combine |
| 258 |
-self |
| 259 |
-unicode [fuse|space|period|brackets|markdown|slash|tag] |
| 260 |
-script [brackets|markdown] |
| 261 |
-mathml [terse] |
| 262 |
|
| 263 |
XML Modification |
| 264 |
|
| 265 |
-filter Object |
| 266 |
[retain|remove|encode|decode|shrink|expand|accent] |
| 267 |
[content|cdata|comment|object|attributes|container] |
| 268 |
|
| 269 |
EFetch XML Normalization |
| 270 |
|
| 271 |
-normalize [database] |
| 272 |
|
| 273 |
Examples |
| 274 |
|
| 275 |
-j2x -set - -rec GeneRec |
| 276 |
|
| 277 |
-t2x -set Set -rec Rec -skip 1 Code Name |
| 278 |
|
| 279 |
-filter ExpXml decode content |
| 280 |
|
| 281 |
-filter LocationHist remove object |
| 282 |
|
| 283 |
-normalize pubmed |
| 284 |
|
| 285 |
-wrp PubmedArticleSet -pattern PubmedArticle -format |
| 286 |
|
| 287 |
Sequence Substitution |
| 288 |
|
| 289 |
echo ATGAAACCCGGGTTTTAG | |
| 290 |
transmute -replace -offset 5 -delete 1 -insert G |
| 291 |
|
| 292 |
Protein Translation |
| 293 |
|
| 294 |
echo "CTAAAACCCGGGTTTCAT" | |
| 295 |
transmute -revcomp | |
| 296 |
transmute -cds2prot |
| 297 |
|
| 298 |
Variation Extraction |
| 299 |
|
| 300 |
echo "NP_000504.1:p.Glu41Lys,NP_000504.1:p.P43Leu,NP_000504.1:p.Trp142Ter" | |
| 301 |
transmute -hgvs | transmute -format |
| 302 |
|
| 303 |
Sequence Comparison |
| 304 |
|
| 305 |
transmute -diff <( echo "MKPGSQPVIY" ) <( echo "-KPGFQ*VIY" ) |
| 306 |
|
| 307 |
Translation of Coding Regions |
| 308 |
|
| 309 |
efetch -db nuccore -id U54469 -format gb | |
| 310 |
transmute -g2x | |
| 311 |
xtract -insd CDS sub_sequence | |
| 312 |
cut -f 2 | |
| 313 |
while read seq |
| 314 |
do |
| 315 |
echo "$seq" | |
| 316 |
transmute -cds2prot |
| 317 |
echo "" |
| 318 |
done |
| 319 |
|
| 320 |
Codon Translation Reports |
| 321 |
|
| 322 |
efetch -db nuccore -id U54469 -format gb | |
| 323 |
transmute -g2x | |
| 324 |
xtract -insd CDS sub_sequence | |
| 325 |
cut -f 2 | |
| 326 |
while read nuc |
| 327 |
do |
| 328 |
prt=$( echo "$nuc" | transmute -cds2prot -every ) |
| 329 |
transmute -codons -nuc "$nuc" -prt "$prt" -three |
| 330 |
echo "" |
| 331 |
done |
| 332 |
|
| 333 |
Mitochondrial Mistranslation |
| 334 |
|
| 335 |
efetch -db nuccore -id NC_012920 -format gb | |
| 336 |
transmute -g2x | |
| 337 |
xtract -insd CDS gene product protein_id translation sub_sequence | |
| 338 |
while IFS=$'\t' read acc gene prod prid prot seq |
| 339 |
do |
| 340 |
mito=$( echo "$seq" | transmute -cds2prot -gcode 2 -stop ) |
| 341 |
norm=$( echo "$seq" | transmute -cds2prot -gcode 1 -stop ) |
| 342 |
if [ "$mito" != "$norm" ] |
| 343 |
then |
| 344 |
echo ">$acc $gene $prid $prod" |
| 345 |
transmute -diff <( echo "$mito" ) <( echo "$norm" ) |
| 346 |
echo "" |
| 347 |
fi |
| 348 |
done |
| 349 |
|
| 350 |
Systematic Mutations |
| 351 |
|
| 352 |
echo ATGAAACCCGGGTTTTAG | |
| 353 |
while read seq |
| 354 |
do |
| 355 |
for (( i=0; i<${#seq}; i++ )) |
| 356 |
do |
| 357 |
ch="${seq:$i:1}" |
| 358 |
for sub in A C G T |
| 359 |
do |
| 360 |
echo "$seq" | |
| 361 |
transmute -replace -offset "$i" -delete "$ch" -insert "$sub" |
| 362 |
done |
| 363 |
done |
| 364 |
done | |
| 365 |
while read seq |
| 366 |
do |
| 367 |
tns=$( echo "$seq" | transmute -cds2prot ) |
| 368 |
mwt=$( echo "$tns" | transmute -molwt ) |
| 369 |
echo -e "${seq}\t${tns}\t${mwt}" |
| 370 |
done |
| 371 |
|
| 372 |
Sequence Search |
| 373 |
|
| 374 |
efetch -db nuccore -id J01749 -format fasta | |
| 375 |
transmute -search -circular AAGCTT:HindIII CAGCTG CTGCAG GAATTC:EcoRI GGATCC:BamHI |
| 376 |
|
| 377 |
Nucleotide Expansion |
| 378 |
|
| 379 |
expanded=$( |
| 380 |
echo GTMKAC | disambiguate-nucleotides | |
| 381 |
tr '\n' ':' | sed -e 's/:/:AccI /g' |
| 382 |
) |
| 383 |
efetch -db nuccore -id J01749 -format fasta | |
| 384 |
transmute -search -circular "$expanded" |
| 385 |
|
| 386 |
Minus-Strand Pattern |
| 387 |
|
| 388 |
efetch -db nuccore -id U00096 -format fasta | |
| 389 |
transmute -search -circular ATGACCATGATTACGGATT |
| 390 |
|
| 391 |
SNP Table |
| 392 |
|
| 393 |
efetch -db snp -id 11549407 -format docsum | |
| 394 |
snp2tbl |
| 395 |
|
| 396 |
Matching CDS/Protein Pairs |
| 397 |
|
| 398 |
efetch -db snp -id 11549407 -format docsum | |
| 399 |
snp2hgvs | hgvs2spdi | spdi2tbl | |
| 400 |
align-columns -g 4 | cut -c 1-78 |