Documentation
¶
Index ¶
- Constants
- type Block
- type BlockIndex
- type BlockMatrix
- func (b *BlockMatrix) At(i int, j int) float64
- func (b *BlockMatrix) BufferSize() uintptr
- func (b *BlockMatrix) Dims() (int, int)
- func (b *BlockMatrix) Matrix() mat64.Matrix
- func (b *BlockMatrix) SetUseBuffer(a bool)
- func (b *BlockMatrix) String() string
- func (b *BlockMatrix) View(i int, j int, r int, c int) mat64.Matrix
- type Body
- type Chr
- type ExpectedValueFunc
- func (e *ExpectedValueFunc) BinSize() int
- func (e *ExpectedValueFunc) ExpectedValue(chrIdx int32, distance int) float64
- func (e *ExpectedValueFunc) ExpectedValues() []float64
- func (e *ExpectedValueFunc) Key() string
- func (e *ExpectedValueFunc) Length() int
- func (e *ExpectedValueFunc) NormFactors() map[int32]float64
- func (e *ExpectedValueFunc) NormTypeString() string
- func (e *ExpectedValueFunc) Text() string
- func (e *ExpectedValueFunc) Unit() int
- type Footer
- type HiC
- func (hic *HiC) Corrected(s int, e int, resIdx int) (int, int)
- func (e *HiC) Entrys() []string
- func (e *HiC) GetResIdx(length int, width int) int
- func (e *HiC) LoadBodyIndex(key string) (*Body, error)
- func (e *HiC) LoadIndex(r io.Reader)
- func (e *HiC) Lock()
- func (e *HiC) QueryOE(chr string, start int, end int, normtype int, unit int, resIdx int) (mat64.Matrix, error)
- func (e *HiC) QueryOE2(chr string, start int, end int, chr2 string, start2 int, end2 int, ...) (mat64.Matrix, error)
- func (e *HiC) QueryOne(chrom string, start int, end int, width int) (mat64.Matrix, error)
- func (e *HiC) QueryOneNormMat(chr string, start int, end int, resIdx int, normtype int, unit int) (mat64.Matrix, error)
- func (e *HiC) QueryTwo(chr string, start int, end int, chr2 string, start2 int, end2 int, resIdx int) (mat64.Matrix, error)
- func (e *HiC) QueryTwoNormMat(chr string, start int, end int, chr2 string, start2 int, end2 int, resIdx int, ...) (mat64.Matrix, error)
- func (e *HiC) Read(p []byte) (int, error)
- func (e *HiC) Seek(offset int64, w int) (int64, error)
- func (e *HiC) String() string
- func (e *HiC) Unlock()
- func (e *HiC) WriteIndex(w io.Writer)
- type Index
- type MatrixViewer
- type NormVector
- type Position
Constants ¶
View Source
const (
MAGIC = "HIC"
)
View Source
const (
MaxCells = 25000000 //5000*5000
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type BlockIndex ¶
type BlockMatrix ¶
type BlockMatrix struct { Unit string ResIdx int32 SumCounts float32 BinSize int32 BlockBinCount int32 BlockColumnCount int32 BlockCount int32 BlockIndexes map[int]BlockIndex // contains filtered or unexported fields }
BlockMatrix : implement mat64.Matrix interface
func (*BlockMatrix) BufferSize ¶
func (b *BlockMatrix) BufferSize() uintptr
func (*BlockMatrix) Dims ¶
func (b *BlockMatrix) Dims() (int, int)
func (*BlockMatrix) Matrix ¶
func (b *BlockMatrix) Matrix() mat64.Matrix
func (*BlockMatrix) SetUseBuffer ¶
func (b *BlockMatrix) SetUseBuffer(a bool)
func (*BlockMatrix) String ¶
func (b *BlockMatrix) String() string
type Body ¶
type Body struct { Chr1Idx int32 Chr2Idx int32 NRes int32 Mats []BlockMatrix //map resolution to blockmatrix }
type ExpectedValueFunc ¶
type ExpectedValueFunc struct {
// contains filtered or unexported fields
}
func NewExpectedValueFunc ¶
func (*ExpectedValueFunc) BinSize ¶
func (e *ExpectedValueFunc) BinSize() int
func (*ExpectedValueFunc) ExpectedValue ¶
func (e *ExpectedValueFunc) ExpectedValue(chrIdx int32, distance int) float64
ExpectedValue: get the expected value for {chromsome, distance}
func (*ExpectedValueFunc) ExpectedValues ¶
func (e *ExpectedValueFunc) ExpectedValues() []float64
func (*ExpectedValueFunc) Key ¶
func (e *ExpectedValueFunc) Key() string
func (*ExpectedValueFunc) Length ¶
func (e *ExpectedValueFunc) Length() int
func (*ExpectedValueFunc) NormFactors ¶
func (e *ExpectedValueFunc) NormFactors() map[int32]float64
func (*ExpectedValueFunc) NormTypeString ¶
func (e *ExpectedValueFunc) NormTypeString() string
func (*ExpectedValueFunc) Text ¶
func (e *ExpectedValueFunc) Text() string
Text: output detail string
func (*ExpectedValueFunc) Unit ¶
func (e *ExpectedValueFunc) Unit() int
type Footer ¶
type Footer struct {}
func (*Footer) NormTypeIdx ¶
NormTypeIdx: get all normalization types indexes
func (*Footer) NormTypeStrings ¶
NormTypeStrings: get all norm type strings
func (*Footer) NormTypeStrs ¶
NormTypeStrs: get all norm type short strings
type HiC ¶
type HiC struct { Reader io.ReadSeeker Version int32 Genome string NAttr int32 Attr map[string]string NChrs int32 Chr []Chr NBpRes int32 BpRes []int32 NFragRes int32 FragRes []int32 // contains filtered or unexported fields }
func DataReader ¶
func DataReader(buf io.ReadSeeker) (*HiC, error)
func DataReaderLowMem ¶
func DataReaderLowMem(buf io.ReadSeeker) (*HiC, error)
func (*HiC) GetResIdx ¶
GetResIdx : Calculate the resolution index based on the width of panel and the length of query region
func (*HiC) QueryOneNormMat ¶
func (*HiC) QueryTwo ¶
func (e *HiC) QueryTwo(chr string, start int, end int, chr2 string, start2 int, end2 int, resIdx int) (mat64.Matrix, error)
QueryTwo : get two region matrix
func (*HiC) QueryTwoNormMat ¶
type NormVector ¶
type NormVector struct {
// contains filtered or unexported fields
}
func NewNormVector ¶
func (*NormVector) Data ¶
func (v *NormVector) Data() ([]float64, error)
func (*NormVector) Key ¶
func (v *NormVector) Key() string
func (*NormVector) Load ¶
func (v *NormVector) Load(reader MutexReadSeeker)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.