Documentation ¶
Index ¶
- Variables
- func ConnectDB()
- func ConnectPostgres()
- func ConnectSQLite()
- func StoreExons(geneID uint, exons []ensembl.Exon)
- func StoreFile(file string, hash string, kitID uint, size int64) (bamFileID uint, created bool)
- func StoreGene(hgncAccession string, geneAccession string, name string, description string, ...) (geneID uint, created bool)
- func StoreKit(name string) (kitID uint, created bool)
- func StoreSynonyms(geneID uint, synonyms []ensembl.Synonym) (created bool)
- func StoreVariant(allele clinvar.Allele, exonId uint) (variantID uint)
- type BAMFile
- type Coverage
- type Depth
- type DepthCoverage
- type Exon
- type ExonDepthCoverage
- type ExonReadCount
- type Gene
- type GeneSynonym
- type Kit
- type ReadCount
- type Variant
Constants ¶
This section is empty.
Variables ¶
var DB *gorm.DB
Functions ¶
func ConnectDB ¶
func ConnectDB()
ConnectDB handles the connection and migrations depending on the configured database engine.
func ConnectPostgres ¶
func ConnectPostgres()
TODO: DELETE THIS feature<<<<<, change to MySQL for compatibility with already written manual queries
func ConnectSQLite ¶
func ConnectSQLite()
ConnectSQLite manages the creation and connection to a local SQLite file. Includes extra PRAGMA statements and settings for improved write performance.
func StoreExons ¶
StoreExons stores in the database a record for a gene exon
func StoreFile ¶
StoreFile stores in the database an associated record to an original BAM file source
func StoreGene ¶
func StoreGene(hgncAccession string, geneAccession string, name string, description string, transcriptAccession string) (geneID uint, created bool)
StoreGene stores in the database a record for a gene
func StoreKit ¶
StoreKit stores in the database a commercial exon capture kit name and associated details
func StoreSynonyms ¶
StoreSynonyms stores in the database a record for a gene synonym mapping
Types ¶
type DepthCoverage ¶
type Exon ¶
type Exon struct { ID uint `gorm:"primarykey" json:"id"` GeneID uint `json:"-"` Strand int `json:"strand"` Chromosome string `gorm:"index" json:"chromosome"` Start uint64 `gorm:"index" json:"start"` End uint64 `json:"end"` ExonNumber uint `json:"exonNumber"` ExonDepthCoverages []ExonDepthCoverage `json:"-"` Variants []Variant `json:"-"` }
type ExonDepthCoverage ¶
type ExonDepthCoverage struct { ID uint `gorm:"primarykey" json:"-"` ExonID uint `gorm:"index" json:"-"` BAMFileID uint `gorm:"index" json:"-"` BAMFile BAMFile `json:"bamFile"` DepthCoverages []DepthCoverage `gorm:"constraint:OnDelete:CASCADE;" json:"depthCoverages"` }
type ExonReadCount ¶
type Gene ¶
type Gene struct { ID uint `gorm:"primarykey" json:"id"` HGNCAccession string `gorm:"unique" json:"hgncAccession"` GeneAccession string `gorm:"uniqueIndex" json:"geneAccession"` Name string `gorm:"uniqueIndex" json:"name"` Description string `json:"description"` TranscriptAccession string `json:"transcriptAccession"` Exons []Exon `json:"exons"` GeneSynonyms []GeneSynonym `json:"synonyms"` }
type GeneSynonym ¶
type Variant ¶
type Variant struct { ID uint `gorm:"primarykey" json:"-"` VariantID string `gorm:"uniqueIndex" json:"variantId"` Name string `json:"-"` ClinSig string `json:"clinSig"` ClinSigSimple int `json:"-"` ProteinChange string `json:"-"` ReviewStatus string `json:"-"` Phenotypes string `json:"-"` Chromosome string `gorm:"index" json:"chromosome"` Start uint64 `gorm:"index" json:"start"` End uint64 `gorm:"index" json:"end"` ExonID uint `gorm:"index" json:"exonId"` }