scramPkg

package module
v0.0.0-...-0753550 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2018 License: MIT Imports: 17 Imported by: 0

README

scram2 package files - use in combination with the cmd/scram/scram.go main file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlignMirnas

func AlignMirnas(seq_map map[string]interface{}, mirna_map map[string]*mirnaSeqDup) map[string]interface{}

AlignMirnas aligns reads of any length to the miRNAs in the sense orientation only. Only alignments in which len(read)==len(mirna) are retained. A map of mirna_header:mean_se_dup is returned

func AlignReads

func AlignReads(seq_map map[string]interface{}, ref_slice []*HeaderRef, nt int) map[string]map[string][]int

AlignReads aligns reads of length nt to one or more reference sequences, with exact matches in forward or reverse complement accepted. A map of ref_header:[srna_seq:[pos,pos,...],...] is returned.

func Compare

func Compare(countsMap1 map[string]interface{}, countsMap2 map[string]interface{}) map[string]interface{}

Compare combines individual alignments for set sets of sequences (treatments). It returns a map of ref header as key and a slice of set 1 mean/se and set2 mean/se as value.

func CompareNoSplitCounts

func CompareNoSplitCounts(alignmentMap map[string]map[string][]int, seqMap map[string]interface{}) map[string]interface{}

CompareNoSplitCounts takes and alignment map and returns a map with the ref_header as key and the mean_se (mean and standard error) of aligned reads for that ref seq as value. Read counts are NOT split by the number of times a read aligns to all reference sequences.

func CompareSplitCounts

func CompareSplitCounts(alignmentMap map[string]map[string][]int, seqMap map[string]interface{}) map[string]interface{}

CompareSplitCounts takes and alignment map and returns a map with the ref_header as key and the mean_se (mean and standard error) of aligned reads for that ref seq as value. Read counts are split by the number of times a read aligns to all reference sequences.

func CompareToCsv

func CompareToCsv(cdpAlignmentMap map[string]interface{}, nt int, outPrefix string, aFileOrder []string, bFileOrder []string)

CompareToCsv writes the output to a csv file.

func IndvSeqLoad

func IndvSeqLoad(seqFiles []string, fileType string, adapter string, minLen int, maxLen int,
	minCount float64, noNorm bool) (map[string]interface{}, []string)

IndvSeqLoad loads 1 or more small RNA seq. read files. It returns a map with a read sequence as key and a slice of normalized or raw individual read counts as a value. Little format checking is performed. It is required that the input file is correctly formatted.

func MirLoad

func MirLoad(mirFile string) map[string]*mirnaSeqDup

MirLoad loads mature miRNA sequences from a mirna FASTA file (i.e. generated from miRBase) It returns a map of headers : mirna sequences (converted to DNA)

func MirnaCompare

func MirnaCompare(mirnaAlignmentMap1 map[string]interface{},
	mirnaAlignmentMap2 map[string]interface{}, noSplit bool) map[string]interface{}

func ProfileNoSplit

func ProfileNoSplit(alignmentMap map[string]map[string][]int, seqMap map[string]interface{}) map[string]interface{}

ProfileNoSplit takes and alignment map and a sequence map as an input. It returns a map of single alignments with a reference header as key and a single alignments struct as value. Each single alignments struct is comprised of single_alignment structs (read seq, position, count, se). The count for each read alignment is NOT split by the number of times a read aligns.

func ProfileSplit

func ProfileSplit(alignmentMap map[string]map[string][]int, seqMap map[string]interface{}) map[string]interface{}

ProfileSplit takes and alignment map and a sequence map as an input. It returns a map of single alignments with a reference header as key and a single alignments struct as value. Each single alignments struct is comprised of single_alignment structs (read seq, position, count, se). The count for each read alignment is split by the number of times a read aligns.

func ProfileToCsv

func ProfileToCsv(profileAlignmentsMap map[string]interface{}, refSlice []*HeaderRef, nt int, outPrefix string, fileOrder []string)

ProfileToCsv writes the den results to a csv file

func SeqLoad

func SeqLoad(seqFiles []string, fileType string, adapter string, minLen int, maxLen int,
	minCount float64, noNorm bool) map[string]interface{}

SeqLoad loads 1 or more small RNA seq. read files. It returns a map with a read sequence as key and a meanSe struct (normalised or raw read mean and standard error) as a value. Little format checking is performed. It is required that the input file is correctly formatted.

Types

type HeaderRef

type HeaderRef struct {
	Header     string
	Seq        string
	ReverseSeq string
}

HeaderRef is a struct comprising a reference sequence header, seques and reverse complement

func RefLoad

func RefLoad(refFile string) []*HeaderRef

RefLoad loads a reference sequence DNA file (FASTA format). It returns a slice of HeaderRef structs (individual reference header, sequence and reverse complement).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL