Struct noodles::sam::header::ReadGroup[][src]

pub struct ReadGroup { /* fields omitted */ }
Expand description

A SAM header read group.

A read group typically defines the set of reads that came from the same run on a sequencing instrument. The read group ID is guaranteed to be set.

Implementations

Creates a SAM header read group builder.

Examples

use noodles_sam::header::ReadGroup;
let builder = ReadGroup::builder();

Creates a read group with an ID.

Examples

use noodles_sam::header::ReadGroup;
let read_group = ReadGroup::new("rg0");
assert_eq!(read_group.id(), "rg0");

Returns the read group ID.

Examples

use noodles_sam::header::ReadGroup;
let read_group = ReadGroup::new("rg0");
assert_eq!(read_group.id(), "rg0");

Returns a mutable reference to the read group ID.

Examples

use noodles_sam::header::ReadGroup;

let mut read_group = ReadGroup::new("rg0");
assert_eq!(read_group.id(), "rg0");

*read_group.id_mut() = String::from("rg1");
assert_eq!(read_group.id(), "rg1");

Returns the barcode sequence.

Examples

use noodles_sam::header::ReadGroup;
let read_group = ReadGroup::new("rg0");
assert!(read_group.barcode().is_none());

Returns the sequencing center.

Examples

use noodles_sam::header::ReadGroup;
let read_group = ReadGroup::new("rg0");
assert!(read_group.sequencing_center().is_none());

Returns the description.

Examples

use noodles_sam::header::ReadGroup;
let read_group = ReadGroup::new("rg0");
assert!(read_group.description().is_none());

Returns the datatime of run.

Examples

use noodles_sam::header::ReadGroup;
let read_group = ReadGroup::new("rg0");
assert!(read_group.produced_at().is_none());

Returns the flow order.

Examples

use noodles_sam::header::ReadGroup;
let read_group = ReadGroup::new("rg0");
assert!(read_group.flow_order().is_none());

Returns the key sequence.

Examples

use noodles_sam::header::ReadGroup;
let read_group = ReadGroup::new("rg0");
assert!(read_group.key_sequence().is_none());

Returns the library.

Examples

use noodles_sam::header::ReadGroup;
let read_group = ReadGroup::new("rg0");
assert!(read_group.library().is_none());

Returns the programs used.

Examples

use noodles_sam::header::ReadGroup;
let read_group = ReadGroup::new("rg0");
assert!(read_group.program().is_none());

Returns the predicted median insert size.

Examples

use noodles_sam::header::ReadGroup;
let read_group = ReadGroup::new("rg0");
assert!(read_group.predicted_median_insert_size().is_none());

Returns the platform used.

Examples

use noodles_sam::header::ReadGroup;
let read_group = ReadGroup::new("rg0");
assert!(read_group.platform().is_none());

Returns the platform model.

Examples

use noodles_sam::header::ReadGroup;
let read_group = ReadGroup::new("rg0");
assert!(read_group.platform_model().is_none());

Returns the platform unit.

Examples

use noodles_sam::header::ReadGroup;
let read_group = ReadGroup::new("rg0");
assert!(read_group.platform_unit().is_none());

Returns the sample.

Examples

use noodles_sam::header::ReadGroup;
let read_group = ReadGroup::new("rg0");
assert!(read_group.sample().is_none());

Returns the raw fields of the read group.

This includes any field that is not specially handled by the structure itself. For example, this will not include the ID field, as it is parsed and available as Self::id.

Examples

use noodles_sam::header::{read_group::Tag, ReadGroup};

let read_group = ReadGroup::builder()
    .set_id("rg0")
    .insert(Tag::Other(String::from("zn")), String::from("noodles"))
    .build()?;

let fields = read_group.fields();
assert_eq!(fields.len(), 1);
assert_eq!(
    fields.get(&Tag::Other(String::from("zn"))),
    Some(&String::from("noodles"))
);

assert_eq!(fields.get(&Tag::Id), None);
assert_eq!(read_group.id(), "rg0");

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.