Documentation ¶
Overview ¶
Package sam provides functionality to handle sam format files.
It was written to process pairwise alignments between assembled SARS-CoV-2 genomes from minimap2.
Its main purpose is to generate fasta format alignments. It also has a routine to list mutations between pairs of sequences.
Index ¶
- func Indels(samFile io.Reader, insOut, delOut io.Writer, threshold int) error
- func ToMultiAlign(samIn io.Reader, out io.Writer, wrap int, trimstart int, trimend int, pad bool, ...) error
- func ToPairAlign(samIn, ref io.Reader, outpath string, wrap int, trimStart int, trimEnd int, ...) error
- func Variants(samIn, refIn io.Reader, refFromFile bool, annoIn io.Reader, annoSuffix string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToMultiAlign ¶
func ToMultiAlign(samIn io.Reader, out io.Writer, wrap int, trimstart int, trimend int, pad bool, threads int) error
ToMultiAlign converts a SAM file containing pairwise alignments between assembled genomes to a fasta-format alignment. Insertions relative to the reference are discarded, so all the sequences are the same (=reference) length
func ToPairAlign ¶
func ToPairAlign(samIn, ref io.Reader, outpath string, wrap int, trimStart int, trimEnd int, omitRef bool, omitIns bool, threads int) error
ToPairAlign converts a SAM file containing pairwise alignments between assembled genomes into pairwise fasta-format alignments, optionally including the reference sequence and insertions relative to it, optionally trimmed to coordinates in (degapped-)reference space
func Variants ¶
func Variants(samIn, refIn io.Reader, refFromFile bool, annoIn io.Reader, annoSuffix string, out io.Writer, start, end int, aggregate bool, threshold float64, appendSNP bool, threads int) error
Variants annotates amino acid, insertion, deletion, and nucleotide (anything outside of codons with an amino acid change) mutations relative to a reference sequence from pairwise alignments in sam format. Genome annotations are derived from a annotation file in genbank or gff version 3 format
Types ¶
This section is empty.