Documentation
¶
Index ¶
- Variables
- type FaPos
- type Faidx
- func (f *Faidx) At(chrom string, pos int) (byte, error)
- func (f *Faidx) Close()
- func (f *Faidx) Get(chrom string, start int, end int) (string, error)
- func (f *Faidx) GetRaw(chrom string, start int, end int) ([]byte, error)
- func (f *Faidx) Q(pos *FaPos) (uint32, error)
- func (f *Faidx) Stats(chrom string, start int, end int) (Stats, error)
- type Stats
Constants ¶
This section is empty.
Variables ¶
var ErrorNoFai = errors.New("no fai for fasta")
ErrorNoFai is returned if the fasta doesn't have an associated .fai
Functions ¶
This section is empty.
Types ¶
type FaPos ¶
type FaPos struct { Chrom string Start int End int As uint32 Cs uint32 Gs uint32 Ts uint32 // contains filtered or unexported fields }
FaPos allows the user to specify the position and internally, faidx will store information in it to speed GC calcs to adjacent regions. Useful for, when we sweep along the genome 1 base at a time, but we want to know the GC content for a window around each base.
type Faidx ¶
Faidx is used to provide random access to the sequence data.
func (*Faidx) Get ¶
Get takes a position and returns the string sequence. Start and end are 0-based.
func (*Faidx) GetRaw ¶
GetRaw takes a position and returns the string sequence that includes the newlines. Start and end are 0-based.
func (*Faidx) Q ¶
Q returns only the count of GCs it can do the calculation quickly for repeated calls marching to higher bases along the genome. It also updates the number of As, Cs, Ts, and Gs in FaPosition so the user can then calculate Entropy or use Duplicity above.