1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
//! # gxf2bed
//!
//! The fastest GTF/GFF-to-BED converter chilling around.
//!
//! This library provides high-performance conversion of GTF and GFF3 files to various BED formats.
//! It leverages parallel processing and memory mapping for optimal performance on large genomic
//! annotation files.
//!
//! ## Usage
//!
//! ```rust, ignore
//! use gxf2bed::{Config, run};
//! use std::path::PathBuf;
//!
//! let config = Config {
//! input: PathBuf::from("annotations.gtf"),
//! output: PathBuf::from("output.bed"),
//! threads: 4,
//! parent_feature: Some("transcript".to_string()),
//! child_features: Some(vec!["exon".to_string()]),
//! parent_attribute: Some("transcript_id".to_string()),
//! child_attribute: None,
//! bed_type: gxf2bed::BedType::Bed12,
//! additional_fields: None,
//! chunks: 15000,
//! };
//!
//! let stats = run(&config)?;
//! println!("Conversion completed in {:?}", stats.elapsed);
//! println!("Memory used: {:.2} MB", stats.mem_delta_mb);
//! ```
//!
//! ## Examples
//!
//! ### Basic conversion
//!
//! ```rust, ignore
//! use gxf2bed::{Config, run, BedType};
//! use std::path::PathBuf;
//!
//! let config = Config {
//! input: PathBuf::from("input.gtf"),
//! output: PathBuf::from("output.bed"),
//! threads: num_cpus::get(),
//! parent_feature: Some("transcript".to_string()),
//! child_features: Some(vec!["exon".to_string()]),
//! parent_attribute: Some("transcript_id".to_string()),
//! child_attribute: None,
//! bed_type: BedType::Bed12,
//! additional_fields: None,
//! chunks: 15000,
//! };
//!
//! let stats = run(&config)?;
//! ```
//! ### Conversion with additional fields
//!
//! ```rust, ignore
//! use gxf2bed::{Config, run, BedType};
//! use std::path::PathBuf;
//!
//! let config = Config {
//! input: PathBuf::from("input.gtf"),
//! output: PathBuf::from("output.bed"),
//! threads: 4,
//! parent_feature: Some("transcript".to_string()),
//! child_features: Some(vec!["exon".to_string()]),
//! parent_attribute: Some("transcript_id".to_string()),
//! child_attribute: None,
//! bed_type: BedType::Bed12,
//! additional_fields: Some(vec!["gene_name".to_string(), "gene_biotype".to_string()]),
//! chunks: 15000,
//! };
//!
//! let stats = run(&config)?;
//! ```
//! ### Converting GFF3 files
//!
//! ```rust, ignore
//! use gxf2bed::{Config, run, BedType};
//! use std::path::PathBuf;
//!
//! let config = Config {
//! input: PathBuf::from("input.gff3"),
//! output: PathBuf::from("output.bed"),
//! threads: 4,
//! parent_feature: Some("mRNA".to_string()),
//! child_features: Some(vec!["exon".to_string()]),
//! parent_attribute: Some("ID".to_string()),
//! child_attribute: None,
//! bed_type: BedType::Bed12,
//! additional_fields: None,
//! chunks: 15000,
//! };
//!
//! let stats = run(&config)?;
//! ```
pub use ;
pub use Config;
pub use ;
pub use ;
pub use max_mem_usage_mb;