Permalink
Browse files

Fix off-by-one error. Fixes issue #4

  • Loading branch information...
1 parent 8bba698 commit 687610179440650b45202d0ef40ef7e7d0e6179c @ctSkennerton committed Jul 19, 2014
Showing with 6 additions and 3 deletions.
  1. +3 −0 CHANGES
  2. +1 −1 CRISPR.java
  3. +1 −1 CRISPRFinder.java
  4. +1 −1 minced.java
View
@@ -1,4 +1,7 @@
Revision history for MinCED
+0.1.6 18-Jul-2014
+ Fix off-by-one error in the gff output.
+
0.1.5 03-Apl-2014
Changed the behaviour of the '-spacers' option. Without any
output file given the behaviour is the same as before, creating
View
@@ -139,7 +139,7 @@ public String toGff(String sequenceName, String parentName) {
String str = "";
for (int m = 0; m < numRepeats(); m++) {
int repeat_position = (repeatAt(m) + 1);
- int repeat_end = repeat_position + this.repeatLength();
+ int repeat_end = repeat_position + this.repeatLength() - 1;
str += sequenceName + "\tminced:"+minced.VERSION+"\trepeat_unit\t" + repeat_position + "\t" + repeat_end + "\t1\t.\t.\tParent=" + parentName + ";ID=DR"+(m + 1) + "\n";
}
return str;
View
@@ -291,7 +291,7 @@ private boolean findRepeats( DNASequence sequence, int readNum )
if(outputformat > 0) {
String crispr_id = "CRISPR" + (++totalCrisprCount);
out.print(sequence.getName() + "\tminced:" + minced.VERSION + "\tCRISPR\t");
- out.print((currCRISPR.start() + 1) + "\t" + (currCRISPR.end() + 2) + "\t");
+ out.print((currCRISPR.start() + 1) + "\t" + (currCRISPR.end() + 1) + "\t");
out.print(currCRISPR.numRepeats() + "\t.\t.\tID="+ crispr_id);
out.print("\n");
if(outputformat == 2) {
View
@@ -2,7 +2,7 @@
public class minced
{
- public static final String VERSION = "0.1.5";
+ public static final String VERSION = "0.1.6";
public static void main(String[] args)
{
//default values

0 comments on commit 6876101

Please sign in to comment.