Skip to content

Commit

Permalink
build: update to noodles 0.87
Browse files Browse the repository at this point in the history
  • Loading branch information
tshauck committed Dec 21, 2024
1 parent f971daa commit d866224
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 27 deletions.
47 changes: 29 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ arrow = { version = "53.3.0" }
async-trait = "0.1.82"
datafusion = { version = "43", features = ["compression", "parquet"] }
futures = "0.3"
noodles = { version = "0.86" }
noodles = { version = "0.87" }
object_store = { version = "0.11.0" }
tokio = { version = "1", features = ["io-util"] }
tokio-util = { version = "0.7.13", features = ["compat"] }
Expand Down
18 changes: 10 additions & 8 deletions exon/exon-gff/src/array_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use arrow::{
error::ArrowError,
};
use exon_common::ExonArrayBuilder;
use noodles::gff::Record;
use noodles::gff::{record::Strand, Record};

pub struct GFFArrayBuilder {
seqnames: GenericStringBuilder<i32>,
Expand Down Expand Up @@ -107,19 +107,21 @@ impl GFFArrayBuilder {
6 => {
let strand = record.strand()?;

if strand.as_ref() == "" || strand.as_ref() == "." {
self.strands.append_null();
} else {
self.strands.append_value(strand);
match strand {
Strand::None | Strand::Unknown => self.strands.append_null(),
Strand::Forward => self.strands.append_value("+"),
Strand::Reverse => self.strands.append_value("-"),
}
}
7 => {
let phase = record.phase();

match phase {
Some(Ok(phase)) => {
self.phases.append_value(phase);
}
Some(Ok(phase)) => match phase {
noodles::gff::record::Phase::Zero => self.phases.append_value("0"),
noodles::gff::record::Phase::One => self.phases.append_value("1"),
noodles::gff::record::Phase::Two => self.phases.append_value("2"),
},
Some(Err(e)) => return Err(ArrowError::ExternalError(Box::new(e))),
None => self.phases.append_null(),
}
Expand Down

0 comments on commit d866224

Please sign in to comment.