|
|
@@ -29,7 +29,7 @@ impl Blast {
|
|
|
}
|
|
|
|
|
|
pub fn run(mut self) -> anyhow::Result<Self> {
|
|
|
- info!("Running blastn in {}", self.fa_path);
|
|
|
+ info!("Running blastn for {}", self.fa_path);
|
|
|
|
|
|
let blastn_bin = self.config.blastn_bin.clone();
|
|
|
let blast_db = self.config.blast_db.clone();
|
|
|
@@ -231,12 +231,15 @@ impl BlastResult {
|
|
|
}
|
|
|
|
|
|
pub fn to_bed(&self) -> String {
|
|
|
+ let strand = if self.s_start <= self.s_end { "+" } else { "-" };
|
|
|
let info = format!("{}:{}-{}", self.subject_id, self.s_start, self.s_end);
|
|
|
[
|
|
|
self.query_id.to_string(),
|
|
|
self.q_start.to_string(),
|
|
|
self.q_end.to_string(),
|
|
|
info,
|
|
|
+ ".".to_string(),
|
|
|
+ strand.to_string(),
|
|
|
]
|
|
|
.join("\t")
|
|
|
.to_string()
|