- String desc = "p." + residue3Char + peptidePos + trans3Char;
- SequenceFeature sf = new SequenceFeature(
- SequenceOntologyI.SEQUENCE_VARIANT, desc, peptidePos,
- peptidePos, var.getSource());
- StringBuilder attributes = new StringBuilder(32);
- String id = (String) var.variant.getValue(ID);
- if (id != null)
- {
- if (id.startsWith(SEQUENCE_VARIANT))
- {
- id = id.substring(SEQUENCE_VARIANT.length());
- }
- sf.setValue(ID, id);
- attributes.append(ID).append("=").append(id);
- // TODO handle other species variants JAL-2064
- StringBuilder link = new StringBuilder(32);
- try
- {
- link.append(desc).append(" ").append(id).append(
- "|http://www.ensembl.org/Homo_sapiens/Variation/Summary?v=")
- .append(URLEncoder.encode(id, "UTF-8"));
- sf.addLink(link.toString());
- } catch (UnsupportedEncodingException e)
- {
- // as if
- }
- }
- String clinSig = (String) var.variant.getValue(CLINICAL_SIGNIFICANCE);
- if (clinSig != null)
+ desc = "p." + residue3Char + peptidePos + trans3Char;
+ featureType = SequenceOntologyI.NONSYNONYMOUS_VARIANT;
+ }
+ SequenceFeature sf = new SequenceFeature(featureType, desc, peptidePos,
+ peptidePos, var.getSource());
+
+ StringBuilder attributes = new StringBuilder(32);
+ String id = (String) var.variant.getValue(ID);
+ if (id != null)
+ {
+ if (id.startsWith(SEQUENCE_VARIANT))