Skip to content

Commit

Permalink
Hopefully corrected for the offset - issue EI-CoreBioinformatics#129
Browse files Browse the repository at this point in the history
  • Loading branch information
lucventurini committed Oct 2, 2018
1 parent 8d34439 commit 5191c28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Mikado/parsers/bed12.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,9 @@ def expand(self, sequence, upstream, downstream, expand_orf=False, logger=create

old_sequence = sequence[upstream:len(self) + upstream]

self.start_codon = str(old_sequence[self.thick_start + self.phase:self.thick_start + self.phase + 3]).upper()
self.start_codon = str(old_sequence[self.thick_start + self.phase -1 :self.thick_start + self.phase + 2]).upper()
# last_codon_start = self.thick_end + ((self.thick_end - self.thick_start + 1 + self.phase) % 3 - 3)
self.stop_codon = str(old_sequence[self.thick_end - 2:self.thick_end + 1]).upper()
self.stop_codon = str(old_sequence[self.thick_end - 3:self.thick_end]).upper()

assert 0 < len(self.stop_codon) <= 3, self.stop_codon

Expand Down
10 changes: 5 additions & 5 deletions Mikado/tests/padding_test.bed12
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
44 1 61560 ID=mikado.44G2.2;coding=True;phase=0 85.0 + 69 61340 0 22 140,119,137,89,218,261,240,141,156,112,160,165,132,72,126,75,168,105,201,87,114,309 0,19637,20638,24654,26061,27238,28273,28974,29420,30474,32004,33291,34188,35466,42587,43055,44730,46583,50405,53556,59448,61250
44 1 61560 ID=mikado.44G2.3;coding=True;phase=0 79.0 + 69 61340 0 21 140,119,137,89,218,261,240,141,141,112,160,165,132,126,75,168,105,201,87,114,309 0,19637,20638,24654,26061,27238,28273,28974,29435,30474,32004,33291,34188,42587,43055,44730,46583,50405,53556,59448,61250
44 1 61560 ID=mikado.44G2.4;coding=True;phase=0 72.0 + 69 61340 0 21 140,119,137,89,218,261,240,171,141,112,160,165,132,126,75,168,105,201,87,114,309 0,19637,20638,24654,26061,27238,28273,28944,29435,30474,32004,33291,34188,42587,43055,44730,46583,50405,53556,59448,61250
44 1 62511 ID=mikado.44G2.1;coding=True;phase=0 85.0 + 69 61340 0 22 140,119,137,89,218,261,240,141,141,112,160,165,132,72,126,75,168,105,201,87,114,1260 0,19637,20638,24654,26061,27238,28273,28974,29435,30474,32004,33291,34188,35466,42587,43055,44730,46583,50405,53556,59448,61250
44 1 67118 ID=mikado.44G2.5;coding=True;phase=0 83.0 + 69 61340 0 24 140,119,137,89,218,261,240,141,141,112,160,165,132,72,126,75,168,105,201,87,114,1186,59,430 0,19637,20638,24654,26061,27238,28273,28974,29435,30474,32004,33291,34188,35466,42587,43055,44730,46583,50405,53556,59448,61250,63052,66687
44 1 61560 ID=mikado.44G2.2;coding=True;phase=0 85.0 + 70 61341 0 22 140,119,137,89,218,261,240,141,156,112,160,165,132,72,126,75,168,105,201,87,114,309 0,19637,20638,24654,26061,27238,28273,28974,29420,30474,32004,33291,34188,35466,42587,43055,44730,46583,50405,53556,59448,61250
44 1 61560 ID=mikado.44G2.3;coding=True;phase=0 79.0 + 70 61341 0 21 140,119,137,89,218,261,240,141,141,112,160,165,132,126,75,168,105,201,87,114,309 0,19637,20638,24654,26061,27238,28273,28974,29435,30474,32004,33291,34188,42587,43055,44730,46583,50405,53556,59448,61250
44 1 61560 ID=mikado.44G2.4;coding=True;phase=0 72.0 + 70 61341 0 21 140,119,137,89,218,261,240,171,141,112,160,165,132,126,75,168,105,201,87,114,309 0,19637,20638,24654,26061,27238,28273,28944,29435,30474,32004,33291,34188,42587,43055,44730,46583,50405,53556,59448,61250
44 1 62511 ID=mikado.44G2.1;coding=True;phase=0 85.0 + 70 61341 0 22 140,119,137,89,218,261,240,141,141,112,160,165,132,72,126,75,168,105,201,87,114,1260 0,19637,20638,24654,26061,27238,28273,28974,29435,30474,32004,33291,34188,35466,42587,43055,44730,46583,50405,53556,59448,61250
44 1 67118 ID=mikado.44G2.5;coding=True;phase=0 83.0 + 70 61341 0 24 140,119,137,89,218,261,240,141,141,112,160,165,132,72,126,75,168,105,201,87,114,1186,59,430 0,19637,20638,24654,26061,27238,28273,28974,29435,30474,32004,33291,34188,35466,42587,43055,44730,46583,50405,53556,59448,61250,63052,66687

0 comments on commit 5191c28

Please sign in to comment.