Struct noodles::sam::header::read_group::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
Auto Trait Implementations
impl RefUnwindSafe for ReadGroup
impl UnwindSafe for ReadGroup
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.