MCPcopy Create free account
hub / github.com/alignoth/alignoth / get_fasta_contigs

Function get_fasta_contigs

src/utils.rs:48–56  ·  view source on GitHub ↗

Get all contigs/chromosomes from fasta file

(fasta_path: &PathBuf)

Source from the content-addressed store, hash-verified

46
47// Get all contigs/chromosomes from fasta file
48pub(crate) fn get_fasta_contigs(fasta_path: &PathBuf) -> Result<Vec<String>> {
49 let fasta_reader = fasta::Reader::from_file(fasta_path)?;
50 let mut contigs = Vec::new();
51 for record in fasta_reader.records() {
52 let record = record?;
53 contigs.push(record.id().to_string());
54 }
55 Ok(contigs)
56}
57
58/// Takes any given aux and returns a string representation of it.
59pub(crate) fn aux_to_string(aux: rust_htslib::bam::record::Aux) -> String {

Callers 2

test_get_fasta_contigsFunction · 0.85
wizard_modeFunction · 0.85

Calls 1

OkFunction · 0.85

Tested by 1

test_get_fasta_contigsFunction · 0.68