Git Lab CI for docker build enabled! You can enable it using .gitlab-ci.yml in your project. Check file template at https://gitlab.bio.di.uminho.pt/snippets/5

Commit f5f87a60 authored by Davide Lagoa's avatar Davide Lagoa
Browse files

coa reactions fixed

parent c99df917
......@@ -127,7 +127,7 @@ public class GenerateTransportReactions {
int numberOfReactions = newTcContainer.getAllReactionsIds().size();
for(List<String> metabolites : tcdbMetContainer.getMetabolitesCombinations(tcNumber, antiportOrSymport, evidence, accession)) {
for(List<String> metabolites : tcdbMetContainer.getMetabolitesCombinations(tcNumber, antiportOrSymport, evidence, accession, GENERAL_METABOLITES)) {
// if(accession.equalsIgnoreCase("P45539") && tcNumber.equals("2.A.3.8.17")) {
// System.out.println("AQUIII3" + metabolites + "\t" + reactionContainer.getReaction());
......@@ -284,9 +284,31 @@ public class GenerateTransportReactions {
// for(String metabolite : metabolites) {
boolean notReplaced = false;
String newReactant = replaceGenericMetabolite(reactants.get(key), dictionary, metabolites);
String newProduct = replaceGenericMetabolite(products.get(positions.get(key)), dictionary, metabolites);
String newReactant = "";
String newProduct = "";
if(type.equals(TypeOfTransporter.BiochemicalCoA) && metabolites.size() == 1) { //brute force
String m = metabolites.get(0);
newReactant = reactants.get(key).replace("Fatty acid", m);
m.replaceAll("s$", "");
if(m.endsWith("ate"))
m = m.replace("ate$", "oyl-CoA");
else if(m.endsWith("ne"))
m = m.replaceAll("ne$", "nyl-CoA");
else if(m.endsWith("id"))
m = m.replaceAll("id", "yl-CoA");
newProduct = products.get(positions.get(key)).replace("Fatty acyl-CoA", m);
}
else {
newReactant = replaceGenericMetabolite(reactants.get(key), dictionary, metabolites);
newProduct = replaceGenericMetabolite(products.get(positions.get(key)), dictionary, metabolites);
}
if(newReactant.equals(reactants.get(key)) && newProduct.equals(products.get(positions.get(key))))
notReplaced = true;
......@@ -392,7 +414,7 @@ public class GenerateTransportReactions {
* @return
*/
private static String replaceGenericMetabolite(String text, Synonyms dictionary, List<String> metabolites) {
boolean twoMetabolites = false;
for(String metabolite : metabolites) {
......@@ -1965,6 +1987,11 @@ public class GenerateTransportReactions {
newReactContainer.setProperties(reactionContainer.getProperties());
newReactContainer.setOriginalReaction(originalReaction);
newReactContainer.setConfidenceLevel(result[2]);
for(String s : metabolites) {
if(s.endsWith(TcdbMetabolitesContainer.SAME_METABOLITE_COMBINATION_SUFFIX))
newReactContainer.setCombineSameMetabolite(true);
}
newTcContainer.addReaction(newReactContainer);
}
......
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