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

new types of reactions possible and debug

parent 95a1f853
......@@ -11,6 +11,7 @@ import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pt.uminho.ceb.biosystems.merlin.transporters.core.utils.Enumerators.TransportType;
import pt.uminho.ceb.biosystems.transyt.utilities.capsules.ReactionContainer;
import pt.uminho.ceb.biosystems.transyt.utilities.capsules.TcNumberContainer;
import pt.uminho.ceb.biosystems.transyt.utilities.capsules.TcdbMetabolitesContainer;
......@@ -43,7 +44,7 @@ public class GenerateTransportReactions {
// Map<String, TcdbMetabolitesContainer> tcdbMetabolites2 = new HashMap<>();
//
// tcdbMetabolites2.put("B5BRC2", tcdbMetabolites.get("B5BRC2"));
// tcdbMetabolites2.put("B3ECG6", tcdbMetabolites.get("B3ECG6"));
for(String accession : tcdbMetabolites.keySet()) {
......@@ -69,8 +70,6 @@ public class GenerateTransportReactions {
TcNumberContainer tcNumberContainer = data.get(familyTC);
evidence = null;
String subfamilyDescription = "";
if(proteinFamilyDescription.containsKey(tcNumber.replaceAll("(\\.\\d+)$", ""))) {
......@@ -314,7 +313,10 @@ public class GenerateTransportReactions {
ReactionContainer newReactContainer = new ReactionContainer(newReactant, newProduct, reactionContainer.isReversible());
newReactContainer.setTransportType(reactionContainer.getTransportType());
if(reactants.size() == 1 && products.size() == 1)
type = TypeOfTransporter.Uniport;
newReactContainer.setTransportType(type);
newReactContainer.setProperties(reactionContainer.getProperties());
newReactContainer.setOriginalReaction(originalReaction);
newReactContainer.setConfidenceLevel("B-0");
......
......@@ -586,7 +586,10 @@ public class FindTransporters {
if(reactantsComp.isEmpty() && productsComp.isEmpty())
return TypeOfTransporter.Default;
if(reactantsMetab.contains("hv") || reactantsMetab.contains("light") || reactantsMetab.contains("photon") || reactantsMetab.contains("hnu"))
return TypeOfTransporter.Light;
if(reactantsMetab.containsAll(productsMetab) && productsMetab.containsAll(reactantsMetab)) {
if((reactantsMetab.size() == 1 && productsMetab.size() == 1))
......
......@@ -485,6 +485,9 @@ public class ProcessCompartments {
for(int i = 0; i < compartmentsList.length; i++) {
try {
// if(comp.equalsIgnoreCase("int")) //can't create an enumerator with reserved word
// comp = "in";
if(compartmentsList[i].equals(Compartments.valueOf(comp.toLowerCase().trim()))) {
compartmentsRelativePositions.put(i, comp);
......@@ -493,7 +496,9 @@ public class ProcessCompartments {
}
catch (Exception e) {
error++;
logger.error("Compartment '" + comp.toLowerCase() + "' not found to assign relative positions");
logger.debug("reactant: " + reactant);
logger.debug("product: " + product);
compartmentsRelativePositions.put(compartmentsList.length+error, comp);
e.printStackTrace();
break;
......
......@@ -29,27 +29,35 @@ public class Retriever {
try {
boolean useCache = false;
///////// - SEARCHER
logger.info("Retrieving TCDB FASTA file...");
TcdbRetriever.getSubstrates();
if(!useCache)
TcdbRetriever.getSubstrates();
Set<String> tcNumbers = TcdbExplorer.getTcNumbers(false);
Set<String> tcNumbers = TcdbExplorer.getTcNumbers(useCache);
Set<String> toSearch = TcdbExplorer.generateTCsFamily(tcNumbers);
FindTransporters.saveAllTCFamiliesInformation(toSearch);
if(!useCache)
FindTransporters.saveAllTCFamiliesInformation(toSearch);
Map<String, String> proteinFamilyDescription = TcdbExplorer.getProteinsBelongingToFamilyDescription(tcNumbers);
Map<String, String> proteinFamilyDescription = null;
FilesUtils.saveMapInFile(FilesUtils.getBackupFamilyDescriptionsFilesDirectory().concat("familyDescription.txt"), proteinFamilyDescription);
if(!useCache) {
proteinFamilyDescription = TcdbExplorer.getProteinsBelongingToFamilyDescription(tcNumbers);
FilesUtils.saveMapInFile(FilesUtils.getBackupFamilyDescriptionsFilesDirectory().concat("familyDescription.txt"), proteinFamilyDescription);
}
else
proteinFamilyDescription = FilesUtils.readMapFromFile(FilesUtils.getBackupFamilyDescriptionsFilesDirectory().concat("familyDescription.txt"));
//////////
// Map<String, String> proteinFamilyDescription = FilesUtils.readMapFromFile(FilesUtils.getBackupFamilyDescriptionsFilesDirectory().concat("familyDescription.txt"));
//////////
logger.info("Search complete!");
......
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