git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'bug/JAL-2742' into develop
[jalview.git]
/
src
/
jalview
/
datamodel
/
CigarArray.java
diff --git
a/src/jalview/datamodel/CigarArray.java
b/src/jalview/datamodel/CigarArray.java
index
a48a178
..
1723f1d
100644
(file)
--- a/
src/jalview/datamodel/CigarArray.java
+++ b/
src/jalview/datamodel/CigarArray.java
@@
-20,8
+20,6
@@
*/
package jalview.datamodel;
*/
package jalview.datamodel;
-import htsjdk.samtools.Cigar;
-
import java.util.List;
public class CigarArray extends CigarBase
import java.util.List;
public class CigarArray extends CigarBase
@@
-70,7
+68,8
@@
public class CigarArray extends CigarBase
for (int c = 0; c < cigars.length; c++)
{
refCigars[c] = cigars[c];
for (int c = 0; c < cigars.length; c++)
{
refCigars[c] = cigars[c];
- if (!((cigars[c] instanceof SeqCigar) || cigars[c] instanceof CigarCigar))
+ if (!((cigars[c] instanceof SeqCigar)
+ || cigars[c] instanceof CigarCigar))
{
seqcigararray = false;
}
{
seqcigararray = false;
}
@@
-92,8
+91,8
@@
public class CigarArray extends CigarBase
{
this(constructSeqCigarArray(alignment, selectionGroup));
constructFromAlignment(alignment,
{
this(constructSeqCigarArray(alignment, selectionGroup));
constructFromAlignment(alignment,
- hidden != null ? hidden.getListOfCols()
- : null, selectionGroup);
+ hidden != null ? hidden.getHiddenColumnsCopy() : null,
+ selectionGroup);
}
private static int[] _calcStartEndBounds(AlignmentI alignment,
}
private static int[] _calcStartEndBounds(AlignmentI alignment,
@@
-171,32
+170,30
@@
public class CigarArray extends CigarBase
hideStart = region[0];
hideEnd = region[1];
// edit hidden regions to selection range
hideStart = region[0];
hideEnd = region[1];
// edit hidden regions to selection range
- if (hideStart < last)
+
+ // just move on if hideEnd is before last
+ if (hideEnd < last)
{
{
- if (hideEnd > last)
- {
- hideStart = last;
- }
- else
- {
- continue;
- }
+ continue;
}
}
-
+ // exit if next region is after end
if (hideStart > end)
{
break;
}
if (hideStart > end)
{
break;
}
- if (hideEnd > end)
+ // truncate region at start if last falls in region
+ if ((hideStart < last) && (hideEnd >= last))
{
{
- hideEnd = end;
+ hideStart = last;
}
}
- if (hideStart > hideEnd)
+ // truncate region at end if end falls in region
+ if (hideEnd > end) // already checked that hideStart<=end
{
{
- break;
+ hideEnd = end;
}
}
+
/**
* form operations...
*/
/**
* form operations...
*/
@@
-208,7
+205,7
@@
public class CigarArray extends CigarBase
last = hideEnd + 1;
}
// Final match if necessary.
last = hideEnd + 1;
}
// Final match if necessary.
- if (last < end)
+ if (last <= end)
{
addOperation(CigarArray.M, end - last + 1);
}
{
addOperation(CigarArray.M, end - last + 1);
}
@@
-220,7
+217,7
@@
public class CigarArray extends CigarBase
}
/**
}
/**
- * @see Cigar.getSequenceAndDeletions
+ * @see CigarBase.getSequenceAndDeletions
* @param GapChar
* char
* @return Object[][]
* @param GapChar
* char
* @return Object[][]