Struct rust_htslib::bcf::record::Record
[−]
[src]
pub struct Record { pub inner: *mut bcf1_t, pub header: *mut bcf_hdr_t, // some fields omitted }
A BCF record.
Fields
inner: *mut bcf1_t
header: *mut bcf_hdr_t
Methods
impl Record
[src]
fn new() -> Self
[src]
fn inner(&self) -> &bcf1_t
[src]
fn inner_mut(&mut self) -> &mut bcf1_t
[src]
fn rid(&self) -> Option<u32>
[src]
fn pos(&self) -> u32
[src]
fn set_pos(&mut self, pos: i32)
[src]
Set 0-based position.
fn alleles(&self) -> Vec<&[u8]>
[src]
Get alleles. The first allele is the reference allele.
fn qual(&self) -> f32
[src]
Get variant quality.
fn set_qual(&mut self, qual: f32)
[src]
Set variant quality.
fn info<'a>(&'a mut self, tag: &'a [u8]) -> Info
[src]
Get the value of the given info tag.
fn sample_count(&self) -> u32
[src]
Get the number of samples.
fn allele_count(&self) -> u16
[src]
Get the number of alleles, including reference allele.
fn genotypes(&mut self) -> Result<Genotypes, FormatReadError>
[src]
Get genotypes as vector of one Genotype
per sample.
fn format<'a>(&'a mut self, tag: &'a [u8]) -> Format
[src]
Get the value of the given format tag for each sample.
fn push_format_integer(
&mut self,
tag: &[u8],
data: &[i32]
) -> Result<(), TagWriteError>
[src]
&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>
[src]
&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>
[src]
&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>
[src]
&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>
[src]
&mut self,
tag: &[u8],
data: &[T],
ht: i32
) -> Result<(), TagWriteError>
Add an info tag.
fn trim_alleles(&mut self) -> Result<(), TrimAllelesError>
[src]
Remove unused alleles.