blastm8

package
v0.0.0-...-f5125eb Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package blastm8 allows reading and parsing of m8-formatted blast files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Procfile

func Procfile(iblast *bufio.Reader, queryChan chan<- *BlastBlock)

ProcFile reads the query results from a blast m8-formatted file and passes the results to the queryChan channel. What is passed is the raw block of lines corresponding to a single query in the blast file.

Types

type BlastBlock

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

BlastBlock represents a block of Blast hits

func (BlastBlock) String

func (b BlastBlock) String() string

String stringify a BlastBlock

type Header []byte

Header represents a Query or Subject -- typical headers of nr/nt as they appear in blast-m8 results

type Hit

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

Hit gives single Blast hit information

func (*Hit) Bitsc

func (h *Hit) Bitsc() float64

Bitsc returns the bit score of the corresponding Hit

func (*Hit) GI

func (h *Hit) GI() int

GI returns the GI of the corresponding Hit

func (Hit) String

func (h Hit) String() string

String stringify a hit

type Hits

type Hits []*Hit

Hits represent a collection of hits

func (Hits) Len

func (h Hits) Len() int

Sort interface for Hits by bitscore

func (Hits) Less

func (h Hits) Less(i, j int) bool

Sort interface for Hits by bitscore

func (Hits) Swap

func (h Hits) Swap(i, j int)

Sort interface for Hits by bitscore

type QueryRes

type QueryRes struct {
	Query Header
	Hits  Hits
}

QueryRes has the needed information about the hits of a query

func ParseRecord

func ParseRecord(bb BlastBlock, scLim float64) *QueryRes

ParseRecord parses the lines for a query (blast m8-formatted) and write the information in a QueryRes Only the lines with bit score greater than the best score * scLim are processed

func (QueryRes) String

func (t QueryRes) String() string

String Stringifies a query result

Jump to

Keyboard shortcuts

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