seqio

package
v0.0.0-...-cbd5ca3 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package seqio contains custom types and methods for holding and processing sequence data

Index

Constants

View Source
const FASTQ_ENCODING = 33

FASTQ_ENCODING used by the FASTQ file

Variables

This section is empty.

Functions

This section is empty.

Types

type FASTQread

type FASTQread struct {
	Sequence
	Misc []byte
	Qual []byte
	RC   bool
}

FASTQread is a type that holds a single FASTQ read, along with the locations it mapped to

func NewFASTQread

func NewFASTQread(l1 []byte, l2 []byte, l3 []byte, l4 []byte) (*FASTQread, error)

NewFASTQread is the constructor function, which takes 4 lines of a fastq entry and returns the FASTQread object TODO: this is garbage - needs replacing

func (*FASTQread) QualityTrim

func (FASTQread *FASTQread) QualityTrim(minQual int)

QualityTrim is a method to quality trim the sequence held by a FASTQread

the algorithm is based on bwa/cutadapt read quality trim functions:

-1. for each index position, subtract qual cutoff from the quality score -2. sum these values across the read and trim at the index where the sum in minimal -3. return the high-quality region

func (*FASTQread) ReverseComplement

func (FASTQread *FASTQread) ReverseComplement()

ReverseComplement is a method to reverse complement a sequence held by a FASTQread

type Sequence

type Sequence struct {
	ID  []byte
	Seq []byte
}

Sequence is the base type for a FASTQ and FASTA read

func (*Sequence) BaseCheck

func (Sequence *Sequence) BaseCheck() error

BaseCheck is a method to check for ACTGN bases and also to convert bases to upper case TODO: more garbage - not efficient and doesn't handle non actgn

Jump to

Keyboard shortcuts

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