pub fn try_into_vcf_record_genotypes(
        &self,
        header: &vcf::Header,
        string_map: &StringMap,
    ) -> io::Result<vcf::record::Genotypes> {
        use crate::reader::record::read_genotypes;

        if self.is_empty() {
            return Ok(vcf::record::Genotypes::default());
        }

        let mut reader = &self.buf[..];

        let genotypes = read_genotypes(
            &mut reader,
            header.formats(),
            string_map,
            self.len(),
            self.format_count(),
        )?;

        Ok(genotypes)
    }
/// Converts BCF record genotypes to VCF record genotypes.
///
/// # Examples
///
/// ```
/// # use std::io;
/// use noodles_bcf::{header::StringMap, record::Genotypes};
/// use noodles_vcf as vcf;
///
/// let bcf_genotypes = Genotypes::default();
///
/// let header = vcf::Header::default();
/// let string_map = StringMap::default();
/// let vcf_genotypes = bcf_genotypes.try_into_vcf_record_genotypes(&header, &string_map)?;
///
/// assert!(vcf_genotypes.is_empty());
/// # Ok::<_, io::Error>(())
/// ```
Converts BCF record genotypes to VCF record genotypes.
Converts BCF record genotypes to VCF record genotypes .
pub fn try_into_vcf_record_genotypes(
        &self,
        header: &vcf::Header,
        string_map: &StringMap,
    ) -> io::Result<vcf::record::Genotypes> {
        use crate::reader::record::read_genotypes;
        if self.is_empty() {
            return Ok(vcf::record::Genotypes::default());
        }
        let mut reader = &self.buf[..];
        let genotypes = read_genotypes(
            &mut reader,
            header.formats(),
            string_map,
            self.len(),
            self.format_count(),
        )?;
        Ok(genotypes)
    }
pub fn try_into_vcf_record_genotypes ( & self , header : & vcf :: Header , string_map : & StringMap , ) -> io :: Result < vcf :: record :: Genotypes > { use crate :: reader :: record :: read_genotypes ; if self . is_empty ( ) { return Ok ( vcf :: record :: Genotypes :: default ( ) ) ; } let mut reader = & self . buf [ .. ] ; let genotypes = read_genotypes ( & mut reader , header . formats ( ) , string_map , self . len ( ) , self . format_count ( ) , ) ? ; Ok ( genotypes ) }
Converts BCF record genotypes to VCF record genotypes.
Converts BCF record genotypes to VCF record genotypes .
&self
header
&vcf::Header
string_map
&StringMap
&self
header
&vcf::Header
string_map
&StringMap
examples
None
use std::io;
use noodles_bcf::{header::StringMap, record::Genotypes};
use noodles_vcf as vcf.

let bcf_genotypes = Genotypes::default().

let header = vcf::Header::default();
let string_map = StringMap::default();
let vcf_genotypes = bcf_genotypes.try_into_vcf_record_genotypes(&header, &string_map)?.

assert!(vcf_genotypes.is_empty()).
use noodles_bcf :: { header :: StringMap record :: Genotypes } ; use noodles_vcf as vcf . let bcf_genotypes = Genotypes :: default () . let header = vcf :: Header :: default () ; let string_map = StringMap :: default () ; let vcf_genotypes = bcf_genotypes . try_into_vcf_record_genotypes ( &header &string_map ) ? . assert! ( vcf_genotypes . is_empty () ) .
ok::<_, io::error>(())
None