atglib/gtf/
mod.rs

1//! Convert from/to GTF
2//!
3//! The GTF section is written for GTF2.2 as defined by
4//! [the Brent lab](https://mblab.wustl.edu/GTF22.html) and
5//! [UCSC](http://genome.ucsc.edu/FAQ/FAQformat.html#format4).
6//!
7//! # GTF specs
8//! GTF2.2 files must contain the following columns:
9//!
10//! | Column | Mandatory | Type | Explanation |
11//! | --- | --- | --- | --- |
12//! | seqname | Yes | str | The name of the sequence. Commonly, this is the chromosome ID or contig ID. Note that the coordinates used must be unique within each sequence name in all GTFs for an annotation set. |
13//! | source  | Yes | str | The source column should be a unique label indicating where the annotations came from --- typically the name of either a prediction program or a public database. |
14//! | feature  | Yes | enum("CDS", "start_codon", "stop_codon", "5UTR", "3UTR", "inter", "inter_CNS", "intron_CNS", "exon") | The following feature types are required: "CDS", "start_codon", "stop_codon". The features "5UTR", "3UTR", "inter", "inter_CNS", "intron_CNS" and "exon" are optional. All other features will be ignored. The types must have the correct capitalization shown here. |
15//! | start | Yes | u32 | The leftmost position of the feature. Inclusive |
16//! | end | Yes | u32 | The rightmost position of the feature. Inclusive |
17//! | score | Yes | float | The score field indicates a degree of confidence in the feature's existence and coordinates |
18//! | strand | Yes | enum("+", "-") | The strand of the feature |
19//! | frame | Yes | enum(0, 1, 2) | The frame-offset of the feature |
20//! | attributes | Yes | str | key=value list (separated by ; ) **Must contain gene_id and transcript_id** (all other fields will be ignored)|
21//! | comments  | Optional | str | Additional comments about the feature (this column is ignored)|
22//!
23
24mod constants;
25mod reader;
26mod record;
27mod transcript;
28mod writer;
29
30pub use crate::gtf::reader::Reader;
31pub use crate::gtf::record::{GtfFeature, GtfRecord, GtfRecordBuilder};
32use crate::gtf::transcript::GtfRecordsGroup;
33pub use crate::gtf::writer::Writer;