Struct rust_htslib::bcf::record::Record [] [src]

pub struct Record {
    pub inner: *mut bcf1_t,
    // some fields omitted
}

A BCF record. New records can be created by the empty_record methods of bcf::Reader and bcf::Writer.

Fields

Methods

impl Record
[src]

[src]

Return associated header.

[src]

Return reference to the inner C struct.

Remarks

Note that this function is only required as long as Rust-Htslib does not provide full access to all aspects of Htslib.

[src]

Return mutable reference to inner C struct.

Remarks

Note that this function is only required as long as Rust-Htslib does not provide full access to all aspects of Htslib.

[src]

Get the reference id of the record.

To look up the contig name, use bcf::header::HeaderView::rid2name.

Returns

  • Some(rid) if the internal rid is set to a value that is not -1
  • None if the internal rid is set to -1

[src]

[src]

[src]

Set 0-based position.

Important traits for Vec<u8>
[src]

Return the value of the ID column.

When empty, returns b".".to_vec().

[src]

Update the ID string to the given value.

[src]

Clear the ID column (set it to ".").

[src]

Add the ID string (the ID field is semicolon-separated), checking for duplicates.

Important traits for Filters<'a>
[src]

Return Filters iterator for enumerating all filters that have been set.

A record having the PASS filter will return an empty Filter here.

[src]

Query whether the filter with the given ID has been set.

Arguments

  • flt_id - The filter ID to query for.

[src]

Set the given filters IDs to the FILTER column.

Setting an empty slice removes all filters.

Arguments

  • flt_ids - The identifiers of the filter values to set.

[src]

Add the given filter to the FILTER column.

If val corresponds to "PASS" then all existing filters are removed first. If other than "PASS", then existing "PASS" is removed.

Arguments

  • flt_id - The corresponding filter ID value to add.

[src]

Remove the given filter from the FILTER column.

Arguments

  • val - The corresponding filter ID to remove.
  • pass_on_empty - Set to "PASS" when removing the last value.

Important traits for Vec<u8>
[src]

Get alleles strings.

The first allele is the reference allele.

[src]

Set alleles.

[src]

Get variant quality.

[src]

Set variant quality.

[src]

Get the value of the given info tag.

[src]

Get the number of samples.

[src]

Get the number of alleles, including reference allele.

[src]

Get genotypes as vector of one Genotype per sample.

[src]

Get the value of the given format tag for each sample.

[src]

Add an integer-typed FORMAT tag.

Arguments

  • tag - The tag's string.
  • data - a flattened, two-dimensional array, the first dimension contains one array for each sample.

Errors

Returns error if tag is not present in header.

[src]

Add a float-typed FORMAT tag.

Arguments

  • tag - The tag's string.
  • data - a flattened, two-dimensional array, the first dimension contains one array for each sample.

Errors

Returns error if tag is not present in header.

[src]

Add a char-typed FORMAT tag.

Arguments

  • tag - The tag's string.
  • data - a flattened, two-dimensional array, the first dimension contains one array for each sample.

Errors

Returns error if tag is not present in header.

[src]

Add a string-typed FORMAT tag.

Arguments

  • tag - The tag's string.
  • data - a flattened, two-dimensional array, the first dimension contains one array for each sample.

Errors

Returns error if tag is not present in header.

[src]

Add an integer-typed INFO entry.

[src]

Remove the integer-typed INFO entry.

[src]

Add a float-typed INFO entry.

[src]

Remove the float-typed INFO entry.

[src]

Set flag into the INFO column.

[src]

Remove the flag from the INFO column.

[src]

Add a string-typed INFO entry.

[src]

Remove the string field from the INFO column.

[src]

Remove unused alleles.

Trait Implementations

impl Debug for Record
[src]

[src]

Formats the value using the given formatter. Read more

impl Drop for Record
[src]

[src]

Executes the destructor for this type. Read more

impl Send for Record
[src]

impl Sync for Record
[src]