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

improve logs

remove duplicated lines + easier to parse (cpd or rxn ids extraction)
parent 0ca87d51
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ public class ParseSbml {
i++;
} catch (CDKException e) {
cpd=new Compound(s);
logger.error("[SMILES] SMILES of compound "+s.getId()+" couldn't been parsed");
logger.error("[SMILES] "+s.getId()+": SMILES couldn't been parsed");
logger.debug("[SMILES] "+s.getId()+": "+smile);
}
......@@ -79,7 +79,7 @@ public class ParseSbml {
//Since H atoms are ignored during atom mapping, this kind of species are removed from reactions
if(!smile.matches(".*[A-Za-z&&[^H]].*")){
cpd=null;
logger.warn("[SMILES] Compound "+s.getId()+" ignored: SMILES only contain Hydrogen");
logger.warn("[SMILES] "+s.getId()+" ignored: SMILES only contain Hydrogen");
logger.debug("[SMILES] "+s.getId()+": "+smile);
}
......@@ -121,7 +121,7 @@ public class ParseSbml {
IsoMetReaction reaction = new IsoMetReaction(rEntry, substrates, products);
reactions.put(rEntry.getId(), reaction);
}catch (Exception e){
logger.error("[RXN] not able to create reaction "+rEntry.getId());
logger.error("[RXN] "+rEntry.getId()+": not able to create reaction");
logger.trace("",e);
}
});
......@@ -258,15 +258,17 @@ public class ParseSbml {
.build();
for(IsoMetReaction reaction : reactions.values()){
f.checkAndFlag(reaction);
for(Flag flag : reaction.getFlags()){
logger.debug("[RXN] "+reaction.getSbmlReaction().getId()+": "+flag.toString());
if(!reaction.getFlags().isEmpty()){
for(Flag flag : reaction.getFlags()){
logger.debug("[RXN] "+reaction.getSbmlReaction().getId()+": "+flag.toString());
}
logger.debug("[RXN] "+reaction.getSbmlReaction().getId()+": "+ reaction.getEquation());
}
if(f.keep(reaction)) {
validReactions.add(reaction);
}else {
logger.warn("[RXN] "+reaction.getSbmlReaction().getId()+" not selected for AAM, doesn't match filtering criteria");
logger.debug("[RXN] "+reaction.getSbmlReaction().getId()+": "+ reaction.getEquation());
logger.warn("[RXN] "+reaction.getSbmlReaction().getId()+": not selected for AAM");
}
}
logger.info(model.getListOfReactions().size()+" reactions in SBML");
......@@ -297,7 +299,7 @@ public class ParseSbml {
RxnSmiles = aamBuilder.compute(reactionSet.get(0));
} catch (Exception e) {
for(IsoMetReaction r : reactionSet){
logger.error("[AAM] error while computing " + r.getSbmlReaction().getId()+" atom mapping");
logger.error("[AAM] "+r.getSbmlReaction().getId()+": error while computing atom mapping");
logger.debug("[AAM] "+r.getSbmlReaction().getId()+": "+ r.getEquation());
logger.debug("[AAM] "+r.getSbmlReaction().getId()+": "+r.getRxnSmiles());
}
......@@ -314,7 +316,7 @@ public class ParseSbml {
aamParser.parseMapping(r.getSubstrates(), r.getProducts(), finalRxnSmiles, aam);
r.setAtomMapping(aam);
} catch (Exception e) {
logger.error("[AAM] error while computing " + r.getSbmlReaction().getId()+" atom mapping");
logger.error("[AAM] "+ r.getSbmlReaction().getId()+": error while computing atom mapping");
logger.debug("[AAM] "+r.getSbmlReaction().getId()+": "+ r.getEquation());
logger.debug("[AAM] "+r.getSbmlReaction().getId()+": "+r.getRxnSmiles());
logger.trace("",e);
......
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