Skip to content

Commit

Permalink
add skip no m6a opts
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvollger committed Dec 15, 2023
1 parent 026862a commit a98c064
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ pub struct FireOptions {
/// Output just FIRE elements in bed9 format
#[clap(short, long)]
pub extract: bool,
/// Don't write reads with no m6A calls to the output bam
#[clap(short, long)]
pub skip_no_m6a: bool,
/// Width of bin for feature collection
#[clap(short, long, default_value = "40")]
pub width_bin: i64,
Expand Down
3 changes: 3 additions & 0 deletions src/fire.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,9 @@ pub fn add_fire_to_bam(fire_opts: &FireOptions) -> Result<(), anyhow::Error> {
else {
let mut out = bam_writer(&fire_opts.out, &bam, 8);
for mut rec in FiberseqRecords::new(&mut bam, 0) {
if fire_opts.skip_no_m6a && rec.m6a.starts.is_empty() {
continue;
}
let fire_feats = FireFeats::new(&rec, fire_opts);
let mut precisions = fire_feats.predict_with_xgb(&model, &precision_table);
if rec.record.is_reverse() {
Expand Down

0 comments on commit a98c064

Please sign in to comment.