Expand description
Get the most commonly used genome builds.
We provide several common genome build out-of-shelf. Other builds can be loaded from a genome assembly report.
§Bundled genome builds
These bundled genome builds can be loaded using the respective loader function:
- GRCh37.p13:
get_grch37_p13 - GRCh38.p13:
get_grch38_p13
§Example
Load GRCh38.p13 (Homo sapiens):
use dabuild::{GenomeBuild, GenomeBuildIdentifier};
use dabuild::builds::get_grch38_p13;
let build: GenomeBuild = get_grch38_p13();§Load from an assembly report
A genome build can be loaded from the Genome Reference Consortium assembly report
using parse_assembly_report function.
For instance, GRCm39 can be loaded from an example assembly report:
use std::{fs::File, io::BufReader, str::FromStr};
let path = "data/GCF_000001635.27_GRCm39_assembly_report.txt";
let build: GenomeBuild = parse_assembly_report(
GenomeBuildIdentifier::from_str("GRCm39").expect("Infallible"),
BufReader::new(File::open(path).expect("File should be present and readable")),
).expect("No I/O or format issues");
assert_eq!(build.id().major_assembly(), "GRCm39");Enums§
- Genome
Assembly Parse Error - Represents the reasons for which parsing of the genome assembly report can fail.
Functions§
- get_
grch37_ p13 - Get the GRCh37.p13 build.
- get_
grch38_ p13 - Get the GRCh38.p13 build.
- parse_
assembly_ report - Parse an assembly report into a
GenomeBuild.