Skip to content

Commit

Permalink
fix: use new Debug trait implementation in Sample
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Oct 6, 2023
1 parent 874952c commit 6594b41
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions src/annotate/seqvars/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -780,9 +780,7 @@ impl VarFishSeqvarTsvWriter {
.map(|value| match value {
Some(sample::Value::Integer(i)) => Ok(*i),
None => Ok(-1),
// cf. https://github.com/zaeleus/noodles/issues/164
// _ => anyhow::bail!(format!("invalid DP value {:?} in {:#?}", value, sample)),
_ => anyhow::bail!(format!("invalid DP value {:?}", value)),
_ => anyhow::bail!(format!("invalid DP value {:?} in {:#?}", value, sample)),

Check warning on line 783 in src/annotate/seqvars/mod.rs

View check run for this annotation

Codecov / codecov/patch

src/annotate/seqvars/mod.rs#L783

Added line #L783 was not covered by tests
})
.transpose()?
{
Expand All @@ -796,9 +794,7 @@ impl VarFishSeqvarTsvWriter {
Ok(arr[1].expect("missing AD value"))
}
None => Ok(-1),
// cf. https://github.com/zaeleus/noodles/issues/164
// _ => anyhow::bail!(format!("invalid AD value {:?} in {:#?}", value, sample)),
_ => anyhow::bail!(format!("invalid AD value {:?}", value)),
_ => anyhow::bail!(format!("invalid AD value {:?} in {:#?}", value, sample)),

Check warning on line 797 in src/annotate/seqvars/mod.rs

View check run for this annotation

Codecov / codecov/patch

src/annotate/seqvars/mod.rs#L797

Added line #L797 was not covered by tests
})
.transpose()?
{
Expand All @@ -810,11 +806,10 @@ impl VarFishSeqvarTsvWriter {
.map(|value| match value {
Some(sample::Value::Integer(i)) => Ok(*i),
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 {:?}:{:?}",
"invalid GQ value {:?} in {:#?} at {:?}:{:?}",
value,
sample,
record.chromosome(),
record.position()
)),
Expand All @@ -832,13 +827,11 @@ impl VarFishSeqvarTsvWriter {
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 {:?}:{:?}",
"invalid SQ value {:?} in {:#?} at {:?}:{:?}",
value,
sample,
record.chromosome(),
record.position()
))
Expand Down

0 comments on commit 6594b41

Please sign in to comment.