Documentation
¶
Index ¶
- Constants
- Variables
- func Blake3SequenceHash(annotatedSequence AnnotatedSequence) string
- func BoothLeastRotation(sequence string) int
- func BuildFASTA(annotatedSequenceArray []AnnotatedSequence) []byte
- func BuildGbk(annotatedSequence AnnotatedSequence) []byte
- func BuildGff(annotatedSequence AnnotatedSequence) []byte
- func ComplementBase(basePair rune) rune
- func GenericSequenceHash(annotatedSequence AnnotatedSequence, hash crypto.Hash) (string, error)
- func GetCodonFrequency(sequence string) map[string]int
- func MarmurDoty(sequence string) float64
- func MeltingTemp(sequence string) float64
- func Optimize(aminoAcids string, codonTable CodonTable) string
- func ReverseComplement(sequence string) string
- func RotateSequence(sequence string) string
- func SantaLucia(sequence string, ...) (meltingTemp, dH, dS float64)
- func Translate(sequence string, codonTable CodonTable) string
- func WriteFASTA(annotatedSequenceArray []AnnotatedSequence, path string)
- func WriteGbk(annotatedSequence AnnotatedSequence, path string)
- func WriteGff(annotatedSequence AnnotatedSequence, path string)
- func WriteJSON(annotatedSequence AnnotatedSequence, path string)
- type AminoAcid
- type AnnotatedSequence
- func ParseFASTA(fasta string) []AnnotatedSequence
- func ParseGbk(gbk string) AnnotatedSequence
- func ParseGff(gff string) AnnotatedSequence
- func ParseJSON(file []byte) AnnotatedSequence
- func ReadFASTA(path string) []AnnotatedSequence
- func ReadGbk(path string) AnnotatedSequence
- func ReadGff(path string) AnnotatedSequence
- func ReadJSON(path string) AnnotatedSequence
- type Codon
- type CodonTable
- type Feature
- type Location
- type Locus
- type Meta
- type Reference
- type Sequence
Constants ¶
const FIVESPACE = " "
FIVESPACE just represents 5 space characters. Used in GBK IO
const TAB = "\t"
TAB just represents "\t" used in GBK IO.
const TENSPACE = FIVESPACE + FIVESPACE
TENSPACE just represents 10 space characters. Used in GBK IO
Variables ¶
var ComplementBaseRuneMap = map[rune]rune{
65: 84,
66: 86,
67: 71,
68: 72,
71: 67,
72: 68,
75: 77,
77: 75,
78: 78,
82: 89,
83: 83,
84: 65,
85: 65,
86: 66,
87: 87,
89: 82,
97: 116,
98: 118,
99: 103,
100: 104,
103: 99,
104: 100,
107: 109,
109: 107,
110: 110,
114: 121,
115: 115,
116: 97,
117: 97,
118: 98,
119: 119,
121: 114,
}
ComplementBaseRuneMap provides 1:1 mapping between bases and their complements
var DefaultCodonTablesByName = map[string]CodonTable{ "Standard": generateCodonTable("FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "---M------**--*----M---------------M----------------------------"), "VertebrateMitochondrial": generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSS**VVVVAAAADDEEGGGG", "----------**--------------------MMMM----------**---M------------"), "YeastMitochondrial": generateCodonTable("FFLLSSSSYY**CCWWTTTTPPPPHHQQRRRRIIMMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "----------**----------------------MM---------------M------------"), "MoldMitochondrial": generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--MM------**-------M------------MMMM---------------M------------"), "ProtozoanMitochondrial": generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--MM------**-------M------------MMMM---------------M------------"), "CoelenterateMitochondrial": generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--MM------**-------M------------MMMM---------------M------------"), "Mycoplasma": generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--MM------**-------M------------MMMM---------------M------------"), "Spiroplasma": generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--MM------**-------M------------MMMM---------------M------------"), "InvertebrateMitochondrial": generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSSSSVVVVAAAADDEEGGGG", "---M------**--------------------MMMM---------------M------------"), "CiliateNuclear": generateCodonTable("FFLLSSSSYYQQCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--------------*--------------------M----------------------------"), "DasycladaceanNuclear": generateCodonTable("FFLLSSSSYYQQCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--------------*--------------------M----------------------------"), "HexamitaNuclear": generateCodonTable("FFLLSSSSYYQQCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--------------*--------------------M----------------------------"), "EchinodermMitochondrial": generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNNKSSSSVVVVAAAADDEEGGGG", "----------**-----------------------M---------------M------------"), "FlatwormMitochondrial": generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNNKSSSSVVVVAAAADDEEGGGG", "----------**-----------------------M---------------M------------"), "EuplotidNuclear": generateCodonTable("FFLLSSSSYY**CCCWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "----------**-----------------------M----------------------------"), "BacterialPlastid": generateCodonTable("FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "---M------**--*----M------------MMMM---------------M------------"), "ArchaelPlastid": generateCodonTable("FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "---M------**--*----M------------MMMM---------------M------------"), "PlantPlastid": generateCodonTable("FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "---M------**--*----M------------MMMM---------------M------------"), "AlternativeYeastNuclear": generateCodonTable("FFLLSSSSYY**CC*WLLLSPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "----------**--*----M---------------M----------------------------"), "AscidianMitochondrial": generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSSGGVVVVAAAADDEEGGGG", "---M------**----------------------MM---------------M------------"), "AlternativeFlatwormMitochondrial": generateCodonTable("FFLLSSSSYYY*CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNNKSSSSVVVVAAAADDEEGGGG", "-----------*-----------------------M----------------------------"), "ChlorophyceanMitochondrial": generateCodonTable("FFLLSSSSYY*LCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "----------*---*--------------------M----------------------------"), "TrematodeMitochondrial": generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNNKSSSSVVVVAAAADDEEGGGG", "----------**-----------------------M---------------M------------"), "ScenedesmusObliquusMitochondrial": generateCodonTable("FFLLSS*SYY*LCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "------*---*---*--------------------M----------------------------"), "ThraustochytriumMitochondrial": generateCodonTable("FF*LSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--*-------**--*-----------------M--M---------------M------------"), "RhabdopleuridaeMitochondrial": generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSSKVVVVAAAADDEEGGGG", "---M------**-------M---------------M---------------M------------"), "CandidateDivisionSR1": generateCodonTable("FFLLSSSSYY**CCGWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "---M------**-----------------------M---------------M------------"), "Gracilibacteria": generateCodonTable("FFLLSSSSYY**CCGWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "---M------**-----------------------M---------------M------------"), "PachysolenTannophilusNuclear": generateCodonTable("FFLLSSSSYY**CC*WLLLAPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "----------**--*----M---------------M----------------------------"), "KaryorelictNuclear": generateCodonTable("FFLLSSSSYYQQCCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--------------*--------------------M----------------------------"), "CondylostomaNuclear": generateCodonTable("FFLLSSSSYYQQCCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "----------**--*--------------------M----------------------------"), "MesodiniumNuclear": generateCodonTable("FFLLSSSSYYYYCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--------------*--------------------M----------------------------"), "PeritrichNuclear": generateCodonTable("FFLLSSSSYYEECC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--------------*--------------------M----------------------------"), "BlastocrithidiaNuclear": generateCodonTable("FFLLSSSSYYEECCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "----------**-----------------------M----------------------------"), "CephalodiscidaeMitochondrial": generateCodonTable("FFLLSSSSYYY*CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSSKVVVVAAAADDEEGGGG", "---M-------*-------M---------------M---------------M------------")} // 33
DefaultCodonTablesByName stores all codon tables published by NCBI https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi using named indeces.
var DefaultCodonTablesByNumber = map[int]CodonTable{
1: generateCodonTable("FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "---M------**--*----M---------------M----------------------------"),
2: generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSS**VVVVAAAADDEEGGGG", "----------**--------------------MMMM----------**---M------------"),
3: generateCodonTable("FFLLSSSSYY**CCWWTTTTPPPPHHQQRRRRIIMMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "----------**----------------------MM---------------M------------"),
4: generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--MM------**-------M------------MMMM---------------M------------"),
5: generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSSSSVVVVAAAADDEEGGGG", "---M------**--------------------MMMM---------------M------------"),
6: generateCodonTable("FFLLSSSSYYQQCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--------------*--------------------M----------------------------"),
9: generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNNKSSSSVVVVAAAADDEEGGGG", "----------**-----------------------M---------------M------------"),
10: generateCodonTable("FFLLSSSSYY**CCCWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "----------**-----------------------M----------------------------"),
11: generateCodonTable("FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "---M------**--*----M------------MMMM---------------M------------"),
12: generateCodonTable("FFLLSSSSYY**CC*WLLLSPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "----------**--*----M---------------M----------------------------"),
13: generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNKKSSGGVVVVAAAADDEEGGGG", "---M------**----------------------MM---------------M------------"),
14: generateCodonTable("FFLLSSSSYYY*CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNNKSSSSVVVVAAAADDEEGGGG", "-----------*-----------------------M----------------------------"),
16: generateCodonTable("FFLLSSSSYY*LCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "----------*---*--------------------M----------------------------"),
21: generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIMMTTTTNNNKSSSSVVVVAAAADDEEGGGG", "----------**-----------------------M---------------M------------"),
22: generateCodonTable("FFLLSS*SYY*LCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "------*---*---*--------------------M----------------------------"),
23: generateCodonTable("FF*LSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--*-------**--*-----------------M--M---------------M------------"),
24: generateCodonTable("FFLLSSSSYY**CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSSKVVVVAAAADDEEGGGG", "---M------**-------M---------------M---------------M------------"),
25: generateCodonTable("FFLLSSSSYY**CCGWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "---M------**-----------------------M---------------M------------"),
26: generateCodonTable("FFLLSSSSYY**CC*WLLLAPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "----------**--*----M---------------M----------------------------"),
27: generateCodonTable("FFLLSSSSYYQQCCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--------------*--------------------M----------------------------"),
28: generateCodonTable("FFLLSSSSYYQQCCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "----------**--*--------------------M----------------------------"),
29: generateCodonTable("FFLLSSSSYYYYCC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--------------*--------------------M----------------------------"),
30: generateCodonTable("FFLLSSSSYYEECC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "--------------*--------------------M----------------------------"),
31: generateCodonTable("FFLLSSSSYYEECCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG", "----------**-----------------------M----------------------------"),
33: generateCodonTable("FFLLSSSSYYY*CCWWLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSSKVVVVAAAADDEEGGGG", "---M-------*-------M---------------M---------------M------------")}
DefaultCodonTablesByNumber stores all codon tables published by NCBI https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi using numbered indeces.
Functions ¶
func Blake3SequenceHash ¶
func Blake3SequenceHash(annotatedSequence AnnotatedSequence) string
Blake3SequenceHash Blake3 function doesn't use standard golang hash interface so we couldn't use it with the generic sequence hash.
func BoothLeastRotation ¶
BoothLeastRotation gets the least rotation of a circular string. https://en.wikipedia.org/wiki/Lexicographically_minimal_string_rotation this is generally over commented but I'm keeping it this way for now. - Tim
func BuildFASTA ¶ added in v0.3.0
func BuildFASTA(annotatedSequenceArray []AnnotatedSequence) []byte
BuildFASTA builds a FASTA string from an array of AnnotatedSequence structs.
func BuildGbk ¶ added in v0.2.0
func BuildGbk(annotatedSequence AnnotatedSequence) []byte
BuildGbk builds a GBK string to be written out to db or file.
func BuildGff ¶
func BuildGff(annotatedSequence AnnotatedSequence) []byte
BuildGff takes an Annotated sequence and returns a byte array representing a gff to be written out.
func ComplementBase ¶ added in v0.3.0
ComplementBase accepts a base pair and returns its complement base pair
func GenericSequenceHash ¶
func GenericSequenceHash(annotatedSequence AnnotatedSequence, hash crypto.Hash) (string, error)
GenericSequenceHash takes an AnnotatedSequence and a hash function and hashes it. from https://stackoverflow.com/questions/32620290/how-to-dynamically-switch-between-hash-algorithms-in-golang <- this had a bug I had to fix! - Tim
func GetCodonFrequency ¶ added in v0.3.0
GetCodonFrequency takes a DNA sequence and returns a hashmap of its codons and their frequencies.
func MarmurDoty ¶ added in v0.3.0
MarmurDoty calculates the melting point of an extremely short DNA sequence (<15 bp) using a modified Marmur Doty formula [Marmur J & Doty P (1962). Determination of the base composition of deoxyribonucleic acid from its thermal denaturation temperature. J Mol Biol, 5, 109-118.]
func MeltingTemp ¶ added in v0.3.0
MeltingTemp calls SantaLucia with default inputs for primer and salt concentration.
func Optimize ¶ added in v0.3.0
func Optimize(aminoAcids string, codonTable CodonTable) string
Optimize takes an amino acid sequence and CodonTable and returns an optimized codon sequence
func ReverseComplement ¶ added in v0.1.0
ReverseComplement takes the reverse complement of a sequence
func RotateSequence ¶
RotateSequence rotates circular sequences to deterministic point.
func SantaLucia ¶ added in v0.3.0
func SantaLucia(sequence string, primerConcentration, saltConcentration, magnesiumConcentration float64) (meltingTemp, dH, dS float64)
SantaLucia calculates the melting point of a short DNA sequence (15-200 bp), using the Nearest Neighbors method [SantaLucia, J. (1998) PNAS, doi:10.1073/pnas.95.4.1460]
func Translate ¶ added in v0.3.0
func Translate(sequence string, codonTable CodonTable) string
Translate translates a codon sequence to an amino acid sequence
func WriteFASTA ¶ added in v0.3.0
func WriteFASTA(annotatedSequenceArray []AnnotatedSequence, path string)
WriteFASTA writes an array of AnnotatedSequence structs out to FASTA.
func WriteGbk ¶ added in v0.2.0
func WriteGbk(annotatedSequence AnnotatedSequence, path string)
WriteGbk takes an AnnotatedSequence struct and a path string and writes out a gff to that path.
func WriteGff ¶
func WriteGff(annotatedSequence AnnotatedSequence, path string)
WriteGff takes an AnnotatedSequence struct and a path string and writes out a gff to that path.
func WriteJSON ¶
func WriteJSON(annotatedSequence AnnotatedSequence, path string)
WriteJSON writes an AnnotatedSequence struct out to json.
Types ¶
type AminoAcid ¶ added in v0.3.0
AminoAcid holds information for an amino acid and related codons in a struct in a struct
type AnnotatedSequence ¶
type AnnotatedSequence struct {
Meta Meta `json:"meta"`
Features []Feature `json:"features"`
Sequence Sequence `json:"sequence"`
}
AnnotatedSequence holds all sequence information in a single struct.
func ParseFASTA ¶ added in v0.3.0
func ParseFASTA(fasta string) []AnnotatedSequence
ParseFASTA parses an array of AnnotatedSequence structs from a FASTA file and adds appropriate pointers to the structs.
func ParseGbk ¶
func ParseGbk(gbk string) AnnotatedSequence
ParseGbk takes in a string representing a gbk/gb/genbank file and parses it into an AnnotatedSequence object.
func ParseGff ¶
func ParseGff(gff string) AnnotatedSequence
ParseGff Takes in a string representing a gffv3 file and parses it into an AnnotatedSequence object.
func ParseJSON ¶ added in v0.1.0
func ParseJSON(file []byte) AnnotatedSequence
ParseJSON parses an AnnotatedSequence JSON file and adds appropriate pointers to struct.
func ReadFASTA ¶ added in v0.3.0
func ReadFASTA(path string) []AnnotatedSequence
ReadFASTA reads an array of AnnotatedSequence structs from a FASTA file.
func ReadGbk ¶
func ReadGbk(path string) AnnotatedSequence
ReadGbk reads a Gbk from path and parses into an Annotated sequence struct.
func ReadGff ¶
func ReadGff(path string) AnnotatedSequence
ReadGff takes in a filepath for a .gffv3 file and parses it into an Annotated Sequence struct.
func ReadJSON ¶
func ReadJSON(path string) AnnotatedSequence
ReadJSON reads an AnnotatedSequence JSON file.
func (AnnotatedSequence) Blake3Hash ¶ added in v0.3.0
func (annotatedSequence AnnotatedSequence) Blake3Hash() string
Blake3Hash is a method wrapper for hashing annotatedSequence structs with Blake3.
func (AnnotatedSequence) GetSequence ¶ added in v0.3.0
func (annotatedSequence AnnotatedSequence) GetSequence() string
GetSequence is a method to get the full sequence of an annotated sequence
type CodonTable ¶ added in v0.3.0
CodonTable holds information for a codon table.
func (CodonTable) CreateWeights ¶ added in v0.3.0
func (codonTable CodonTable) CreateWeights(sequence string) CodonTable
CreateWeights weights each codon in a codon table according to input string codon frequency this function actually mutates the CodonTable struct itself and doesn't technically need to return but is useful if you want to create a copy while mutating... Not sure if deep copy is appropriate
type Feature ¶
type Feature struct {
Name string //Seqid in gff, name in gbk
//gff specific
Source string `json:"source"`
Type string `json:"type"`
Score string `json:"score"`
Strand string `json:"strand"`
Phase string `json:"phase"`
Attributes map[string]string `json:"attributes"`
GbkLocationString string `json:"gbk_location_string"`
Sequence string `json:"sequence"`
SequenceLocation Location `json:"sequence_location"`
ParentAnnotatedSequence *AnnotatedSequence `json:"-"`
}
Feature holds a single annotation in a struct. from https://github.com/blachlylab/gff3/blob/master/gff3.go
func (Feature) GetSequence ¶ added in v0.3.0
GetSequence is a method wrapper to get a Feature's sequence. Mutates with AnnotatedSequence.
type Location ¶ added in v0.1.0
type Location struct {
Start int `json:"start"`
End int `json:"end"`
Complement bool `json:"complement"`
Join bool `json:"join"`
FivePrimePartial bool `json:"five_prime_partial"`
ThreePrimePartial bool `json:"three_prime_partial"`
SubLocations []Location `json:"sub_locations"`
}
Location holds nested location info for sequence region.
type Locus ¶
type Locus struct {
Name string `json:"name"`
SequenceLength string `json:"sequence_length"`
MoleculeType string `json:"molecule_type"`
GenbankDivision string `json:"genbank_division"`
ModificationDate string `json:"modification_date"`
SequenceCoding string `json:"sequence_coding"`
Circular bool `json:"circular"`
Linear bool `json:"linear"`
}
Locus holds Locus information in a Meta struct.
type Meta ¶
type Meta struct {
Name string `json:"name"`
GffVersion string `json:"gff_version"`
RegionStart int `json:"region_start"`
RegionEnd int `json:"region_end"`
Size int `json:"size"`
Type string `json:"type"`
Date string `json:"date"`
Definition string `json:"definition"`
Accession string `json:"accession"`
Version string `json:"version"`
Keywords string `json:"keywords"`
Organism string `json:"organism"`
Source string `json:"source"`
Origin string `json:"origin"`
Locus Locus `json:"locus"`
References []Reference `json:"references"`
Other map[string]string `json:"other"`
}
Meta Holds all the meta information of an AnnotatedSequence struct.
type Reference ¶
type Reference struct {
Index string `json:"index"`
Authors string `json:"authors"`
Title string `json:"title"`
Journal string `json:"journal"`
PubMed string `json:"pub_med"`
Remark string `json:"remark"`
Range string `json:"range"`
}
Reference holds information one reference in a Meta struct.
type Sequence ¶
type Sequence struct {
Description string `json:"description"`
Hash string `json:"hash"`
HashFunction string `json:"hash_function"`
Sequence string `json:"sequence"`
}
Sequence holds raw sequence information in an AnnotatedSequence struct.
func (Sequence) GetSequence ¶ added in v0.3.0
GetSequence is a method to get the full sequence of an unannotated sequence you could also just use sequence.sequence but I thought it was funny to include this.