Skip to content

Commit

Permalink
work on writer
Browse files Browse the repository at this point in the history
  • Loading branch information
brentp committed Dec 13, 2024
1 parent d878849 commit b472ee1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@ use crate::position::Position;
use crate::report::{Report, ReportFragment};
use crate::sniff::HtsFile;
use bio::io::bed;
<<<<<<< HEAD
use rust_htslib::bam;
use rust_htslib::bcf::{self, header::HeaderView};
use rust_htslib::htslib as hts;
=======
use rust_htslib::bcf::{self, header::HeaderView};
use rust_htslib::htslib as hts;
use rust_htslib::{bam, sam};
>>>>>>> 1daae3a (work on writer)
use std::mem;
use std::path::Path;
use std::rc::Rc;
use std::result::Result;
use std::string::String;
Expand Down Expand Up @@ -252,6 +259,7 @@ impl Writer {
Self::add_info_field_to_vcf_record(&mut vcf_record, cr.name(), value)?;
}
}
let vcf_record = record.record;

vcf_writer.write(&vcf_record).map_err(|e| {
std::io::Error::new(std::io::ErrorKind::InvalidData, e.to_string())
Expand All @@ -273,6 +281,7 @@ impl Writer {
if let Ok(value) = cr.value(fragment) {
br.push_aux(self.format_value(&value).as_str());
}
writeln!(writer)?;
}

if let GenomicWriter::Bed(ref mut writer) = self.writer {
Expand Down

0 comments on commit b472ee1

Please sign in to comment.