|
|
@@ -673,7 +673,7 @@ impl Fasta {
|
|
|
fn get_sequence (&self, contig: &str, start: usize, end: usize) -> String { // end is included
|
|
|
let chr_index = self.fa.fai().tid(contig).expect("Cannot find chr in index");
|
|
|
if end < start {
|
|
|
- let fv = self.fa.view(chr_index, end, start + 2).expect("Cannot get .fa view");
|
|
|
+ let fv = self.fa.view(chr_index, end - 2, start).expect("Cannot get .fa view");
|
|
|
revcomp(&fv.to_string().to_uppercase())
|
|
|
} else {
|
|
|
let fv = self.fa.view(chr_index, start - 1, end + 1).expect("Cannot get .fa view");
|