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
JAL-2599 HMMs can now be dropped onto the desktop
[jalview.git]
/
src
/
jalview
/
datamodel
/
AlignmentAnnotation.java
diff --git
a/src/jalview/datamodel/AlignmentAnnotation.java
b/src/jalview/datamodel/AlignmentAnnotation.java
index
05688cb
..
8f826f5
100755
(executable)
--- a/
src/jalview/datamodel/AlignmentAnnotation.java
+++ b/
src/jalview/datamodel/AlignmentAnnotation.java
@@
-170,10
+170,14
@@
public class AlignmentAnnotation
*/
private Map<Integer, Annotation> sequenceMapping;
*/
private Map<Integer, Annotation> sequenceMapping;
- /** DOCUMENT ME!! */
+ /**
+ * lower range for quantitative data
+ */
public float graphMin;
public float graphMin;
- /** DOCUMENT ME!! */
+ /**
+ * Upper range for quantitative data
+ */
public float graphMax;
/**
public float graphMax;
/**
@@
-697,7
+701,7
@@
public class AlignmentAnnotation
this.calcId = annotation.calcId;
if (annotation.properties != null)
{
this.calcId = annotation.calcId;
if (annotation.properties != null)
{
- properties = new HashMap<String, String>();
+ properties = new HashMap<>();
for (Map.Entry<String, String> val : annotation.properties.entrySet())
{
properties.put(val.getKey(), val.getValue());
for (Map.Entry<String, String> val : annotation.properties.entrySet())
{
properties.put(val.getKey(), val.getValue());
@@
-733,7
+737,7
@@
public class AlignmentAnnotation
if (annotation.sequenceMapping != null)
{
Integer p = null;
if (annotation.sequenceMapping != null)
{
Integer p = null;
- sequenceMapping = new HashMap<Integer, Annotation>();
+ sequenceMapping = new HashMap<>();
Iterator<Integer> pos = annotation.sequenceMapping.keySet()
.iterator();
while (pos.hasNext())
Iterator<Integer> pos = annotation.sequenceMapping.keySet()
.iterator();
while (pos.hasNext())
@@
-813,7
+817,7
@@
public class AlignmentAnnotation
int epos = sequenceRef.findPosition(endRes);
if (sequenceMapping != null)
{
int epos = sequenceRef.findPosition(endRes);
if (sequenceMapping != null)
{
- Map<Integer, Annotation> newmapping = new HashMap<Integer, Annotation>();
+ Map<Integer, Annotation> newmapping = new HashMap<>();
Iterator<Integer> e = sequenceMapping.keySet().iterator();
while (e.hasNext())
{
Iterator<Integer> e = sequenceMapping.keySet().iterator();
while (e.hasNext())
{
@@
-863,6
+867,10
@@
public class AlignmentAnnotation
@Override
public String toString()
{
@Override
public String toString()
{
+ if (annotations == null)
+ {
+ return "";
+ }
StringBuilder buffer = new StringBuilder(256);
for (int i = 0; i < annotations.length; i++)
StringBuilder buffer = new StringBuilder(256);
for (int i = 0; i < annotations.length; i++)
@@
-936,7
+944,7
@@
public class AlignmentAnnotation
{
return;
}
{
return;
}
- sequenceMapping = new HashMap<Integer, Annotation>();
+ sequenceMapping = new HashMap<>();
int seqPos;
int seqPos;
@@
-1142,14
+1150,14
@@
public class AlignmentAnnotation
* @param colSel
*/
public AlignmentAnnotation(AlignmentAnnotation alignmentAnnotation,
* @param colSel
*/
public AlignmentAnnotation(AlignmentAnnotation alignmentAnnotation,
- ColumnSelection colSel)
+ HiddenColumns hidden)
{
this(alignmentAnnotation);
if (annotations == null)
{
return;
}
{
this(alignmentAnnotation);
if (annotations == null)
{
return;
}
- colSel.makeVisibleAnnotation(this);
+ hidden.makeVisibleAnnotation(this);
}
public void setPadGaps(boolean padgaps, char gapchar)
}
public void setPadGaps(boolean padgaps, char gapchar)
@@
-1215,7
+1223,7
@@
public class AlignmentAnnotation
/**
* properties associated with the calcId
*/
/**
* properties associated with the calcId
*/
- protected Map<String, String> properties = new HashMap<String, String>();
+ protected Map<String, String> properties = new HashMap<>();
/**
* base colour for line graphs. If null, will be set automatically by
/**
* base colour for line graphs. If null, will be set automatically by
@@
-1259,7
+1267,7
@@
public class AlignmentAnnotation
.getTo() == sq.getDatasetSequence()) : false;
// TODO build a better annotation element map and get rid of annotations[]
.getTo() == sq.getDatasetSequence()) : false;
// TODO build a better annotation element map and get rid of annotations[]
- Map<Integer, Annotation> mapForsq = new HashMap<Integer, Annotation>();
+ Map<Integer, Annotation> mapForsq = new HashMap<>();
if (sequenceMapping != null)
{
if (sp2sq != null)
if (sequenceMapping != null)
{
if (sp2sq != null)
@@
-1312,7
+1320,7
@@
public class AlignmentAnnotation
if (mapping != null)
{
Map<Integer, Annotation> old = sequenceMapping;
if (mapping != null)
{
Map<Integer, Annotation> old = sequenceMapping;
- Map<Integer, Annotation> remap = new HashMap<Integer, Annotation>();
+ Map<Integer, Annotation> remap = new HashMap<>();
int index = -1;
for (int mp[] : mapping.values())
{
int index = -1;
for (int mp[] : mapping.values())
{
@@
-1370,7
+1378,7
@@
public class AlignmentAnnotation
{
if (properties == null)
{
{
if (properties == null)
{
- properties = new HashMap<String, String>();
+ properties = new HashMap<>();
}
properties.put(property, value);
}
}
properties.put(property, value);
}
@@
-1486,4
+1494,14
@@
public class AlignmentAnnotation
{
return counter++;
}
{
return counter++;
}
+
+ /**
+ *
+ * @return true for rows that have a range of values in their annotation set
+ */
+ public boolean isQuantitative()
+ {
+ return graphMin < graphMax;
+ }
+
}
}