|
@@ -258,6 +258,8 @@ impl VcfVariant {
|
|
|
if let Ok(bnd_desc) = self.bnd_desc() {
|
|
if let Ok(bnd_desc) = self.bnd_desc() {
|
|
|
if bnd_desc.a_contig != bnd_desc.b_contig {
|
|
if bnd_desc.a_contig != bnd_desc.b_contig {
|
|
|
AlterationCategory::TRL
|
|
AlterationCategory::TRL
|
|
|
|
|
+ } else if bnd_desc.a_sens != bnd_desc.b_sens {
|
|
|
|
|
+ AlterationCategory::DELINV
|
|
|
} else {
|
|
} else {
|
|
|
AlterationCategory::DEL
|
|
AlterationCategory::DEL
|
|
|
}
|
|
}
|
|
@@ -336,15 +338,14 @@ impl VcfVariant {
|
|
|
return Some(len);
|
|
return Some(len);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- match self.bnd_desc() {
|
|
|
|
|
|
|
+ match self.bnd_desc() {
|
|
|
Ok(bnd_desc) if bnd_desc.a_contig == bnd_desc.b_contig => {
|
|
Ok(bnd_desc) if bnd_desc.a_contig == bnd_desc.b_contig => {
|
|
|
if bnd_desc.a_position < bnd_desc.b_position {
|
|
if bnd_desc.a_position < bnd_desc.b_position {
|
|
|
- return Some(bnd_desc.b_position - bnd_desc.a_position)
|
|
|
|
|
|
|
+ return Some(bnd_desc.b_position - bnd_desc.a_position);
|
|
|
} else {
|
|
} else {
|
|
|
-
|
|
|
|
|
- return Some(bnd_desc.a_position - bnd_desc.b_position)
|
|
|
|
|
|
|
+ return Some(bnd_desc.a_position - bnd_desc.b_position);
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
_ => (),
|
|
_ => (),
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -889,6 +890,7 @@ pub enum AlterationCategory {
|
|
|
CNV,
|
|
CNV,
|
|
|
TRL,
|
|
TRL,
|
|
|
BND,
|
|
BND,
|
|
|
|
|
+ DELINV,
|
|
|
Other,
|
|
Other,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -904,8 +906,10 @@ impl fmt::Display for AlterationCategory {
|
|
|
AlterationCategory::DUP => "DUP",
|
|
AlterationCategory::DUP => "DUP",
|
|
|
AlterationCategory::INV => "INV",
|
|
AlterationCategory::INV => "INV",
|
|
|
AlterationCategory::CNV => "CNV",
|
|
AlterationCategory::CNV => "CNV",
|
|
|
- AlterationCategory::BND | AlterationCategory::TRL => "TRL",
|
|
|
|
|
|
|
+ AlterationCategory::BND => "BND",
|
|
|
|
|
+ AlterationCategory::TRL => "TRL",
|
|
|
AlterationCategory::Other => "Other",
|
|
AlterationCategory::Other => "Other",
|
|
|
|
|
+ AlterationCategory::DELINV => "DELINV",
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|