Documentation
¶
Overview ¶
Package msa reads and writes multiple sequence alignments in FASTA, A2M or A3M formats.
Index ¶
- func Read(reader io.Reader) (seq.MSA, error)
- func ReadFasta(reader io.Reader) (seq.MSA, error)
- func ReadStockholm(r io.Reader) (seq.MSA, error)
- func ReadStockholmTrusted(r io.Reader) (seq.MSA, error)
- func ReadTrusted(reader io.Reader) (seq.MSA, error)
- func ReadTrustedFasta(reader io.Reader) (seq.MSA, error)
- func WriteA2M(w io.Writer, msa seq.MSA) error
- func WriteA3M(w io.Writer, msa seq.MSA) error
- func WriteFasta(w io.Writer, msa seq.MSA) error
- func WriteStockholm(w io.Writer, msa seq.MSA) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Read ¶
Read will read a single MSA from the input, where the input can be formatted in A2M or A3M formats. Sequences are read until io.EOF.
If you need to read FASTA aligned format, use ReadFasta.
func ReadFasta ¶
Read will read a single MSA from the input, where the input can be formatted in FASTA format. Sequences are read until io.EOF.
If you need to read A2M or A3M aligned formats, use Read.
func ReadStockholm ¶
ReadStockholm reads an MSA from a Stockholm formatted file. Note that features are completely ignored. This reader only checks for the Stockholm header (and version), and then slurps up the sequence data into an MSA.
func ReadStockholmTrusted ¶
ReadStockholmTrusted is the same as ReadStockholm, except it does not check if each residue is valid. This may be faster.
func ReadTrusted ¶
ReadTrusted will read a single MSA from trusted input, where the input can be formatted/ in A2M or A3M formats. Sequences are read until io.EOF.
"Trust" in this context means that the input doesn't contain any illegal characters in the sequence. Trusting the input should be faster.
If you need to read FASTA aligned format, use ReadTrustedFasta.
func ReadTrustedFasta ¶
ReadTrustedFasta will read a single MSA from trusted input, where the input can be formatted/ in FASTA format. Sequences are read until io.EOF.
"Trust" in this context means that the input doesn't contain any illegal characters in the sequence. Trusting the input should be faster.
If you need to read A2M or A3M aligned formats, use ReadTrusted.
func WriteA2M ¶
WriteA2M writes a multiple sequence alignment to the output in A2M format. A2M format uses upper case characters to indicate matches, lower case and '.' characters to indicate insertions, and '-' characters to indicate deletions.
func WriteA3M ¶
WriteA3M writes a multiple sequence alignment to the output in A3M format. A3M format uses upper case characters to indicate matches, lower case characters to indicate insertions, and '-' characters to indicate deletions.
A3M format is a more compact way to write an MSA than FASTA or A2M.
func WriteFasta ¶
WriteFasta writes a multiple sequence alignment to the output in aligned FASTA format. Aligned FASTA format uses upper case characters to indicate matches, lower case characters to indicate insertions, and '-' characters to indicate deletions/insertions.
func WriteStockholm ¶
WriteStockholm writes the given MSA to the writer in the Stockholm format. This does not write any features. It only creates a minimal valid Stockholm file with the header (and version) along with the sequences (names and residues).
Types ¶
This section is empty.