Skip to content
Snippets Groups Projects
Commit c3c0acd9 authored by Clement Frainay's avatar Clement Frainay
Browse files

Ignore non eligibile reactions in export

parent 1d9711b4
No related branches found
No related tags found
No related merge requests found
......@@ -118,8 +118,10 @@ public class ParseSbml {
}
try {
IsoMetReaction reaction = new IsoMetReaction(rEntry, substrates, products);
reactions.put(rEntry.getId(), reaction);
if(!substrates.isEmpty() && !products.isEmpty()){ //ignore export reactions
IsoMetReaction reaction = new IsoMetReaction(rEntry, substrates, products);
reactions.put(rEntry.getId(), reaction);
}
}catch (Exception e){
logger.error("[RXN] "+rEntry.getId()+": not able to create reaction");
logger.trace("",e);
......@@ -333,7 +335,7 @@ public class ParseSbml {
BufferedWriter w;
try {
w = new BufferedWriter(new FileWriter(outputDir+"/reactions.tab"));
for(IsoMetReaction r : reactions.values()){ //TODO: option to export only reaction with AAM?
for(IsoMetReaction r : validReactions){ //TODO: option to export only reaction with AAM?
w.write(r.getSbmlReaction().getId()
+"\t"+r.getSubstrates().stream().map(Compound::getSbmlSpecie).map(Species::getId).collect(Collectors.joining(","))
+"\t"+r.getProducts().stream().map(Compound::getSbmlSpecie).map(Species::getId).collect(Collectors.joining(","))
......
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