<xs:element name="JSeq" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
- <xs:element name="features" type="jv:feature"
- minOccurs="0" maxOccurs="unbounded" />
- <xs:element name="pdbids" minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="features"
+ type="jv:feature" minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="pdbids" minOccurs="0"
+ maxOccurs="unbounded">
<xs:complexType>
<xs:complexContent>
- <xs:extension base="jv:pdbentry">
+ <xs:extension
+ base="jv:pdbentry">
<xs:sequence>
- <xs:element name="structureState" minOccurs="0"
+ <xs:element
+ name="structureState" minOccurs="0"
maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attributeGroup ref="jv:swingwindow" />
- <xs:attribute name="visible" type="xs:boolean" />
- <xs:attribute name="viewId" type="xs:string"
- use="optional">
+ <xs:extension
+ base="xs:string">
+ <xs:attributeGroup
+ ref="jv:swingwindow" />
+ <xs:attribute
+ name="visible" type="xs:boolean" />
+ <xs:attribute
+ name="viewId" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
additional
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="alignwithAlignPanel"
- type="xs:boolean" use="optional" default="true">
+ <xs:attribute
+ name="alignwithAlignPanel" type="xs:boolean"
+ use="optional" default="true">
<xs:annotation>
<xs:documentation>
Flag
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="colourwithAlignPanel"
- type="xs:boolean" use="optional" default="false">
+ <xs:attribute
+ name="colourwithAlignPanel" type="xs:boolean"
+ use="optional" default="false">
<xs:annotation>
<xs:documentation>
Flag
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="colourByJmol" type="xs:boolean"
- use="optional" default="true">
+ <xs:attribute
+ name="colourByJmol" type="xs:boolean" use="optional"
+ default="true">
<xs:annotation>
<xs:documentation>
Flag
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="type" type="xs:string"
- use="optional">
+ <xs:attribute
+ name="type" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>
An
</xs:complexContent>
</xs:complexType>
</xs:element>
- <xs:element name="hiddenSequences" type="xs:int"
- minOccurs="0" maxOccurs="unbounded" />
- <xs:element name="rnaViewer" minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="hiddenSequences"
+ type="xs:int" minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="rnaViewer" minOccurs="0"
+ maxOccurs="unbounded">
<xs:annotation>
- <xs:documentation>Reference to a viewer showing RNA structure
- for this sequence. Schema supports one viewer showing multiple
- annotations for multiple sequences, though currently only one
- annotation for one sequence (gapped or trimmed) is used
+ <xs:documentation>
+ Reference to a viewer showing
+ RNA structure for this sequence.
+ Schema supports one viewer
+ showing multiple annotations for
+ multiple sequences, though
+ currently only one annotation
+ for one sequence (gapped or
+ trimmed) is used
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
- <xs:element name="secondaryStructure" minOccurs="1"
+ <xs:element
+ name="secondaryStructure" minOccurs="1"
maxOccurs="unbounded">
<xs:complexType>
- <xs:attribute name="title" type="xs:string" />
- <xs:attribute name="annotationId" type="xs:string"
- use="required">
+ <xs:attribute
+ name="title" type="xs:string" />
+ <xs:attribute
+ name="annotationId" type="xs:string" use="required">
<xs:annotation>
- <xs:documentation>id attribute of Annotation in
- vamsasModel for
- the secondary structure annotation shown
- in the viewer
+ <xs:documentation>
+ id attribute
+ of
+ Annotation
+ in
+ vamsasModel
+ for the
+ secondary
+ structure
+ annotation
+ shown in the
+ viewer
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="gapped" type="xs:boolean">
+ <xs:attribute
+ name="gapped" type="xs:boolean">
<xs:annotation>
- <xs:documentation>if true the RNA structure is shown with gaps, if false without
+ <xs:documentation>
+ if true the
+ RNA
+ structure is
+ shown with
+ gaps, if
+ false
+ without
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="viewerState" type="xs:string">
+ <xs:attribute
+ name="viewerState" type="xs:string">
<xs:annotation>
- <xs:documentation>name of the project jar entry that holds
- the VARNA viewer state for the structure
+ <xs:documentation>
+ name of the
+ project jar
+ entry that
+ holds the
+ VARNA viewer
+ state for
+ the
+ structure
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
- <xs:attributeGroup ref="jv:swingwindow" />
- <xs:attribute name="title" type="xs:string" />
- <xs:attribute name="viewId" type="xs:string">
+ <xs:attributeGroup
+ ref="jv:swingwindow" />
+ <xs:attribute name="title"
+ type="xs:string" />
+ <xs:attribute name="viewId"
+ type="xs:string">
<xs:annotation>
- <xs:documentation>An id unique to the RNA viewer panel
+ <xs:documentation>
+ An id unique to the RNA
+ viewer panel
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="dividerLocation" type="xs:int">
+ <xs:attribute name="dividerLocation"
+ type="xs:int">
<xs:annotation>
- <xs:documentation>horizontal position of split pane divider
+ <xs:documentation>
+ horizontal position of
+ split pane divider
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="selectedRna" type="xs:int">
+ <xs:attribute name="selectedRna"
+ type="xs:int">
<xs:annotation>
- <xs:documentation>Index of the selected structure in the
- viewer panel
+ <xs:documentation>
+ Index of the selected
+ structure in the viewer
+ panel
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="colour" type="xs:int" />
</xs:complexType>
</xs:element>
+ <xs:element name="contactmatrix" type="vamsas:MatrixType"
+ maxOccurs="unbounded" minOccurs="0">
+ </xs:element>
<xs:element name="property" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="xs:string" />
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="description" type="xs:string"/>
</xs:complexType>
+ <xs:complexType name="MatrixType">
+ <xs:simpleContent><xs:extension base="xs:string">
+ <xs:attribute name="id" type="xs:string"/>
+ <xs:attribute name="type" type="xs:string" use="required"/>
+ <xs:attribute name="rows" type="xs:integer" use="required"/>
+ <xs:attribute name="cols" type="xs:integer" use="required"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
</xs:schema>
public void addContactListFor(AlignmentAnnotation annotation,
ContactMatrixI cm)
{
+ // update annotation with data from contact map
+ annotation.graphMin = cm.getMin();
+ annotation.graphMax = cm.getMax();
+ annotation.editable = false;
+ annotation.graph = AlignmentAnnotation.CONTACT_MAP;
+ annotation.calcId = cm.getType();
+ annotation.label = cm.getAnnotLabel();
+ annotation.description = cm.getAnnotDescr();
contactmaps.put(annotation.annotationId, cm);
}
}
package jalview.datamodel;
+import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
+import java.util.Spliterator;
+import java.util.StringTokenizer;
+
+import jalview.bin.Console;
public abstract class ContactMatrix implements ContactMatrixI
{
{
return "Contact Matrix";
}
+
+ public static String contactToFloatString(ContactMatrixI cm)
+ {
+ StringBuilder sb = new StringBuilder();
+ for (int c=0;c<cm.getWidth();c++)
+ {
+ ContactListI cl=cm.getContactList(c);
+ if (cl!=null) {
+ for (int h=0;h<=cl.getContactHeight();h++)
+ {
+ if (sb.length()>0) {
+ sb.append('\t');
+ }
+ sb.append(cl.getContactAt(h));
+ }
+ }
+ }
+ return sb.toString();
+ }
+
+ public static float[][] fromFloatStringToContacts(String values, int cols,
+ int rows)
+ {
+ float[][] vals = new float[cols][rows];
+ StringTokenizer tabsep = new StringTokenizer(values,""+'\t');
+ int c=0,r=0;
+
+ while (tabsep.hasMoreTokens())
+ {
+ double elem = Double.valueOf(tabsep.nextToken());
+ vals[c][r++]=(float) elem;
+ if (r>=vals[c].length)
+ {
+ r=0;
+ c++;
+ }
+ if (c>=vals.length)
+ {
+
+ break;
+ }
+ }
+ if (tabsep.hasMoreElements())
+ {
+ Console.warn("Ignoring additional elements for Float string to contact matrix parsing.");
+ }
+
+ return vals;
+ }
}
*/
String getType();
+ int getWidth();
+ int getHeight();
+
}
{
return SEQUENCE_DISTANCE;
}
+
+ @Override
+ public int getWidth()
+ {
+ return width;
+ }
+
+ @Override
+ public int getHeight()
+ {
+ return width;
+ }
}
{
return CONTACT_PREDICTION;
}
+ @Override
+ public int getHeight()
+ {
+ // TODO Auto-generated method stub
+ // return maximum contact height
+ return 0;
+ }@Override
+ public int getWidth()
+ {
+ // TODO Auto-generated method stub
+ // return total number of residues with contacts
+ return 0;
+ }
};
models.add(cm);
}
cm.addContact(left, right, (float) strength);
}
}
+ // TODO COMPLETE
+ throw(new Error("Not Implemented yet."));
}
@Override
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
+import jalview.datamodel.ContactMatrix;
+import jalview.datamodel.ContactMatrixI;
import jalview.datamodel.DBRefEntry;
import jalview.datamodel.GeneLocus;
import jalview.datamodel.GraphLine;
import jalview.viewmodel.seqfeatures.FeatureRendererModel;
import jalview.viewmodel.seqfeatures.FeatureRendererSettings;
import jalview.viewmodel.seqfeatures.FeaturesDisplayed;
+import jalview.ws.datamodel.alphafold.PAEContactMatrix;
import jalview.ws.jws2.Jws2Discoverer;
import jalview.ws.jws2.dm.AAConSettings;
import jalview.ws.jws2.jabaws2.Jws2Instance;
import jalview.xml.binding.jalview.MapListType.MapListFrom;
import jalview.xml.binding.jalview.MapListType.MapListTo;
import jalview.xml.binding.jalview.Mapping;
+import jalview.xml.binding.jalview.MatrixType;
import jalview.xml.binding.jalview.NoValueColour;
import jalview.xml.binding.jalview.ObjectFactory;
import jalview.xml.binding.jalview.PcaDataType;
line.setColour(annotation.getThreshold().colour.getRGB());
an.setThresholdLine(line);
}
+ if (annotation.graph==AlignmentAnnotation.CONTACT_MAP)
+ {
+ if (annotation.sequenceRef.getContactMaps()!=null)
+ {
+ ContactMatrixI cm = annotation.sequenceRef.getContactMatrixFor(annotation);
+ if (cm!=null)
+ {
+ MatrixType xmlmat = new MatrixType();
+ xmlmat.setType(cm.getType());
+ xmlmat.setRows(BigInteger.valueOf(cm.getWidth()));
+ xmlmat.setCols(BigInteger.valueOf(cm.getHeight()));
+ xmlmat.setValue(ContactMatrix.contactToFloatString(cm));
+ an.getContactmatrix().add(xmlmat);
+ }
+ }
+ }
}
else
{
jaa.setProperty(prop.getName(), prop.getValue());
}
}
+ if (jaa.graph == AlignmentAnnotation.CONTACT_MAP)
+ {
+ if (annotation.getContactmatrix() != null
+ && annotation.getContactmatrix().size() > 0)
+ {
+ for (MatrixType xmlmat : annotation.getContactmatrix())
+ {
+ if (PAEContactMatrix.PAEMATRIX.equals(xmlmat.getType()))
+ {
+ if (!xmlmat.getRows().equals(xmlmat.getCols()))
+ {
+ Console.error("Can't handle non square PAE Matrices");
+ }
+ else
+ {
+ float[][] elements = ContactMatrix
+ .fromFloatStringToContacts(xmlmat.getValue(),
+ xmlmat.getCols().intValue(),
+ xmlmat.getRows().intValue());
+
+ PAEContactMatrix newpae = new PAEContactMatrix(
+ jaa.sequenceRef, elements);
+ jaa.sequenceRef.addContactListFor(jaa, newpae);
+ }
+ }
+ else
+ {
+ Console.error("Ignoring CONTACT_MAP annotation with type "
+ + xmlmat.getType());
+ }
+ }
+ }
+ }
+
if (jaa.autoCalculated)
{
autoAlan.add(new JvAnnotRow(i, jaa));
}
}
maxrow=matrix.length;
+ elements = matrix;
}
@Override
public int getContactHeight()
{
- return maxcol - 1;
+ return maxcol-1;
}
@Override
{
return PAEMATRIX;
}
+ @Override
+ public int getWidth()
+ {
+ return length;
+ }
+ @Override
+ public int getHeight()
+ {
+ return length;
+ }
}
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:09 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:09 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:09 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:09 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:09 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
* </complexContent>
* </complexType>
* </element>
+ * <element name="contactmatrix" type="{www.vamsas.ac.uk/jalview/version2}MatrixType" maxOccurs="unbounded" minOccurs="0"/>
* <element name="property" maxOccurs="unbounded" minOccurs="0">
* <complexType>
* <complexContent>
"label",
"description",
"thresholdLine",
+ "contactmatrix",
"property"
})
@XmlRootElement(name = "Annotation")
protected String label;
protected String description;
protected Annotation.ThresholdLine thresholdLine;
+ protected List<MatrixType> contactmatrix;
protected List<Annotation.Property> property;
@XmlAttribute(name = "graph", required = true)
protected boolean graph;
}
/**
+ * Gets the value of the contactmatrix property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the contactmatrix property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getContactmatrix().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link MatrixType }
+ *
+ *
+ */
+ public List<MatrixType> getContactmatrix() {
+ if (contactmatrix == null) {
+ contactmatrix = new ArrayList<MatrixType>();
+ }
+ return this.contactmatrix;
+ }
+
+ /**
* Gets the value of the property property.
*
* <p>
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
}
/**
+ * Create an instance of {@link MatrixType }
+ *
+ */
+ public MatrixType createMatrixType() {
+ return new MatrixType();
+ }
+
+ /**
* Create an instance of {@link Annotation.Property }
*
*/
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:08 PM GMT
+// Generated on: 2023.02.22 at 05:27:55 PM GMT
//
@javax.xml.bind.annotation.XmlSchema(namespace = "www.vamsas.ac.uk/jalview/version2", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2023.01.31 at 04:07:10 PM GMT
+// Generated on: 2023.02.22 at 05:27:56 PM GMT
//
@javax.xml.bind.annotation.XmlSchema(namespace = "http://uniprot.org/uniprot", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Annotation;
import jalview.datamodel.ContactListI;
+import jalview.datamodel.ContactMatrix;
import jalview.datamodel.ContactMatrixI;
import jalview.datamodel.DBRefEntry;
import jalview.datamodel.GeneLocus;
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
">seq1\nMATRSQFLVNF\n", DataSourceType.PASTE);
AlignmentI al = af.getViewport().getAlignment();
- SequenceI sq = al.getSequenceAt(0);
+ // PAE matrices are added as reference annotation to the dataset sequence
+ // at least for now.
+ SequenceI sq = al.getSequenceAt(0).getDatasetSequence();
int i = sq.getLength();
float[][] paevals = new float[i][i];
for (i = i - 1; i >= 0; i--)
}
}
PAEContactMatrix dummyMat = new PAEContactMatrix(sq, paevals);
+ String content = ContactMatrix.contactToFloatString(dummyMat);
+ Assert.assertTrue(content.contains("\t1.")); // at least one element must be 1
+ float[][] vals = ContactMatrix.fromFloatStringToContacts(content, sq.getLength(), sq.getLength());
+ assertEquals(vals[3][4],paevals[3][4]);
+
AlignmentAnnotation paeCm = sq.addContactList(dummyMat);
al.addAnnotation(paeCm);
File tfile = File.createTempFile("testStoreAndRecoverPAEmatrix",
af = new FileLoader().LoadFileWaitTillLoaded(tfile.getAbsolutePath(),
DataSourceType.FILE);
AlignmentI newAl = af.getViewport().getAlignment();
- SequenceI newSeq = newAl.getSequenceAt(0);
+ SequenceI newSeq = newAl.getSequenceAt(0).getDatasetSequence();
// check annotation of the expected type exists
Assert.assertEquals(newSeq.getAnnotation().length, 1);
Assert.assertEquals(newSeq.getAnnotation()[0].graph, paeCm.graph);
// check a contact matrix was recovered
Assert.assertEquals(newSeq.getContactMaps().size(), 1);
- // and can be found for the annotation
- ContactMatrixI restoredMat = al
+ // and can be found for the annotation on the sequence
+ ContactMatrixI restoredMat = newSeq
.getContactMatrixFor(newSeq.getAnnotation()[0]);
Assert.assertNotNull(restoredMat);
for (i = sq.getLength() - 1; i >= 0; i--)
Assert.assertEquals(oldCM.getContactAt(j), newCM.getContactAt(j));
}
}
+
}
}