|
|
@@ -391,6 +391,25 @@ impl VcfVariant {
|
|
|
}
|
|
|
|
|
|
pub fn deletion_desc(&self) -> Option<DeletionDesc> {
|
|
|
+ match self.bnd_desc() {
|
|
|
+ Ok(bnd_desc) if bnd_desc.a_contig == bnd_desc.b_contig => {
|
|
|
+ if bnd_desc.a_position < bnd_desc.b_position {
|
|
|
+ return Some(DeletionDesc {
|
|
|
+ contig: bnd_desc.a_contig,
|
|
|
+ start: bnd_desc.a_position,
|
|
|
+ end: bnd_desc.b_position
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return Some(DeletionDesc {
|
|
|
+ contig: bnd_desc.a_contig,
|
|
|
+ start: bnd_desc.b_position,
|
|
|
+ end: bnd_desc.a_position
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ _ => (),
|
|
|
+ }
|
|
|
+
|
|
|
self.deletion_len().map(|len| DeletionDesc {
|
|
|
contig: self.position.contig(),
|
|
|
start: self.position.position + 2,
|