Documentation
¶
Index ¶
Constants ¶
const VERSION = "0.11.0"
VERSION of seqkit
Variables ¶
var RootCmd = &cobra.Command{ Use: "seqkit", Short: "a cross-platform and ultrafast toolkit for FASTA/Q file manipulation", Long: fmt.Sprintf(`SeqKit -- a cross-platform and ultrafast toolkit for FASTA/Q file manipulation Version: %s Author: Wei Shen <shenwei356@gmail.com> Documents : http://bioinf.shenwei.me/seqkit Source code: https://github.com/shenwei356/seqkit Please cite: https://doi.org/10.1371/journal.pone.0163962 `, VERSION), }
RootCmd represents the base command when called without any subcommands
var Threads = runtime.NumCPU()
Threads for bread.NewBufferedReader()
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func SubLocationFlanking ¶ added in v0.11.0
SubLocationFlanking returns location of a flanking range (begin:end, relative to amplicon). B/E: 0-based, location of amplicon. begin/end: 1-based, begin: relative location to 5' end of amplicon, end: relative location to 3' end of amplicon. Returned locations are 1-based.
F
-----===============-----
-3-1 x/y
1 3 5 x/y
F R
-----=====-----=====-----
===== -5:-1
=== -5:-3
===== 1:5
=== 3:5
================= -1:1
========================= -5:5
x:-y (invalid)
func SubLocationInner ¶ added in v0.11.0
SubLocationInner returns location of a range (begin:end, relative to amplicon). B/E: 0-based, location of amplicon. begin/end: 1-based, begin: relative location to 5' end of amplicon, end: relative location to 3' end of amplicon. Returned locations are 1-based.
F
-----===============-----
1 3 5 x/y
-5-3-1 x/y
F R
-----=====-----=====----- x:y
=============== 1:-1
======= 1:7
===== 3:7
===== 6:10
===== -10:-6
===== -7:-3
-x:y (invalid)
Types ¶
type AmpliconFinder ¶ added in v0.11.0
type AmpliconFinder struct {
Seq []byte
F []byte // Forward primer
R []byte // R should be reverse complementary sequence of reverse primer
MaxMismatch int
FMindex *fmi.FMIndex
// contains filtered or unexported fields
}
AmpliconFinder is a struct for locating amplicon via primer(s).
func NewAmpliconFinder ¶ added in v0.11.0
func NewAmpliconFinder(sequence, forwardPrimer, reversePrimerRC []byte, maxMismatch int) (*AmpliconFinder, error)
NewAmpliconFinder returns a AmpliconFinder struct.
func (*AmpliconFinder) Locate ¶ added in v0.11.0
func (finder *AmpliconFinder) Locate() ([]int, error)
Locate returns location of amplicon. Locations are 1-based, nil returns if not found.
func (*AmpliconFinder) LocateRange ¶ added in v0.11.0
func (finder *AmpliconFinder) LocateRange(begin, end int, flanking bool) ([]int, error)
LocateRange returns location of the range (begin:end, 1-based).
type BedFeature ¶
type BedFeature struct {
Chr string
Start int // 1based
End int // end included
Name *string
Strand *string
}
BedFeature is the gff BedFeature struct
func ReadBedFeatures ¶
func ReadBedFeatures(file string) ([]BedFeature, error)
ReadBedFeatures returns gtf BedFeatures of a file
func ReadBedFilteredFeatures ¶
func ReadBedFilteredFeatures(file string, chrs []string) ([]BedFeature, error)
ReadBedFilteredFeatures returns gtf BedFeatures of selected chrs from file
type Config ¶
type Config struct {
Alphabet *seq.Alphabet
ChunkSize int
BufferSize int
Threads int
LineWidth int
IDRegexp string
IDNCBI bool
OutFile string
Quiet bool
AlphabetGuessSeqLength int
ValidateSeqLength int
}
Config is the global falgs
type RecordLoopBuffer ¶ added in v0.7.0
type RecordLoopBuffer struct {
Size, Capacity int
Current *RecordNode
}
RecordLoopBuffer is a loop buffer for FASTA/Q records
func NewRecordLoopBuffer ¶ added in v0.7.0
func NewRecordLoopBuffer(capacity int) (*RecordLoopBuffer, error)
NewRecordLoopBuffer creats new RecordLoopBuffer object with certern capacity
func (*RecordLoopBuffer) Add ¶ added in v0.7.0
func (buf *RecordLoopBuffer) Add(value *fastx.Record)
Add add new RecordNode
func (*RecordLoopBuffer) Backward ¶ added in v0.7.0
func (buf *RecordLoopBuffer) Backward(n int)
Backward moves the current pointer backward N nodes
func (*RecordLoopBuffer) Next ¶ added in v0.7.0
func (buf *RecordLoopBuffer) Next() *RecordNode
Next returns next node
func (*RecordLoopBuffer) Prev ¶ added in v0.7.0
func (buf *RecordLoopBuffer) Prev() *RecordNode
Prev returns previous node
type RecordNode ¶ added in v0.7.0
RecordNode is the node for double-linked loop list
func (RecordNode) String ¶ added in v0.7.0
func (node RecordNode) String() string
Source Files
¶
- amplicon.go
- bed.go
- common.go
- concat.go
- convert.go
- dup.go
- faidx.go
- fq2fa.go
- fx2tab.go
- genautocomplete.go
- grep.go
- head.go
- helper.go
- locate.go
- logging.go
- mutate.go
- range.go
- rename.go
- replace.go
- restart.go
- rmdup.go
- root.go
- sample.go
- seq.go
- shuffle.go
- sliding.go
- sort.go
- split.go
- split2.go
- stat.go
- subseq.go
- tab2fx.go
- translate.go
- version.go