Commit 46b5faf2 authored by cfrainay's avatar cfrainay
Browse files

[toolbox] update CarbonSkeletonNet app

now handle GSAM files w/ carbon indexes
parent f898ae30
......@@ -58,6 +58,9 @@ public class CarbonSkeletonNet extends AbstractMet4jApplication {
@Option(name = "-am", aliases = {"--asmatrix"}, usage = "export as matrix (implies simple graph conversion). Default export as GML file", required = false)
public boolean asMatrix = false;
@Option(name = "-i", aliases = {"--fromIndexes"}, usage = "Use GSAM output with carbon indexes", required = false)
public boolean fromIndexes = false;
public static void main(String[] args) throws IOException, Met4jSbmlReaderException {
CarbonSkeletonNet app = new CarbonSkeletonNet();
......@@ -84,11 +87,13 @@ public class CarbonSkeletonNet extends AbstractMet4jApplication {
System.out.println(" Done.");
System.out.print("Processing atom mappings...");
AtomMappingWeightPolicy wp = new AtomMappingWeightPolicy()
AtomMappingWeightPolicy wp = ( fromIndexes ?
new AtomMappingWeightPolicy().fromConservedCarbonIndexes(inputAAM) :
new AtomMappingWeightPolicy().fromNumberOfConservedCarbons(inputAAM)
wp = wp.binarize()
System.out.println(" Done.");
  • @clement.frainay Yep, tu es sur de ton coup là dessus ? Car quand j'essaie de faire un mvn package, il me renvoie cette erreur:

    incompatible types: java.lang.String cannot be converted to java.util.Map<fr.inrae.toulouse.metexplore.met4j_core.biodata.BioMetabolite,java.util.Map<fr.inrae.toulouse.metexplore.met4j_core.biodata.BioMetabolite,java.util.Collection<java.lang.Integer>>>

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment