samtools

package
v0.0.0-...-85e8820 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package samtools wraps the samtools cli to be used with Go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pileup

func Pileup(ctx context.Context, templateFasta fasta.Record, samAlignments io.Reader, w io.Writer) error

Pileup generates a pileup file from sam alignments. Specifically, it runs the following commands, with the sam alignments in stdin and the templateFasta written to a temporary file:

`samtools view -bF 4 | samtools sort - | samtools mpileup -f tmpFile.fasta -`

The first samtools view removes unmapped sequences, the sort sorts the sequences for piping into pileup, and the final command builds the pileup file.

func PileupChanneled

func PileupChanneled(ctx context.Context, templateFasta fasta.Record, samChan <-chan sam.Alignment, w io.Writer) error

PileupChanneled processes SAM alignments from a channel and sends pileup lines to another channel.

Types

This section is empty.

Jump to

Keyboard shortcuts

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