MSA_SPLIT(1)
๐ msa_split(1) โ the manual, but make it make sense ๐
okay bestie, listen โ this is the msa_split manual page, and it's genuinely one of the good ones. It's a User Command, it's giving "I slice up multiple sequence alignments for a living," and honestly? She ate. Let's go. ๐ฆ
โจ NAME โจ
msa_split โ Partitions a multiple sequence alignment either at designated
yes, the sentence really does stop right there in the original, no cap, that's just how it is ๐
๐ธ DESCRIPTION ๐ธ
So what she does is: she takes a multiple sequence alignment and partitions it โ either at columns you designate yourself, or according to category labels you specify. Then she spits out sub-alignments for each of those partitions. And as a lil bonus? She can optionally split an associated annotations file too. Multi-tasking queen. ๐
๐ EXAMPLE ๐
(deets on all the options are down below, don't worry)
1. Read an alignment for a whole human chromosome from a MAF file and extract sub-alignments in 1Mb windows overlapping by 1kb. Use sufficient statistics (SS) format for output (can be used by phyloFit, phastCons, or exoniphy). Set window boundaries between alignment blocks, if possible.
msa_split chr1.maf --refseq chr1.fa --in-format MAF --windows 1000000,1000 --out-format SS --between-blocks 5000 --out-root chr1
(Windows will be defined using the coordinate system of the first sequence in the alignment, assumed to be the reference sequence; output will be to chr1.1-1000000.ss, chr1.999001-1999000.ss, ...)
2. As in (1), but report unordered sufficient statistics (much more compact and adequate for use with phyloFit).
msa_split chr1.maf --refseq chr1.fa --in-format MAF --windows 1000000,1000 --out-format SS --between-blocks 5000 --out-root chr1 --unordered-ss
3. Extract sub-alignments of sites in conserved elements and not in conserved elements, as defined by a BED file (coordinates assumed to be for 1st sequence). Read multiple alignment in FASTA format.
msa_split mydata.fa --features conserved.bed --by-category --out-root mydata
(Output will be to mydata.background-0.fa and mydata.bed_feature-1.fa [latter has sites of category number 1, defined by bed file]
3. Extract sub-alignments of sites in each of the three codon positions, as defined by a GFF file (coordinates assumed to be for 1st sequence). Reverse complement genes on minus strand.
msa_split chr22.maf --in-format MAF --features chr22.gff --by-category --catmap "NCATS 3 ; CDS 1-3" --do-cats CDS --reverse-compl --out-root chr22 --out-format SS
(Output will be to chr22.cds-1.ss, chr22.cds-2.ss, chr22.cds-3.ss)
4. Split an alignment into pieces corresponding to the genes in a GFF file. Assume genes are defined by the tag "transcript_id".
msa_split cftr.fa --features cftr.gff --by-group transcript_id
5. Obtain a sub-alignment for each of a set of regulatory regions, as defined in a BED file.
msa_split chr22.maf --in-format MAF --refseq chr22.fa --features chr22.reg.bed --for-features --out-root chr22.reg
โจ OPTIONS โจ
๐ง Splitting options
--windows,-w<win_size,win_overlap>โ Chop the alignment up into "windows" that are<win_size>bases long, overlapping each other by<win_overlap>. Slicing era. ๐ช--by-category,-Lโ (Requires--features) Split by category, as defined by the annotations file and (optionally) the category map (peep--catmap).--by-group,-P<tag>โ (Requires--features) Split by groups in the annotation file, as defined by the tag you specify. She splits midway between every pair of consecutive groups. Features will be sorted by group. There should be no overlapping features (see'refeature --unique').--for-features,-Fโ (Requires--features) Extract the section of the alignment corresponding to every single feature. Regions that no feature covers? No output for them, bestie. Silence. ๐--by-index,-p<indices>โ A list of explicit indices at which to split the alignment (comma-separated). If the list of indices is"10,20", then sub-alignments will be output for sites 1-9, 10-19, and 20-<msa_len>. Heads up: those indices are relative to the input alignment, and not necessarily in genomic coordinates. ๐--npartitions,-n<number>โ Split the alignment equally into the number of partitions you asked for. Fair and balanced. โ๏ธ--between-blocks,-B<radius>โ (Not for use with--by-categoryor--for-features) Try to partition at sites between alignment blocks. Assumes a reference sequence alignment, with the first sequence as the reference seq (as created bymultiz). Blocks of 30 sites with gaps in all sequences but the reference seq are assumed to indicate boundaries between alignment blocks. Partition indices will not be moved more than<radius>sites. ๐งฑ--features,-g<fname>โ (For use with--by-category,--by-group,--for-features, or--windows) The annotations file. May be GFF, BED, or genepred format. Coordinates are assumed to be in the coordinate frame of the first sequence in the alignment (assumed to be the reference sequence). ๐บ๏ธ--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".--refidx,-d<frame_index>โ (For use with--windowsor--by-index) Index of the frame of reference for split indices. Default is 1 (1st sequence assumed reference).
๐ File names & formats, type of output, etc.
--in-format,-iFASTA|PHYLIP|MPM|MAF|SSโ Input alignment file format. Default is to guess the format from the file contents. ๐ฎ--refseq,-M<fname>โ (For use with--in-format MAF) Name of the file containing the reference sequence, in FASTA format.--out-format,-oFASTA|PHYLIP|MPM|SSโ Output alignment file format. Default isFASTA.--out-root,-r<name>โ Filename root for output files (default"msa_split"). ๐ฑ--sub-features,-fโ (For use with--features) Output subsets of features corresponding to subalignments. Features overlapping partition boundaries will be discarded. Not permitted with--by-category. ๐๏ธ--reverse-compl,-sโ Reverse complement all segments having at least one feature on the reverse strand and none on the positive strand. For use with--by-group. Can also be used with--by-categoryto ensure all sites in a category are represented in the same strand orientation. ๐--gap-strip,-GALL|ANY|<seqno>โ Strip columns in output alignments containing all gaps, any gaps, or gaps in the specified sequence (<seqno>; indexing begins with one). Default is not to strip any columns. ๐งน--seqs,-l<seq_list>โ Include only the specified sequences in the output. Indicate them by sequence number or name (numbering starts with 1 and is evaluated after--orderis applied). ๐--exclude,-xโ Exclude rather than include the specified sequences. Flip the vibe. ๐--order,-O<name_list>โ Change the order of rows in the alignment to match the sequence names specified inname_list. And if a name shows up inname_listbut not in the alignment? A whole row of gaps gets inserted. Dramatic but valid. ๐--min-informative,-I<n>โ Only output alignments having at least<n>informative sites (sites at which at least two non-gap and non-N gaps are present).--do-cats,-C<cat_list>โ (For use with--by-category) Output sub-alignments for only the specified categories (column-delimited list).--tuple-size,-T<tuple_size>โ (for use with--by-categoryor--out-format SS) Size of tuples of columns to consider in downstream analysis (e.g., with context-dependent phylogenetic models; see'phyloFit'). With--by-category, inserttuple_size-1 columns of missing data between sites that were not adjacent in the original alignment, to avoid creating artificial context. With--out-format SS, express sufficient statistics in terms of tuples of the specified size. ๐งฎ--unordered-ss,-zโ (For use with--out-format SS) Suppress the portion of the sufficient statistics concerned with the order in which columns appear.--summary,-Sโ Output a summary of each output alignment to a file with suffix".sum"(includes base frequencies and numbers of gapped columns). ๐
๐ Other
--quiet,-qโ Proceed quietly. ๐คซ--help,-hโ Print this help message.
and that's the whole page, bestie โ every flag, every default, every warning, nothing skipped ๐
This was msa_split version 1.4, from May 2016 โ a true vintage icon of a User Command. Stay slay, stay partitioned. ๐ซถโจ
๐ฆ 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