sam

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 18 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Indels

func Indels(samFile io.Reader, insOut, delOut io.Writer, threshold int) error

Indels gets raw indel information from the cigar + sequence fields of a sam file

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL