types

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MPL-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alignment

type Alignment struct {
	ID          int64 `db:"id"`           // Unique ID of the alignment.
	ChainID     int64 `db:"chain_id"`     // The chain this alignment belongs to.
	RefOffset   int64 `db:"ref_offset"`   // Offset of the aligned block in the reference chromosome from the start of the chain.
	QueryOffset int64 `db:"query_offset"` // Offset of the aligned block in the query chromosome from the start of the chain.
	Size        int64 `db:"size"`         // Size of the aligned block in bases.
}

Alignment is an alignment block between two genomes.

type Allele

type Allele struct {
	ID        int64         `db:"id"`        // Unique ID of the variant the allele is associated with (RSID).
	Reference string        `db:"ref"`       // Reference base(s) at the variant's position.
	Alternate string        `db:"alt"`       // Alternate base(s) at the variant's position, representing the allele.
	Ancestry  AncestryGroup `db:"ancestry"`  // Ancestry group the allele is associated with.
	Frequency float64       `db:"frequency"` // Frequency of the allele in the ancestry group.
}

Allele is an allele of a genomic variant.

type AncestryGroup

type AncestryGroup string

AncestryGroup identifies an ancestry group (as found in gnoMAD v3).

const (
	AncestryGroupAll AncestryGroup = "ALL"
	// AncestryGroupAfrican is the African/African American ancestry group.
	AncestryGroupAfrican AncestryGroup = "AFR"
	// AncestryGroupAmish is the Amish ancestry group.
	AncestryGroupAmish AncestryGroup = "AMI"
	// AncestryGroupAmerican is the Admixed American (Latino) ancestry group.
	AncestryGroupAmerican AncestryGroup = "AMR"
	// AncestryGroupAshkenazi is the Ashkenazi Jewish ancestry group.
	AncestryGroupAshkenazi AncestryGroup = "ASJ"
	// AncestryGroupEastAsian is the East Asian ancestry group.
	AncestryGroupEastAsian AncestryGroup = "EAS"
	// AncestryGroupFinnish is the Finnish ancestry group.
	AncestryGroupFinnish AncestryGroup = "FIN"
	// AncestryGroupMiddleEastern is the Middle Eastern ancestry group.
	AncestryGroupMiddleEastern AncestryGroup = "MID"
	// AncestryGroupEuropean is the Non-Finnish European ancestry group.
	AncestryGroupEuropean AncestryGroup = "NFE"
	// AncestryGroupSouthAsian is the South Asian ancestry group.
	AncestryGroupSouthAsian AncestryGroup = "SAS"
	// AncestryGroupOther encompasses all other ancestry groups.
	AncestryGroupOther AncestryGroup = "OTH"
)

type Chain

type Chain struct {
	ID          int64      `db:"id"`           // Unique ID of the chain.
	Score       int64      `db:"score"`        // Alignment score.
	Ref         Reference  `db:"ref"`          // Reference genome assembly name.
	RefName     Chromosome `db:"ref_name"`     // Reference chromosome name.
	RefSize     int64      `db:"ref_size"`     // Size of the reference chromosome in bases.
	RefStrand   string     `db:"ref_strand"`   // Strand in the reference genome ('+' or '-').
	RefStart    int64      `db:"ref_start"`    // Start position in the reference genome.
	RefEnd      int64      `db:"ref_end"`      // End position in the reference genome.
	QueryName   Chromosome `db:"query_name"`   // Query chromosome name.
	QuerySize   int64      `db:"query_size"`   // Size of the query chromosome in bases.
	QueryStrand string     `db:"query_strand"` // Strand in the query genome ('+' or '-').
	QueryStart  int64      `db:"query_start"`  // Start position in the query genome.
	QueryEnd    int64      `db:"query_end"`    // End position in the query genome.
}

Chain is a chain of alignments between two genomes.

type Chromosome added in v0.8.0

type Chromosome string

Chromosome is a chromosome in a genome.

const (
	Chr1  Chromosome = "1"
	Chr2  Chromosome = "2"
	Chr3  Chromosome = "3"
	Chr4  Chromosome = "4"
	Chr5  Chromosome = "5"
	Chr6  Chromosome = "6"
	Chr7  Chromosome = "7"
	Chr8  Chromosome = "8"
	Chr9  Chromosome = "9"
	Chr10 Chromosome = "10"
	Chr11 Chromosome = "11"
	Chr12 Chromosome = "12"
	Chr13 Chromosome = "13"
	Chr14 Chromosome = "14"
	Chr15 Chromosome = "15"
	Chr16 Chromosome = "16"
	Chr17 Chromosome = "17"
	Chr18 Chromosome = "18"
	Chr19 Chromosome = "19"
	Chr20 Chromosome = "20"
	Chr21 Chromosome = "21"
	Chr22 Chromosome = "22"
	ChrX  Chromosome = "X"
	ChrY  Chromosome = "Y"
	// ChrMT is the mitochondrial DNA.
	ChrMT Chromosome = "MT"
	// ChrPAR and ChrPAR2 are the pseudoautosomal regions.
	// The Psuedoautosomal regions are regions of the X and Y chromosomes
	// that share homology and thus recombine during meiosis.
	// Variants in these regions are mapped to both sex chromosomes.
	ChrPAR  Chromosome = "PAR"
	ChrPAR2 Chromosome = "PAR2"
)

Chromosome constants.

func (Chromosome) Length added in v0.8.2

func (c Chromosome) Length(reference Reference) int64

Length returns the length of the chromosome in base pairs.

func (Chromosome) Less added in v0.8.2

func (c Chromosome) Less(comparison Chromosome) bool

Less returns true if the chromosome is less than the argument.

func (Chromosome) String added in v0.8.2

func (c Chromosome) String() string

type Reference added in v0.2.0

type Reference string

Reference is a reference genome assembly.

const (
	ReferenceNCBI36               Reference = "NCBI36"
	ReferenceGRCh37               Reference = "GRCh37"
	ReferenceGRCh38               Reference = "GRCh38"
	ReferenceTelomereToTelomereV2 Reference = "T2T-CHM13v2.0"
)

type Variant

type Variant struct {
	ID         int64        `db:"id"`         // Unique ID of the variant (RSID).
	Chromosome Chromosome   `db:"chromosome"` // Chromosome on which the variant is located.
	Position   int64        `db:"position"`   // Position of the variant on the chromosome.
	Class      VariantClass `db:"class"`      // Class of the variant, e.g., SNV, INDEL, INS, DEL, MNV.
}

Variant is a genomic variant (based on dbSNP).

type VariantClass

type VariantClass string

VariantClass is the class of a genomic variant.

const (
	// Single Nucleotide Variant: a variation in which a single nucleotide (base pair) is altered.
	VariantClassSNV VariantClass = "SNV"
	// INsertion/DELetion: a small insertion or deletion of bases in the DNA.
	VariantClassINDEL VariantClass = "INDEL"
	// INSertion: a type of variation where extra base pairs are inserted into a new place in the DNA.
	VariantClassINS VariantClass = "INS"
	// DELetion: a type of variation where some base pairs are deleted from the DNA.
	VariantClassDEL VariantClass = "DEL"
	// MultiNucleotide Variant: a variation where two or more nucleotides are replaced with other nucleotides.
	VariantClassMNV VariantClass = "MNV"
)

Jump to

Keyboard shortcuts

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