Skip to content

Commit

Permalink
include reverse stop codon in meta output
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Van der Jeugt committed Sep 19, 2021
1 parent c97ce67 commit 02cc0fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/gene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ impl ReadPrediction {

pub struct Gene {
pub start: usize,
pub metastart: usize,
pub end: usize,
pub frame: usize,
pub score: f64,
Expand All @@ -89,7 +88,7 @@ impl Gene {
buf.append(
&mut format!(
"{}\t{}\t{}\t{}\t{:.6}\tI:{}\tD:{}\n",
self.metastart,
self.start,
self.end,
if self.forward_strand { '+' } else { '-' },
self.frame,
Expand All @@ -112,12 +111,12 @@ impl Gene {
&mut format!(
"{}\tFGS\tCDS\t{}\t{}\t.\t{}\t{}\tID={}_{}_{}_{};product=predicted protein\n",
head,
self.metastart,
self.start,
self.end,
if self.forward_strand { '+' } else { '-' },
self.frame - 1,
head,
self.metastart,
self.start,
self.end,
if self.forward_strand { '+' } else { '-' }
)
Expand Down
2 changes: 0 additions & 2 deletions src/viterbi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,6 @@ fn build_genes(

read_prediction.genes.push(gene::Gene {
start: dna_start_t,
metastart: dna_start_t,
end: end_t,
frame: frame,
score: final_score,
Expand Down Expand Up @@ -738,7 +737,6 @@ fn build_genes(

read_prediction.genes.push(gene::Gene {
start: dna_start_t_withstop,
metastart: dna_start_t,
end: end_t,
frame: frame,
score: final_score,
Expand Down

0 comments on commit 02cc0fe

Please sign in to comment.