|
|
@@ -247,15 +247,15 @@ impl VcfVariant {
|
|
|
}
|
|
|
_ => match self.svtype() {
|
|
|
Some(sv_type) => {
|
|
|
- // if let Ok(bnd_desc) = self.bnd_desc() {
|
|
|
- // if bnd_desc.a_contig != bnd_desc.b_contig {
|
|
|
- // AlterationCategory::TRL
|
|
|
- // } else {
|
|
|
- // AlterationCategory::DEL
|
|
|
- // }
|
|
|
- // } else {
|
|
|
+ if let Ok(bnd_desc) = self.bnd_desc() {
|
|
|
+ if bnd_desc.a_contig != bnd_desc.b_contig {
|
|
|
+ AlterationCategory::TRL
|
|
|
+ } else {
|
|
|
+ AlterationCategory::DEL
|
|
|
+ }
|
|
|
+ } else {
|
|
|
AlterationCategory::from(sv_type)
|
|
|
- // }
|
|
|
+ }
|
|
|
},
|
|
|
None => AlterationCategory::Other,
|
|
|
},
|
|
|
@@ -278,7 +278,7 @@ impl VcfVariant {
|
|
|
/// - The b_position cannot be parsed as a number
|
|
|
pub fn bnd_desc(&self) -> anyhow::Result<BNDDesc> {
|
|
|
let alt = self.alternative.to_string();
|
|
|
- if self.alteration_category() == AlterationCategory::BND {
|
|
|
+ if alt.contains('[') || alt.contains(']') {
|
|
|
let b_sens = alt.contains('[');
|
|
|
|
|
|
let a_sens = if b_sens {
|