*/
package jalview.analysis;
+import static jalview.io.gff.GffConstants.CLINICAL_SIGNIFICANCE;
+
import jalview.datamodel.AlignedCodon;
import jalview.datamodel.AlignedCodonFrame;
import jalview.datamodel.Alignment;
private static final String SEQUENCE_VARIANT = "sequence_variant:";
private static final String ID = "ID";
- private static final String CLINICAL_SIGNIFICANCE = "clinical_significance";
/**
* A data model to hold the 'normal' base value at a position, and an optional
if (trans != null && !trans.equals(residue))
{
String desc = residue + "->" + trans;
- // set score to 0f so 'graduated colour' option is offered!
+ // set score to 0f so 'graduated colour' option is offered! JAL-2060
SequenceFeature sf = new SequenceFeature(
SequenceOntologyI.SEQUENCE_VARIANT, desc, peptidePos,
peptidePos, 0f, null);
+ StringBuilder attributes = new StringBuilder(32);
String id = (String) var.variant.getValue(ID);
if (id != null)
{
id = id.substring(SEQUENCE_VARIANT.length());
}
sf.setValue(ID, id);
+ attributes.append(ID).append("=").append(id);
// TODO handle other species variants
StringBuilder link = new StringBuilder(32);
try
if (clinSig != null)
{
sf.setValue(CLINICAL_SIGNIFICANCE, clinSig);
+ attributes.append(";").append(CLINICAL_SIGNIFICANCE).append("=")
+ .append(clinSig);
}
peptide.addSequenceFeature(sf);
+ if (attributes.length() > 0)
+ {
+ sf.setAttributes(attributes.toString());
+ }
return true;
}
return false;