Skip to content

vtphan/kmers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

func Slide1

func Slide1(sequence []byte, K int, start int, end int, result chan int)

Store in channel "result" all kmers of "sequence" by sliding a window of length K from "start" to "end"-1.

func Slide2

func Slide2(sequence []byte, K int, start int, end int, result chan int)

Store in channel "result" all kmers of "sequence" and its reverse complement by sliding a window of length K from "start" to "end"-1.

type Counter

type Counter struct {
	K    int
	Freq []int
}

Counter is used to counter ALL kmers.

func NewCounter

func NewCounter(K int) *Counter

func (*Counter) Count1

func (c *Counter) Count1(sequence []byte)

counting all kmers in the main strand

func (*Counter) Count2

func (c *Counter) Count2(sequence []byte)

counting all kmers on both strands

type KmerCounter

type KmerCounter struct {
	K    int
	Freq map[int]int
}

KmerCounter is used to counter only kmers in Freq in reads.

func NewKmerCounter

func NewKmerCounter(K int, freq map[int]int) *KmerCounter

func (*KmerCounter) Count1

func (c *KmerCounter) Count1(sequence []byte)

count number of k-mers in the main strand

func (*KmerCounter) Count2

func (c *KmerCounter) Count2(sequence []byte)

count number of k-mers in on both strands

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages