Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions rust/bioscript-formats/src/genotype/delimited/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,17 @@ pub(crate) fn scan_delimited_variants(

for (idx, variant) in indexed {
if results[idx].genotype.is_none() {
results[idx] = VariantObservation {
backend: backend.backend_name().to_owned(),
evidence: vec![format!(
let evidence = if variant.has_coordinates() {
format!(
"no matching rsid or locus found for {}",
describe_query(variant)
)],
)
} else {
"no matching rsid found".to_owned()
};
results[idx] = VariantObservation {
backend: backend.backend_name().to_owned(),
evidence: vec![evidence],
..VariantObservation::default()
};
}
Expand Down
6 changes: 2 additions & 4 deletions rust/bioscript-runtime/tests/security.rs
Original file line number Diff line number Diff line change
Expand Up @@ -546,11 +546,9 @@ if __name__ == "__main__":
let output = fs::read_to_string(dir.join("outputs/batch.txt")).unwrap();
assert!(output.contains("CT"), "{output}");
assert!(output.contains("AG"), "{output}");
assert!(output.contains("None"), "{output}");
assert!(output.contains("VariantObservation"), "{output}");
assert!(
output.contains("no matching rsid or locus found"),
"{output}"
);
assert!(output.contains("no matching"), "{output}");
let timings = runtime.timing_snapshot();
assert!(
timings
Expand Down
Loading