@@ -203,6 +203,21 @@ impl TryFrom<String> for BlastResult {
}
+impl BlastResult {
+ pub fn swap_query_subject(&self) -> BlastResult {
+ let s = self.clone();
+ BlastResult {
+ query_id: s.subject_id.to_string(),
+ q_start: s.s_start,
+ q_end: s.s_end,
+ subject_id: s.query_id,
+ s_start: s.q_start,
+ s_end: s.q_end,
+ ..s
+ }
+}
+
#[derive(Debug)]
struct BlastPile {
x: usize,