Documentation ¶
Index ¶
- Constants
- Variables
- func BamThread(b *BAMWriters)
- func CheckSplitReads(reads [][]*Alignment, centromeres map[string]Region)
- func DeAlignCrappyReads(reads [][]*Alignment)
- func DoDumpToBam(alignments [][]*Alignment, b *BAMWriters, debugTags bool, attach_bx bool)
- func DoRFAForOneBarcode(work *WorkUnit, bams *BAMWriters, ref *GoBwaReference, settings *GoBwaSettings, ...)
- func DumpToBams(alignments *Data, b *BAMWriters)
- func FindRead(alignments [][]*Alignment, molecules []*CandidateMolecule, qname string)
- func FixCigar(in []uint32) bam.Cigar
- func GetAlignments(ref *GoBwaReference, settings *GoBwaSettings, barcode_chains [][]ChainedHit, ...) ([][]*Alignment, [][]*Alignment)
- func GetChains(ref *GoBwaReference, settings *GoBwaSettings, ...) ([][]ChainedHit, string)
- func HardClip(seq []byte, qual []byte, cigar []uint32, reversed bool) ([]byte, []byte, []uint32)
- func Lariat(args LariatArgs)
- func ReturnBuffer(reads []fastqreader.FastQRecord)
- func SetArgsForTests(args LariatArgs)
- func WorkerThread(input chan *WorkUnit, bams *BAMWriters, ref *GoBwaReference, ...)
- type Alignment
- type BAMWriter
- type BAMWriters
- type ByPosition
- type CandidateMolecule
- type ChainedHit
- type Data
- type LariatArgs
- type MapQData
- type Move
- type Optimizer
- type OrderedAlignmentMap
- func (om *OrderedAlignmentMap) Delete(key int)
- func (om *OrderedAlignmentMap) Get(key int) *Alignment
- func (om *OrderedAlignmentMap) Iter() []*Alignment
- func (om *OrderedAlignmentMap) IterKeys() []int
- func (om *OrderedAlignmentMap) Len() int
- func (om *OrderedAlignmentMap) Set(key int, val *Alignment)
- type OrderedMap
- type RFAConfig
- type RFAStats
- type Region
- type SortSplitScoring
- type SplitScoring
- type WorkUnit
Constants ¶
View Source
const ( SAM_CIGAR_MATCH = 0 SAM_CIGAR_INSERT = 1 SAM_CIGAR_DEL = 2 SAM_CIGAR_SKIP = 3 SAM_CIGAR_SOFT_CLIP = 4 SAM_CIGAR_HARD_CLIP = 5 )
Variables ¶
View Source
var DEBUG *bool
View Source
var SIMULATED_DATA *bool
Functions ¶
func BamThread ¶
func BamThread(b *BAMWriters)
func CheckSplitReads ¶
* Iterate over all reads and compute secondary "split" reads for some of them
func DeAlignCrappyReads ¶
func DeAlignCrappyReads(reads [][]*Alignment)
func DoDumpToBam ¶
func DoDumpToBam(alignments [][]*Alignment, b *BAMWriters, debugTags bool, attach_bx bool)
func DoRFAForOneBarcode ¶
func DoRFAForOneBarcode(work *WorkUnit, bams *BAMWriters, ref *GoBwaReference, settings *GoBwaSettings, config *RFAConfig, stats *RFAStats, reads []fastqreader.FastQRecord)
func DumpToBams ¶
func DumpToBams(alignments *Data, b *BAMWriters)
func FindRead ¶
func FindRead(alignments [][]*Alignment, molecules []*CandidateMolecule, qname string)
func GetAlignments ¶
func GetAlignments(ref *GoBwaReference, settings *GoBwaSettings, barcode_chains [][]ChainedHit, delta int, arena *Arena) ([][]*Alignment, [][]*Alignment)
returns a map from read id to a map of
func GetChains ¶
func GetChains(ref *GoBwaReference, settings *GoBwaSettings, reads_for_barcode []fastqreader.FastQRecord, arena *Arena, score_delta int) ([][]ChainedHit, string)
func HardClip ¶
Convert from "soft" clipping to "hard" clipping. Truncate the sequence and quality and convert "S" to "H" in teh cigar string.
func Lariat ¶
func Lariat(args LariatArgs)
func ReturnBuffer ¶
func ReturnBuffer(reads []fastqreader.FastQRecord)
func SetArgsForTests ¶
func SetArgsForTests(args LariatArgs)
func WorkerThread ¶
func WorkerThread(input chan *WorkUnit, bams *BAMWriters, ref *GoBwaReference, settings *GoBwaSettings, config *RFAConfig, stats *RFAStats, worker_lock *sync.RWMutex)
* This is a single "worker" thread. It tries to grab work units until it gets * nil, then it shuts down.
Types ¶
type Alignment ¶
type Alignment struct {
// contains filtered or unexported fields
}
func FixGetForTypeAlignment ¶
func FixGetForTypeAlignment(val interface{}) *Alignment
func GetSplitAlignment ¶
func (*Alignment) IsUnmapped ¶
type BAMWriter ¶
type BAMWriter struct { Writer *bam.Writer Contigs map[string]*bam.Reference Record bam.Record }
type BAMWriters ¶
type BAMWriters struct { BarcodeSortedBam *BAMWriter PositionBucketedBams map[string][]*BAMWriter // contains filtered or unexported fields }
func CreateBAMs ¶
func CreateBAMs(ref *gobwa.GoBwaReference, basePath, read_groups, sample_id string, _positionChunkSize int, debugTags bool, firstChunk bool) (*BAMWriters, error)
func (*BAMWriters) AppendBams ¶
func (b *BAMWriters) AppendBams(aln *Alignment, primary *Alignment, debugTags bool, attach_bx bool)
func (*BAMWriters) Close ¶
func (b *BAMWriters) Close()
type ByPosition ¶
type ByPosition []*Alignment
types and functions to be able to sort a list of aligntments by position, must already be of the same contig otherwise it doesnt make sense
func (ByPosition) Len ¶
func (a ByPosition) Len() int
func (ByPosition) Less ¶
func (a ByPosition) Less(i, j int) bool
func (ByPosition) Swap ¶
func (a ByPosition) Swap(i, j int)
type CandidateMolecule ¶
type CandidateMolecule struct {
// contains filtered or unexported fields
}
type ChainedHit ¶
type ChainedHit struct {
// contains filtered or unexported fields
}
type LariatArgs ¶
type LariatArgs struct { Reads *string Improper_pair_penalty *float64 SIMULATED_DATA *bool Output *string Read_groups *string Sample_id *string Threads *int Max_bcs *int DEBUG *bool PositionChunkSize *int DebugTags *bool DebugPrintMove *bool Genome *string Centromeres *string Trim *int FirstChunk *bool }
type Optimizer ¶
type Optimizer struct {
// contains filtered or unexported fields
}
func (Optimizer) GenerateMove ¶
type OrderedAlignmentMap ¶
type OrderedAlignmentMap struct {
// contains filtered or unexported fields
}
func FixGetForTypeOrderedAlignmentMap ¶
func FixGetForTypeOrderedAlignmentMap(val interface{}) *OrderedAlignmentMap
func NewOrderedAlignmentMap ¶
func NewOrderedAlignmentMap() *OrderedAlignmentMap
func (*OrderedAlignmentMap) Delete ¶
func (om *OrderedAlignmentMap) Delete(key int)
func (*OrderedAlignmentMap) Get ¶
func (om *OrderedAlignmentMap) Get(key int) *Alignment
func (*OrderedAlignmentMap) Iter ¶
func (om *OrderedAlignmentMap) Iter() []*Alignment
func (*OrderedAlignmentMap) IterKeys ¶
func (om *OrderedAlignmentMap) IterKeys() []int
func (*OrderedAlignmentMap) Len ¶
func (om *OrderedAlignmentMap) Len() int
func (*OrderedAlignmentMap) Set ¶
func (om *OrderedAlignmentMap) Set(key int, val *Alignment)
type OrderedMap ¶
type OrderedMap struct {
// contains filtered or unexported fields
}
func FixGetForTypeOrderedMap ¶
func FixGetForTypeOrderedMap(val interface{}) *OrderedMap
func NewOrderedMap ¶
func NewOrderedMap() *OrderedMap
func StashAlignments ¶
func StashAlignments(a *OrderedMap) *OrderedMap
func (*OrderedMap) Delete ¶
func (om *OrderedMap) Delete(key int)
func (*OrderedMap) Get ¶
func (om *OrderedMap) Get(key int) interface{}
func (*OrderedMap) Iter ¶
func (om *OrderedMap) Iter() []interface{}
func (*OrderedMap) IterKeys ¶
func (om *OrderedMap) IterKeys() []int
func (*OrderedMap) Len ¶
func (om *OrderedMap) Len() int
func (*OrderedMap) Set ¶
func (om *OrderedMap) Set(key int, val interface{})
type RFAConfig ¶
type RFAConfig struct {
// contains filtered or unexported fields
}
Holds configuration parameters for the optimizer. These to be constant after set in main.
type RFAStats ¶
type RFAStats struct {
// contains filtered or unexported fields
}
* Holds statistics and coordination points for RFA
type SortSplitScoring ¶
type SortSplitScoring []SplitScoring
func (SortSplitScoring) Len ¶
func (a SortSplitScoring) Len() int
func (SortSplitScoring) Less ¶
func (a SortSplitScoring) Less(i, j int) bool
func (SortSplitScoring) Swap ¶
func (a SortSplitScoring) Swap(i, j int)
type SplitScoring ¶
type SplitScoring struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.