Skip to main content

Crate use_gene

Crate use_gene 

Source
Expand description

§use-gene

Primitive gene identity vocabulary.

use-gene stores descriptive gene identifiers, symbols, names, loci, alleles, and genotypes. It does not implement sequence alignment, genome annotation, FASTA/FASTQ parsing, variant calling, mutation-effect prediction, or medical interpretation.

use use_gene::{Allele, GeneSymbol, Genotype, Locus};

let symbol = GeneSymbol::new("BRCA1").unwrap();
let locus = Locus::new("17q21.31").unwrap();
let genotype = Genotype::new(vec![Allele::new("A").unwrap(), Allele::new("a").unwrap()]);

assert_eq!(symbol.to_string(), "BRCA1");
assert_eq!(locus.to_string(), "17q21.31");
assert_eq!(genotype.to_string(), "A/a");

Structs§

Allele
A non-empty descriptive allele identifier.
GeneId
A stable gene identifier string.
GeneName
A non-empty descriptive gene name.
GeneSymbol
A non-empty gene symbol that preserves caller casing.
Genotype
An ordered descriptive genotype value.
Locus
A non-empty descriptive locus identifier.

Enums§

GeneValueError
Error returned when gene vocabulary values are empty.