Struct rust_htslib::bcf::record::Record
[−]
[src]
pub struct Record { pub inner: *mut bcf1_t, pub header: *mut bcf_hdr_t, // some fields omitted }
Fields
inner: *mut bcf1_t
header: *mut bcf_hdr_t
Methods
impl Record
[src]
fn new() -> Self
fn inner(&self) -> &bcf1_t
fn inner_mut(&mut self) -> &mut bcf1_t
fn rid(&self) -> Option<u32>
fn pos(&self) -> u32
fn set_pos(&mut self, pos: i32)
fn alleles(&self) -> Vec<&[u8]>
fn qual(&self) -> f32
fn set_qual(&mut self, qual: f32)
fn info<'a>(&'a mut self, tag: &'a [u8]) -> Info
Get the value of the given info tag.
fn sample_count(&self) -> u32
fn allele_count(&self) -> u16
fn genotypes(&mut self) -> Result<Genotypes, FormatReadError>
Get genotypes as vector of one Genotype
per sample.
fn format<'a>(&'a mut self, tag: &'a [u8]) -> Format
Get the value of the given format tag for each sample.
fn push_format_integer(&mut self, tag: &[u8], data: &[i32]) -> Result<(), TagWriteError>
Add an integer format tag. Data is a flattened two-dimensional array. The first dimension contains one array for each sample. Returns error if tag is not present in header.
fn push_format_float(&mut self, tag: &[u8], data: &[f32]) -> Result<(), TagWriteError>
Add a float format tag. Data is a flattened two-dimensional array. The first dimension contains one array for each sample. Returns error if tag is not present in header.
fn push_info_integer(&mut self, tag: &[u8], data: &[i32]) -> Result<(), TagWriteError>
Add an integer info tag.
fn push_info_float(&mut self, tag: &[u8], data: &[f32]) -> Result<(), TagWriteError>
Add a float info tag.
fn push_info<T>(&mut self, tag: &[u8], data: &[T], ht: i32) -> Result<(), TagWriteError>
Add an info tag.
fn trim_alleles(&mut self) -> Result<(), TrimAllelesError>
Remove unused alleles.