Skip to content

Commit

Permalink
style: Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
xiamaz committed Oct 5, 2023
1 parent 06a58cb commit 4216ee8
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/annotate/seqvars/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,12 @@ impl VarFishSeqvarTsvWriter {
None => Ok(-1),
// cf. https://github.com/zaeleus/noodles/issues/164
// _ => anyhow::bail!(format!("invalid GQ value {:?} in {:#?}", value, sample)),
_ => anyhow::bail!(format!("invalid GQ value {:?} at {:?}:{:?}", value, record.chromosome(), record.position())),
_ => anyhow::bail!(format!(
"invalid GQ value {:?} at {:?}:{:?}",
value,
record.chromosome(),
record.position()
)),
})
.transpose()?
{
Expand All @@ -823,13 +828,20 @@ impl VarFishSeqvarTsvWriter {
.get(&key::Key::from_str("SQ")?)
.map(|value| match value {
Some(sample::Value::Float(f)) => Ok(*f),
Some(sample::Value::Array(sample::value::Array::Float(f))) => Ok(f[0].expect("SQ should be a single float value")),
Some(sample::Value::Array(sample::value::Array::Float(f))) => {
Ok(f[0].expect("SQ should be a single float value"))
}
None => Ok(-1.0),
// cf. https://github.com/zaeleus/noodles/issues/164
// _ => anyhow::bail!(format!("invalid GQ value {:?} in {:#?}", value, sample)),
// _ => anyhow::bail!(format!("invalid GQ value {:?}", value)),
_ => {
anyhow::bail!(format!("invalid SQ value {:?} at {:?}:{:?}", value, record.chromosome(), record.position()))
anyhow::bail!(format!(
"invalid SQ value {:?} at {:?}:{:?}",
value,
record.chromosome(),
record.position()
))
}
})
.transpose()?
Expand Down

0 comments on commit 4216ee8

Please sign in to comment.