Expand description
§dabuild
dabuild simplifies the access to genome build metadata, including its accession, version,
and contigs.
We list the most common use cases below.
§Load genome build
The builds module provides several bundled genome builds.
Alternatively, you can load a genome build from a Genome Reference Consortium’s (GRC) assembly report.
See the builds documentation for more info.
§Use genome build
GenomeBuild is basically a data container and the usage involves accessing the data.
We show several examples with the GRCh38.p13 genome build.
use dabuild::{GenomeBuild, GenomeBuildIdentifier};
use dabuild::builds::get_grch38_p13;
let build: GenomeBuild = get_grch38_p13();§Check build identifiers
We can check the major assembly and the patch of the build:
assert_eq!(build.id().major_assembly(), "GRCh38");
assert_eq!(build.id().patch(), Some("p13"));§Access contigs
The genome build contains one or more Contigs.
We can iterate over all contigs, e.g. to count them:
let count = build.contigs().count();
assert_eq!(count, 640);and we can also access a specific Contig (e.g. for chrY) by one of its names:
// Query by name ...
let y = build.contig_by_name("Y");
assert!(y.is_some());
// ... or by the GenBank accession ...
let y = build.contig_by_name("CM000686.2");
assert!(y.is_some());
// ... or by the RefSeq accession ...
let y = build.contig_by_name("NC_000024.10");
assert!(y.is_some());
// ... or by the UCSC identifier.
let y = build.contig_by_name("chrY");
assert!(y.is_some());Modules§
- builds
- Get the most commonly used genome builds.
Structs§
- Contig
- The contig data, such as identifiers and its length.
- Genome
Build - Genome build includes the contigs and the genome build metadata.
- Genome
Build Identifier - All information needed to identify a genome build.