amplicons

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: MIT Imports: 15 Imported by: 1

Documentation

Overview

Package amplicons performs the amplicon scheme validation, handling and filtering for Archer.

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrNoSchemeName is returned when primer scheme name is not provided
	ErrNoSchemeName = errors.New("no primer scheme name provided")

	// ErrNoSchemeVersion is returned when a bad or non-existent scheme version is provided
	ErrNoSchemeVersion = errors.New("request scheme version must be >= 0")
)

Functions

func CheckManifest

func CheckManifest(manifest *api.Manifest, requestedScheme string, requestedVersion int32) (string, error)

CheckManifest will check a scheme and version are found in the manifest. It will return the scheme tag to use to download this scheme, or any error in checking the manifest.

func GetManifest

func GetManifest(manifestURL string) (*api.Manifest, error)

GetManifest will download the ARTIC primer scheme manifest and populate an in memory manifest.

Types

type Amplicon

type Amplicon struct {
	// contains filtered or unexported fields
}

Amplicon stores the minimal information needed by Archer to perform FASTQ filtering for amplicon enrichment.

type AmpliconSet

type AmpliconSet map[string]*Amplicon

AmpliconSet is a collection amplicons produced by a primer scheme.

func NewAmpliconSet

func NewAmpliconSet(manifest *api.Manifest, requestedScheme string, requestedVersion int32) (*AmpliconSet, error)

NewAmpliconSet downloads the primer set and reference sequence for a primer scheme in the manifest and returns an AmpliconSet.

func (AmpliconSet) GetMeanSize

func (as AmpliconSet) GetMeanSize() int

GetMeanSize returns the mean amplicon size. Primers and inserts are included.

func (AmpliconSet) GetTopHit

func (as AmpliconSet) GetTopHit(read []byte) (string, float64, error)

GetTopHit will compare a read against a each amplicon in the set and return the name of the amplicon with the best match, plus the Jaccard distance and any error.

Jump to

Keyboard shortcuts

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