1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use anyhow::Result;
use super::{Attribute, GtfRecordRef};

#[derive(Debug, Default)]
pub struct GtfRecord {
    pub seqname: Vec<u8>,
    pub source: Vec<u8>,
    pub feature: Vec<u8>,
    pub start: Vec<u8>,
    pub end: Vec<u8>,
    pub score: Vec<u8>,
    pub strand: Vec<u8>,
    pub frame: Vec<u8>,
    pub attribute: Attribute
}
impl GtfRecord {
    pub fn from_bytes(record: &[u8]) -> Result<Self> {
        let ref_record = GtfRecordRef::from_bytes(record)?;
        Ok(ref_record.to_owned())
    }
}