Skip to content
Snippets Groups Projects
Commit b833152e authored by Piotr Gawron's avatar Piotr Gawron
Browse files

processing modification site for rna/antisense rna uses proper modification type

parent 96dd9860
No related branches found
No related tags found
1 merge request!345Resolve "Genes annotations don't show"
Showing with 309 additions and 265 deletions
......@@ -91,10 +91,6 @@ public class CellDesignerAntisenseRna extends CellDesignerSpecies<AntisenseRna>
super.update(sp);
if (sp instanceof CellDesignerAntisenseRna) {
CellDesignerAntisenseRna rna = (CellDesignerAntisenseRna) sp;
for (CellDesignerModificationResidue mr : getRegions()) {
mr.setState(null);
}
for (CellDesignerModificationResidue region : rna.getRegions()) {
updateRegion(region);
}
......
......@@ -71,9 +71,6 @@ public class CellDesignerRna extends CellDesignerSpecies<Rna> {
super.update(species);
if (species instanceof CellDesignerRna) {
CellDesignerRna rna = (CellDesignerRna) species;
for (CellDesignerModificationResidue mr : getRegions()) {
mr.setState(null);
}
for (CellDesignerModificationResidue region : rna.getRegions()) {
updateRegion(region);
......
......@@ -460,7 +460,6 @@ public class CellDesignerModificationResidue implements Serializable {
result.setIdModificationResidue(idModificationResidue);
result.setName(name);
result.setActive(active);
logger.debug(angle);
result.setPosition(converter.getCoordinatesByPosition(element, angle));
if (modificationType.equals(ModificationType.TRANSCRIPTION_SITE_LEFT)) {
result.setDirection("LEFT");
......
......@@ -6,6 +6,7 @@ import java.util.List;
import org.apache.log4j.Logger;
import lcsb.mapviewer.common.exception.InvalidArgumentException;
import lcsb.mapviewer.model.map.species.AntisenseRna;
import lcsb.mapviewer.model.map.species.Complex;
import lcsb.mapviewer.model.map.species.Gene;
import lcsb.mapviewer.model.map.species.Protein;
......@@ -87,6 +88,12 @@ public class SpeciesState {
CellDesignerModificationResidue mr = new CellDesignerModificationResidue(region);
addModificationResidue(mr);
}
} else if (species instanceof AntisenseRna) {
AntisenseRna rna = (AntisenseRna) species;
for (ModificationResidue region : rna.getRegions()) {
CellDesignerModificationResidue mr = new CellDesignerModificationResidue(region);
addModificationResidue(mr);
}
} else if (species instanceof Gene) {
Gene gene = (Gene) species;
for (ModificationResidue mr : gene.getModificationResidues()) {
......
......@@ -27,6 +27,7 @@ import lcsb.mapviewer.model.map.species.field.BindingRegion;
import lcsb.mapviewer.model.map.species.field.CodingRegion;
import lcsb.mapviewer.model.map.species.field.ModificationResidue;
import lcsb.mapviewer.model.map.species.field.ModificationSite;
import lcsb.mapviewer.model.map.species.field.ModificationState;
import lcsb.mapviewer.model.map.species.field.ProteinBindingDomain;
import lcsb.mapviewer.model.map.species.field.RegulatoryRegion;
import lcsb.mapviewer.model.map.species.field.Residue;
......@@ -233,6 +234,13 @@ public class ModificationTest extends CellDesignerTestFunctions {
rna = model.getElementByElementId("sa3");
assertEquals(1, rna.getRegions().size());
assertTrue(rna.getRegions().get(0) instanceof ModificationSite);
rna = model.getElementByElementId("sa4");
assertEquals(1, rna.getRegions().size());
assertTrue(rna.getRegions().get(0) instanceof ModificationSite);
ModificationSite modificationSite = (ModificationSite) rna.getRegions().get(0);
assertEquals(ModificationState.PHOSPHORYLATED, modificationSite.getState());
testXmlSerialization(model);
} catch (Exception e) {
......
......@@ -22,7 +22,7 @@
<celldesigner:briefView>
<celldesigner:innerPosition x="0.0" y="0.0"/>
<celldesigner:boxSize width="80.0" height="60.0"/>
<celldesigner:singleLine width="0.0"/>
<celldesigner:singleLine width="1.0"/>
<celldesigner:paint color="3fff0000" scheme="Color"/>
</celldesigner:briefView>
<celldesigner:info state="empty" angle="-1.5707963267948966"/>
......@@ -41,12 +41,12 @@
<celldesigner:briefView>
<celldesigner:innerPosition x="0.0" y="0.0"/>
<celldesigner:boxSize width="80.0" height="60.0"/>
<celldesigner:singleLine width="0.0"/>
<celldesigner:singleLine width="1.0"/>
<celldesigner:paint color="3fff0000" scheme="Color"/>
</celldesigner:briefView>
<celldesigner:info state="empty" angle="-1.5707963267948966"/>
</celldesigner:speciesAlias>
<celldesigner:speciesAlias id="sa3" species="s3">
<celldesigner:speciesAlias id="sa3" species="s4">
<celldesigner:activity>inactive</celldesigner:activity>
<celldesigner:bounds x="192.0" y="247.5" w="90.0" h="25.0"/>
<celldesigner:font size="12"/>
......@@ -60,7 +60,26 @@
<celldesigner:briefView>
<celldesigner:innerPosition x="0.0" y="0.0"/>
<celldesigner:boxSize width="80.0" height="60.0"/>
<celldesigner:singleLine width="0.0"/>
<celldesigner:singleLine width="1.0"/>
<celldesigner:paint color="3fff0000" scheme="Color"/>
</celldesigner:briefView>
<celldesigner:info state="empty" angle="-1.5707963267948966"/>
</celldesigner:speciesAlias>
<celldesigner:speciesAlias id="sa4" species="s3">
<celldesigner:activity>inactive</celldesigner:activity>
<celldesigner:bounds x="300.0" y="207.0" w="90.0" h="25.0"/>
<celldesigner:font size="12"/>
<celldesigner:view state="usual"/>
<celldesigner:usualView>
<celldesigner:innerPosition x="0.0" y="0.0"/>
<celldesigner:boxSize width="90.0" height="25.0"/>
<celldesigner:singleLine width="1.0"/>
<celldesigner:paint color="ffff6666" scheme="Color"/>
</celldesigner:usualView>
<celldesigner:briefView>
<celldesigner:innerPosition x="0.0" y="0.0"/>
<celldesigner:boxSize width="80.0" height="60.0"/>
<celldesigner:singleLine width="1.0"/>
<celldesigner:paint color="3fff0000" scheme="Color"/>
</celldesigner:briefView>
<celldesigner:info state="empty" angle="-1.5707963267948966"/>
......@@ -151,6 +170,22 @@
<celldesigner:speciesIdentity>
<celldesigner:class>ANTISENSE_RNA</celldesigner:class>
<celldesigner:antisensernaReference>arn3</celldesigner:antisensernaReference>
<celldesigner:state>
<celldesigner:listOfModifications>
<celldesigner:modification residue="tr1" state="phosphorylated"/>
</celldesigner:listOfModifications>
</celldesigner:state>
</celldesigner:speciesIdentity>
</celldesigner:extension>
</annotation>
</species>
<species metaid="s4" id="s4" name="s3" compartment="default" initialAmount="0">
<annotation>
<celldesigner:extension>
<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment>
<celldesigner:speciesIdentity>
<celldesigner:class>ANTISENSE_RNA</celldesigner:class>
<celldesigner:antisensernaReference>arn3</celldesigner:antisensernaReference>
</celldesigner:speciesIdentity>
</celldesigner:extension>
</annotation>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment