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

different set of annotations create different SBML species

parent 9707e0b1
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!560Resolve "add support for modifications and states in sbml export/import"
......@@ -31,6 +31,7 @@ import lcsb.mapviewer.converter.model.sbml.compartment.SbmlCompartmentExporter;
import lcsb.mapviewer.converter.model.sbml.extension.multi.BioEntityFeature;
import lcsb.mapviewer.converter.model.sbml.extension.multi.MultiPackageNamingUtils;
import lcsb.mapviewer.model.map.InconsistentModelException;
import lcsb.mapviewer.model.map.MiriamData;
import lcsb.mapviewer.model.map.species.AntisenseRna;
import lcsb.mapviewer.model.map.species.Complex;
import lcsb.mapviewer.model.map.species.Element;
......@@ -388,8 +389,15 @@ public class SbmlSpeciesExporter extends SbmlElementExporter<Species, org.sbml.j
if (element.getComplex() != null) {
complexName = element.getComplex().getName();
}
String multiDistinguisher = null;
List<String> annotations = new ArrayList<>();
for (MiriamData md: element.getMiriamData()) {
annotations.add(md.toString());
}
Collections.sort(annotations);
String annotationNames = StringUtils.join(annotations, ",");
String multiDistinguisher = null;
if (isExtensionEnabled(SbmlExtension.MULTI)) {
String structuralState = null;
if (element instanceof Protein) {
......@@ -422,7 +430,7 @@ public class SbmlSpeciesExporter extends SbmlElementExporter<Species, org.sbml.j
}
multiDistinguisher += "\n" + element.getActivity();
}
String result = element.getClass().getSimpleName() + "\n" + element.getName() + "\n" + compartmentName + "\n"
String result = element.getClass().getSimpleName() + "\n" + annotationNames+"\n"+element.getName() + "\n" + compartmentName + "\n"
+ complexName
+ "\n" + multiDistinguisher;
return result;
......
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