Exemplo n.º 1
0
 public Map<String, Rxn> getReactions(String compartment) {
   TreeMap<String, Rxn> crxns = new TreeMap<String, Rxn>();
   for (String rn : reactions.keySet()) {
     Rxn r = reactions.get(rn);
     if (r.getLocation().equals(compartment)) {
       crxns.put(rn, r);
     }
   }
   return crxns;
 }
Exemplo n.º 2
0
 public Set<String> getOutputReactions(Rxn r) {
   TreeSet<String> rxns = new TreeSet<String>();
   for (String rn : reactions.keySet()) {
     Rxn rxn = reactions.get(rn);
     if (r.connects(rxn)) {
       rxns.add(rn);
     }
   }
   return rxns;
 }
Exemplo n.º 3
0
  public void loadNetwork() throws IOException {
    logger.log(Level.INFO, "Loading metabolism network...");

    File file = props.getNetworkFile();
    Mapper<String, MetabolicEntry> entryMapper = new MetabolicEntry.MetabolicMapper();
    Parser<MetabolicEntry> parser = new Parser<MetabolicEntry>(file, entryMapper);

    while (parser.hasNext()) {
      MetabolicEntry entry = parser.next();
      entries.add(entry);

      Rxn rxn =
          new Rxn(
              props,
              entry.getReaction(),
              entry.getAbbreviation(),
              entry.getReactionName(),
              entry.getORF());
      reactions.put(entry.getAbbreviation(), rxn);

      locations.add(rxn.getLocation());

      LogicalORFTree lot = new LogicalORFTree(entry.getORF());
      ORFSet os = new ORFSet(entry.getORF());

      totalORFs.addAll(os.getORFs());
      orfSets.put(entry.getAbbreviation(), lot);
    }

    logger.log(Level.FINE, String.format("Loaded %d entries.", entries.size()));

    abbrevs = new MetabolismAbbreviations(props);
    abbrevs.loadAbbreviations();

    logger.log(Level.FINEST, "Loaded abbrevations.");
  }
Exemplo n.º 4
0
 public Set<String> getReactionAbbreviations() {
   return reactions.keySet();
 }
Exemplo n.º 5
0
 public Rxn getReaction(String rxnAbbrev) {
   return reactions.get(rxnAbbrev);
 }
Exemplo n.º 6
0
 public LogicalORFTree getLogicalORFTree(String rxnAbbrev) {
   return orfSets.get(rxnAbbrev);
 }