|
|
@@ -648,9 +648,8 @@ impl NeoContig {
|
|
|
}
|
|
|
res
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
pub fn get_fasta(&self) -> String {
|
|
|
- let res = String::new();
|
|
|
let fa_lines = self.contig.chars()
|
|
|
.collect::<Vec<char>>()
|
|
|
.chunks(60)
|
|
|
@@ -659,9 +658,10 @@ impl NeoContig {
|
|
|
.join("\n");
|
|
|
|
|
|
let mut name = String::new();
|
|
|
- for s in self.alignments {
|
|
|
+ for s in &self.alignments {
|
|
|
// contig:[pos-pos]
|
|
|
- name = format!("{}{}:{}-{}_", name, s.ref_name, s.ref_range.0, s.ref_range.0 - 1);
|
|
|
+ name = format!("{}{}:{}-{}_", name, s.ref_name,
|
|
|
+ s.ref_range.start, s.ref_range.end - 1);
|
|
|
}
|
|
|
format!(">{}\n{}", name, fa_lines)
|
|
|
}
|