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 74e07303 authored by Davide Lagoa's avatar Davide Lagoa
Browse files

validation

parent 94ffa7a2
......@@ -7,6 +7,8 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import dictionary.Synonyms;
import enumerators.TypeOfTransporter;
......@@ -38,7 +40,7 @@ public class GenerateTransportReactions {
// Map<String, TcdbMetabolitesContainer> tcdbMetabolites2 = new HashMap<>();
//
// tcdbMetabolites2.put("Q9Y6L6", tcdbMetabolites.get("Q9Y6L6"));
// tcdbMetabolites2.put("P27125", tcdbMetabolites.get("P27125"));
for(String accession : tcdbMetabolites.keySet()) {
......@@ -48,7 +50,7 @@ public class GenerateTransportReactions {
for(String tcNumber : tcdbMetContainer.getTcNumbers()) {
// System.out.println(tcNumber);
// System.out.println(tcNumber);
TcNumberContainer newTcContainer = new TcNumberContainer();
......@@ -63,40 +65,45 @@ public class GenerateTransportReactions {
TypeOfTransporter evidence = null;
TcNumberContainer tcNumberContainer = data.get(familyTC);
evidence = null;
evidence = checkForEvidenceOfTransport(tcdbMetContainer.getDescription(tcNumber), tcNumber);
if(evidence == null && proteinFamilyDescription.containsKey(tcNumber.replaceAll("(\\.\\d+)$", ""))) {
evidence = checkForEvidenceOfTransport(proteinFamilyDescription.get(tcNumber.replaceAll("(\\.\\d+)$", "")), tcNumber);
}
if(evidence == null && tcNumberContainer.getFamily() != null)
evidence = checkForEvidenceOfTransport(tcNumberContainer.getFamily(), tcNumber);
if(evidence == null && tcNumberContainer.getSuperFamily() != null)
evidence = checkForEvidenceOfTransport(tcNumberContainer.getSuperFamily(), tcNumber);
if(tcNumberContainer.getAllReactionsIds().size() == 0) {
if(evidence == null)
evidence = TypeOfTransporter.Uniport;
newTcContainer = correctReaction(tcNumber, "NONE", "C0" , TypeOfTransporter.Uniport, null , tcdbMetContainer.getMetabolites(tcNumber), newTcContainer);
newTcContainer = correctReaction(tcNumber, "NONE", "C0" , evidence, null , tcdbMetContainer.getMetabolites(tcNumber), newTcContainer);
}
else {
for(int id : tcNumberContainer.getAllReactionsIds()) {
evidence = null;
ReactionContainer reactionContainer = tcNumberContainer.getReactionContainer(id);
evidence = checkForEvidenceOfTransport(tcdbMetContainer.getDescription(tcNumber), tcNumber);
if(evidence == null && proteinFamilyDescription.containsKey(tcNumber.replaceAll("(\\.\\d+)$", ""))) {
evidence = checkForEvidenceOfTransport(proteinFamilyDescription.get(tcNumber.replaceAll("(\\.\\d+)$", "")), tcNumber);
}
if(evidence == null && tcNumberContainer.getFamily() != null)
evidence = checkForEvidenceOfTransport(tcNumberContainer.getFamily(), tcNumber);
if(evidence == null && tcNumberContainer.getSuperFamily() != null)
evidence = checkForEvidenceOfTransport(tcNumberContainer.getSuperFamily(), tcNumber);
// System.out.println(accession);
Boolean antiportOrSymport = selectMethodOfMetabolitesDistribution(reactionContainer.getReaction(), reactionContainer.getTransportType(), dictionary);
// System.out.println();
// if(accession.equalsIgnoreCase("P26287") && tcNumber.equals("3.D.3.5.1")) {
// if(accession.equalsIgnoreCase("P26287") && tcNumber.equals("3.D.3.5.1")) {
// System.out.println("AQUIII" + "\t" + reactionContainer.getReaction());
// System.out.println("AQUIII2" + "\t " + antiportOrSymport + " \t" + evidence + "\t" + reactionContainer.getTransportType().toString());
// }
// }
for(List<String> metabolites : tcdbMetContainer.getMetabolitesCombinations(tcNumber, antiportOrSymport, evidence, accession)) {
......@@ -535,7 +542,7 @@ public class GenerateTransportReactions {
if(tcNumber.equals("2.A.1.4.8")) //create exception
return TypeOfTransporter.Uniport;
else if(tcNumber.equals("2.A.60.1.5"))
else if(tcNumber.equals("2.A.60.1.5") || tcNumber.contains("2.A.49."))
return TypeOfTransporter.Antiport;
else if(tcNumber.matches("3\\.D\\..+")) {
......@@ -1715,30 +1722,61 @@ public class GenerateTransportReactions {
accept = true;
}
else if(react.replace("D-", "").replaceAll("[^A-Za-z0-9]", "").equalsIgnoreCase(metabolite.replaceAll("[^A-Za-z0-9]", ""))){
reactant = reactant.replace(reactantMetabolites.get(react), metabolite);
accept = true;
}
else if(react.replace("L-", "").replaceAll("[^A-Za-z0-9]", "").equalsIgnoreCase(metabolite.replaceAll("[^A-Za-z0-9]", ""))){
reactant = reactant.replace(reactantMetabolites.get(react), metabolite);
accept = true;
}
}
}
for(String prod : productMetabolites.keySet()) {
for(String metabolite : metabolites) {
if(prod.replaceAll("[^A-Za-z0-9]", "").equalsIgnoreCase(metabolite.replaceAll("[^A-Za-z0-9]", ""))) {
// if(tc.equals("1.C.10.3.1 K7JEL9"))
// System.out.println(prod + "\t" + metabolite);
product = product.replace(productMetabolites.get(prod), metabolite);
accept = true;
}
else if(prod.replace("D-", "").replaceAll("[^A-Za-z0-9]", "").equalsIgnoreCase(metabolite.replaceAll("[^A-Za-z0-9]", ""))) {
// if(tc.equals("1.C.10.3.1 K7JEL9"))
// System.out.println(prod + "\t" + metabolite);
product = product.replace(productMetabolites.get(prod), metabolite);
accept = true;
}
else if(prod.replace("L-", "").replaceAll("[^A-Za-z0-9]", "").equalsIgnoreCase(metabolite.replaceAll("[^A-Za-z0-9]", ""))) {
// if(tc.equals("1.C.10.3.1 K7JEL9"))
// System.out.println(prod + "\t" + metabolite);
product = product.replace(productMetabolites.get(prod), metabolite);
accept = true;
}
}
}
if(accept)
if(accept) {
// System.out.println("guardar");
confidenceLevel = count;
if(tc.equals("3.D.1.1.1 P0AFD6")) {
System.out.println("AQUI1222 " + metabolites);
}
// if(tc.equals("3.D.1.1.1 P0AFD6")) {
// System.out.println("AQUI1222 " + metabolites);
// }
}
......
......@@ -505,6 +505,9 @@ public class FindTransporters {
if(tc.matches("4\\.A\\..+"))
return TypeOfTransporter.PEPdependent;
else if(reactant.contains("ATP") && reactant.contains("Coenzymes A"))
return TypeOfTransporter.BiochemicalCoA;
else if(reactant.contains("ATP"))
return TypeOfTransporter.BiochemicalATP;
......@@ -544,7 +547,7 @@ public class FindTransporters {
else if(word.matches("\\d*cyt\\w*") || word.matches("\\d*cytochrome(s)*"))
cyt = true;
}
// System.out.println(reactantsMetab);
// System.out.println(reactantsComp);
// System.out.println(productsMetab);
......
#Generated by Maven Integration for Eclipse
#Wed Oct 10 16:12:25 BST 2018
#Sat Oct 27 14:58:19 BST 2018
m2e.projectLocation=C\:\\Users\\Davide\\Biosynth2\\triage
m2e.projectName=triage
groupId=tcdb
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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