MAF_PARSE(1)
π MAF_PARSE π
okay bestie, gather round, because we're talking about maf_parse from the User Commands corner of the manual, and honestly? she's that girl. π
β¨ NAME β¨
maf_parse β Reads a MAF file and perform various operations on it.
πΈ DESCRIPTION πΈ
So basically, maf_parse reads a MAF file and performs various operations on it. It parses block-by-block whenever it can instead of being dramatic and storing the entire alignment in memory, which is giving main character energy but like, efficiently. π§
She can extract a sub-alignment from an alignment β by row or by column, she's flexible like that. She can extract features given a GFF, BED, or genepred file. She can even pull out sub-features like CDS1,2,3 or 4d sites. And she can do all the little functions you'd want, like gap stripping or re-ordering of sequences. Iconic. π
She's capable of reading and writing in a few common formats, no cap β but here's the tea: she will not load input or output alignments into memory if the output format is MAF. So that's the tradeoff, and it's a good one.
π OPTIONS π
πΎ Output format
--out-format,-oMAF|PHYLIP|FASTA|MPM|SS(DefaultMAF) β the output file format, periodt. Heads up:SSformat is only available un-ordered. Also note that some options β the ones that involve reversing alignments based on strand, or stripping gaps β cannot be output in MAF format and use FASTA by default. And one more thing: when the output format is notMAF, the entire output must be loaded into memory. π--pretty,-pβ pretty-print the alignment (uses'.'when a character matches the corresponding character in the first sequence). Lowkey ignored if--out-format SSis selected. β¨
𧬠Obtaining sub-alignments and re-ordering rows
--start,-s<start_col>β start index of the sub-alignment (indexing starts with 1, bestie, not 0). Coordinates are in terms of the reference sequence unless the--no-refseqoption is used, in which case they're in terms of alignment columns. Default is1.--end,-e<end_col>β end index of the sub-alignment. Default is the length of the alignment. Coordinates are defined the same way as the--startoption, above. π«Ά--seqs,-l<seq_list>β comma-separated list of sequences to include (that's the default) or exclude (if you use--exclude). You can indicate them by sequence number or name β and numbering starts with 1 and is evaluated after--orderis applied. iykyk.--exclude,-xβ exclude rather than include the specified sequences. That's it, that's the vibe. π--order,-O<name_list>β change the order of the rows in the alignment to match the sequence names specified inname_list. The first name in the alignment becomes the reference sequence. Glow-up for your rows. π--no-refseq,-nβ do not assume the first sequence in the MAF is the refseq. Instead, use coordinates given by absolute position in the alignment (starting from 1). π₯
βοΈ Splitting into multiple MAFs by length
--split,-Slengthβ split the MAF into pieces by length, and put the output inoutRootX.maf, whereX=1,2,...,numPieces. TheoutRootcan be modified with--out-root, and the minimum number of digits inXcan be modified with--out-root-digits. She splits between blocks, so that each output file does not exceed the specified length. By default, length is counted by the distance spanned in the alignment by the refseq, unless--no-refseqis specified. β¨--out-root,-r<name>β filename root for output files produced by--split(default"maf_parse").--out-root-digits,-d<numdigits>β (for use with--split). The minimum number of digits used to index each output file produced by split. π’
π Extracting features from MAF
--features,-g<fname>β the annotations file. May beGFF,BED, orgenepredformat. Coordinates are assumed to be in the frame of the first sequence of the alignment (the reference sequence). By default, this outputs the subset of the MAF which are labeled in the annotations file. But it can be used with--by-category,--by-group, and/or--do-catsto split the MAF by annotation type. Or, if used with--mask-features, it's only used to determine regions to mask. Implies--strip-i-lines,--strip-e-lines. π--by-category,-Lβ (requires--features). Split by category, as defined by the annotations file and (optionally) the category map (see--catmap).--do-cats,-C<cat_list>β (for use with--by-category) output sub-alignments for only the specified categories.--catmap,-c<fname>|<string>β (optionally use with--by-category) mapping of feature types to category numbers. You can either give a filename or an "inline" description of a simple category map, e.g.
--catmap "NCATS = 3 ; CDS 1-3"
or
--catmap "NCATS = 1; UTR 1"
--by-group,-P<tag>β (requires--features). Split by groups in the annotation file, as defined by the specified tag. π
ποΈ Masking by quality score
--mask-bases,-b<qscore>β mask all bases with quality score<= n. Note thatnis in the same units as displayed in the MAF (ranging from0-9), and representsmin(9, floor(PHRED_score/5)). Bases without any quality score will not be masked. π--masked-file,-m<filename>β (for use with--mask-bases). Write a file containing all the regions masked for low quality. The file will be in0-based coordinates relative to the refseq, with an additional column giving the name of the species masked. Note that low-quality bases masked at alignment columns with a gap in the reference sequence may not be represented in the output file. π--mask-features-M<spec>β (requires--features). Mask all bases annotated in features in the given species (can be a comma-delimited list of species). Note that coordinates are always in terms of refseq, even if a different species is being masked. πΈ
π Other
--strip-i-lines,-Iβ remove lines in the MAF starting withi.--strip-e-lines,-Eβ remove lines in the MAF starting withe.--help,-hβ print this help message. She's always there for you, bestie. π«Ά
vibe check passed: every flag, every default, every coordinate rule, and every little caveat is still in there. Nothing got dropped, nothing got invented. π
and that's a wrap on maf_parse, written by the maf_parse 1.4 girlies back in May 2016 β yes she's been slaying since 2016 and she's still iconic. go parse something, bestie, you've got this π
β¨π¦
π¦ where this page comes from
- debian bookworm: phast 1.6+dfsg-3+b1 Β· BSD-3-Clause
- debian trixie: phast 1.7+dfsg-2 Β· BSD-3-Clause
- ubuntu jammy: phast 1.6+dfsg-3 Β· BSD-3-Clause
- ubuntu noble: phast 1.6+dfsg-4 Β· BSD-3-Clause
- ubuntu questing: phast 1.7+dfsg-3
- ubuntu resolute: phast 1.8+dfsg-1 Β· BSD-3-Clause
- ubuntu stonking: phast 1.8+dfsg-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms