Module output

Module output 

Source
Expand description

Output formatting for gene prediction results.

This module provides writers for converting OrphosResults into various standard bioinformatics file formats.

§Supported Formats

  • GenBank (GBK): Feature-rich annotation format with sequences
  • GFF3: General Feature Format version 3
  • GCA: Gene coordinate annotation (tabular)
  • SCO: Simple coordinate output

§Examples

§Write results to a file

use orphos_core::{OrphosAnalyzer, config::{OrphosConfig, OutputFormat}};
use orphos_core::output::write_results;
use std::fs::File;

let mut analyzer = OrphosAnalyzer::new(OrphosConfig::default());
let results = analyzer.analyze_sequence("ATGCGATCG...", None)?;

// Write as GenBank
let mut gbk_file = File::create("output.gbk")?;
write_results(&mut gbk_file, &results, OutputFormat::Genbank)?;

// Write as GFF3
let mut gff_file = File::create("output.gff")?;
write_results(&mut gff_file, &results, OutputFormat::Gff)?;

§Write to stdout

use orphos_core::{OrphosAnalyzer, config::{OrphosConfig, OutputFormat}};
use orphos_core::output::write_results;
use std::io::stdout;

let mut analyzer = OrphosAnalyzer::new(OrphosConfig::default());
let results = analyzer.analyze_sequence("ATGCGATCG...", None)?;

write_results(&mut stdout(), &results, OutputFormat::Gff)?;

Functions§

write_results
Writes gene prediction results in the specified format.