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

get lineage from cached files and other changes

parent ec1c4d65
......@@ -4,7 +4,7 @@
<groupId>pt.uminho.ceb.biosystems.transyt</groupId>
<artifactId>service</artifactId>
<name>service</name>
<version>0.0.12-SNAPSHOT</version>
<version>0.0.13-SNAPSHOT</version>
<build>
<plugins>
<plugin>
......
......@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>pt.uminho.ceb.biosystems.transyt</groupId>
<artifactId>service</artifactId>
<version>0.0.12-SNAPSHOT</version>
<version>0.0.13-SNAPSHOT</version>
<properties>
......@@ -107,7 +107,7 @@
<artifactId>neo4j-java-driver</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>pt.uminho.ceb.biosystems.transyt</groupId>
<artifactId>validation</artifactId>
......@@ -141,7 +141,7 @@
<dependency>
<groupId>pt.uminho.ceb.biosystems.transyt</groupId>
<artifactId>utilities</artifactId>
<version>0.0.12-SNAPSHOT</version>
<version>0.0.13-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
......@@ -171,7 +171,7 @@
<dependency>
<groupId>pt.uminho.ceb.biosystems.transyt</groupId>
<artifactId>scraper</artifactId>
<version>0.0.12-SNAPSHOT</version>
<version>0.0.13-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>uk.ac.ebi.uniprot</groupId>
......@@ -188,38 +188,103 @@
</dependency>
<dependency> <groupId>pt.uminho.sysbio.biosynthframework</groupId>
<artifactId>biosynth-biodb-chebi</artifactId> <version>0.9.0-SNAPSHOT</version>
<exclusions> <exclusion> <groupId> pt.uminho.sysbio.biosynthframework </groupId>
<artifactId>biosynth-biodb</artifactId> </exclusion> <exclusion> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> </exclusion> <exclusion> <groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId> </exclusion> </exclusions> </dependency>
<dependency> <groupId>pt.uminho.sysbio.biosynthframework</groupId>
<artifactId>biosynth-biodb-reactome</artifactId> <version>0.9.0-SNAPSHOT</version>
<exclusions> <exclusion> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId>
</exclusion> </exclusions> </dependency> <dependency> <groupId>pt.uminho.sysbio.biosynthframework</groupId>
<artifactId>biosynth-chemanalysis</artifactId> <version>0.9.0-SNAPSHOT</version>
<exclusions> <exclusion> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId>
</exclusion> <exclusion> <groupId>log4j</groupId> <artifactId>log4j</artifactId>
</exclusion> </exclusions> </dependency>
<dependency> <groupId>pt.uminho.sysbio.biosynthframework</groupId>
<artifactId>biosynth-core</artifactId> <version>0.9.0-SNAPSHOT</version>
<exclusions> <exclusion> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId>
</exclusion> </exclusions> </dependency>
<dependency> <groupId>pt.uminho.sysbio.biosynthframework</groupId>
<artifactId>biosynth-genome</artifactId> <version>0.9.0-SNAPSHOT</version>
<exclusions> <exclusion> <groupId>org.biojava</groupId> <artifactId>biojava-alignment</artifactId>
</exclusion> <exclusion> <groupId>org.biojava</groupId> <artifactId>biojava-core</artifactId>
</exclusion> <exclusion> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId>
</exclusion> </exclusions> </dependency> <dependency> <groupId>pt.uminho.sysbio.biosynthframework</groupId>
<artifactId>biosynth-integration</artifactId> <version>0.9.0-SNAPSHOT</version>
<exclusions> <exclusion> <groupId>org.neo4j</groupId> <artifactId>neo4j</artifactId>
</exclusion> <exclusion> <groupId> pt.uminho.sysbio.biosynthframework </groupId>
<artifactId>biosynth-biodb</artifactId> </exclusion> <exclusion> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> </exclusion> </exclusions> </dependency>
<dependency>
<groupId>pt.uminho.sysbio.biosynthframework</groupId>
<artifactId>biosynth-biodb-chebi</artifactId>
<version>0.9.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId> pt.uminho.sysbio.biosynthframework </groupId>
<artifactId>biosynth-biodb</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>pt.uminho.sysbio.biosynthframework</groupId>
<artifactId>biosynth-biodb-reactome</artifactId>
<version>0.9.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>pt.uminho.sysbio.biosynthframework</groupId>
<artifactId>biosynth-chemanalysis</artifactId>
<version>0.9.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>pt.uminho.sysbio.biosynthframework</groupId>
<artifactId>biosynth-core</artifactId>
<version>0.9.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>pt.uminho.sysbio.biosynthframework</groupId>
<artifactId>biosynth-genome</artifactId>
<version>0.9.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.biojava</groupId>
<artifactId>biojava-alignment</artifactId>
</exclusion>
<exclusion>
<groupId>org.biojava</groupId>
<artifactId>biojava-core</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>pt.uminho.sysbio.biosynthframework</groupId>
<artifactId>biosynth-integration</artifactId>
<version>0.9.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
</exclusion>
<exclusion>
<groupId> pt.uminho.sysbio.biosynthframework </groupId>
<artifactId>biosynth-biodb</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
......@@ -235,10 +300,17 @@
</dependency>
<dependency> <groupId>pt.uminho.sysbio.biosynthframework</groupId>
<artifactId>biosynth-visualization</artifactId> <version>0.9.0-SNAPSHOT</version>
<exclusions> <exclusion> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId>
</exclusion> </exclusions> </dependency>
<dependency>
<groupId>pt.uminho.sysbio.biosynthframework</groupId>
<artifactId>biosynth-visualization</artifactId>
<version>0.9.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
......@@ -302,12 +374,12 @@
<version>${hibernate.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.2.2.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.2.2.RELEASE</version>
</dependency>
</dependencies>
......
......@@ -71,27 +71,6 @@ public class initializeNeo4jdb {
try {
//
// Set<BiodbMetaboliteNode> allMetabolites = service.listMetabolites();
// System.out.println(allMetabolites.size());
// service.getNodeByEntryAndLabel("", GlobalLabel.n);
// ResourceIterable<Node> nodes = service.getAllNodes();
// service.getNodeByEntryAndLabel(, MetabolitePropertyLabel.Name);
// service.get
// ResourceIterable<Label> labels = service.getAllLabels();
// ResourceIterable<Node> nodes = service.getAllNodes();
// Node node = service.getNodeByEntryAndLabel("META:2prime-hydroxyisoflavanones", MetaboliteMajorLabel.MetaCyc);
// Node node = service.getNodeByEntryAndLabel("C00001", MetaboliteMajorLabel.LigandCompound);
Set<BiodbMetaboliteNode> metabolites = service.listMetabolites(MetaboliteMajorLabel.LigandGlycan);
......@@ -103,372 +82,7 @@ public class initializeNeo4jdb {
System.out.println(metabolites.size());
// node = service.getNodeByEntryAndLabel("META:Isoflavanoids", MetaboliteMajorLabel.MetaCyc);
// if(node.hasProperty("name"))
// System.out.println(node.getProperty("name"));
//
// System.out.println(node.getAllProperties());
//
// System.out.println(node.getId());
//
// Iterable<Relationship> direction = node.getRelationships(Direction.INCOMING);
//
// System.out.println();
//
// for(Relationship dir : direction) {
//
//
// Node[] nodes = dir.getNodes();
//
// System.out.println(nodes[0]);
//
// System.out.println(nodes[0].getAllProperties());
//
// if(nodes[0].hasProperty("entry"))
// System.out.println(nodes[0].getProperty("entry"));
//
// if(nodes[0].hasProperty("name"))
// System.out.println(nodes[0].getProperty("name"));
//
// System.out.println(dir.getType().toString());
//
// System.out.println(nodes[1]);
//
// System.out.println(nodes[1].getAllProperties());
//
//
// if(nodes[1].hasProperty("entry"))
// System.out.println(nodes[1].getProperty("entry"));
//
// if(nodes[1].hasProperty("name"))
// System.out.println(nodes[1].getProperty("name"));
//
//
// System.out.println();
// }
// Node node = service.getNodeByEntryAndLabel("C00001", MetaboliteMajorLabel.MetaCyc);
// System.out.println(node.getId());
//ID - 343339
// int i = 0;
//
// for(Node node : nodes) {
//
// System.out.println(node.getAllProperties());
//
// if(node.hasProperty("name"))
// System.out.println(node.getProperty("name"));
//
//
//// if(i == 10000)
//// break;
////
//// i++;
// }
// Set<String> allMetabolites = RetrieveBiosynthMetabolites.getAllMetabolites(service);
//
// Set<String> InternalMetabolites = InternaldbMetabolites.getAllMetabololites();
//
// FindMetabolitesID.findCommonMetabolites(allMetabolites, InternalMetabolites);
// Node node1 = service.getNodeByIdAndLabel(68046, MetabolitePropertyLabel.Name);
//
// BiodbMetaboliteNode metabolite = service.getMetabolite("C00001", MetaboliteMajorLabel.LigandCompound);
//
// System.out.println(metabolite.getId());
//
// metabolite.getAllProperties();
//
// System.out.println("Properties -----> " + metabolite.getAllProperties().keySet());
//
// System.out.println("Name: " + metabolite.getAllProperties().get("name"));
//
// System.out.println();
// System.out.println();
// System.out.println();
//
// for(Relationship rel : metabolite.getRelationships()) {
//
// Node node = rel.getEndNode();
//// Node[] node = rel.getNodes();
//
//// System.out.println(node[0] + "\t" + node[1]);
//
// System.out.println();
// System.out.println("NODE: " + node.getAllProperties());
//
// Map<String, Object> relProperties = rel.getAllProperties();
//
// if(!relProperties.isEmpty())
// System.out.println(relProperties.keySet());
//
// }
// System.out.println();
// System.out.println();
// System.out.println();
//
// System.out.println("Major Label Database ---- " + metabolite.getDatabase());
// System.out.println("Metabolite ID ---- " + metabolite.getEntry());
// System.out.println("Metabolite name ---- " + metabolite.getProperty("name"));
//
//
// System.out.println();
// System.out.println();
// System.out.println();
//
// Set<String> databases = new HashSet<>();
//
// for(BiodbMetaboliteNode node : allMetabolites) {
//
// Map<String, Object> nodeProperties = node.getAllProperties();
//
// if(node.hasProperty("major_label")) {
//
// databases.add(nodeProperties.get("major_label").toString());
//
// }
//
//
//// System.out.println(node.getEntry());
//// System.out.println(nodeProperties);
//
// Iterable<Relationship> relationships = node.getRelationships();
//
// for(Relationship rel : relationships) {
//
// Map<String, Object> relProperties = rel.getAllProperties();
//
// if (relProperties.containsKey("ref")) {
//
// databases.add(relProperties.get("ref").toString());
//
// }
//
//// System.out.println("Relations -> " + relProperties);
// }
//
// }
// System.out.println(databases.size());
// System.out.println(databases);
// System.out.println("Tamanho -> " + allMetabolites.size());
// Set<String> met = new HashSet<>();
// for(BiodbMetaboliteNode metabolite : allMetabolites) {
//
// System.out.println(metabolite.getEntry());
//
// Iterable<Relationship> rel = metabolite.getRelationships();
//
// for(Relationship relation : rel)
// System.out.println("relationship -> " + relation.getAllProperties());
//
// Map<String, Object> prop = metabolite.getAllProperties();
//
// System.out.println("Properties -> " + prop);
// met.add(metabolite.getEntry());7
// }
// System.out.println(met);
// BiodbGraphDatabaseService service = new BiodbGraphDatabaseService(graphDatabaseService);
// BiodbMetaboliteNode cpdNode = service.getMetabolite("C00011", MetaboliteMajorLabel.LigandCompound);
// BiodbMetaboliteNode cpdNode = service.getMetabolite("C00011", MetaboliteMajorLabel.LigandCompound);
// System.out.println(cpdNode.getId() + " " + Neo4jUtils.getPropertiesMap(cpdNode));
// Set<BiodbMetaboliteNode> allMetabolites = service.listMetabolites();
// System.out.println(cpdNode.hasProperty("descriptio"));
//
// System.out.println(cpdNode.getAllProperties());
//
//
//
// System.out.println(cpdNode.hasRelationship());
//
// Iterable<Relationship> relationships = cpdNode.getRelationships();
//
// System.out.println();
// Set<String> met = new HashSet<>();
// for(BiodbMetaboliteNode metabolite : allMetabolites)
// met.add(metabolite.getEntry());
// System.out.println(met);
//
// ResourceIterable<Node> nodes = service.getAllNodes();
// BiodbMetaboliteNode cpdNode = service.getMetabolite("C00011", MetaboliteMajorLabel.LigandCompound);
//
// System.out.println(cpdNode.getEntry());
// System.out.println("coiso");
// service.listNode
// ResourceIterable<Label> labels = service.getAllLabels();
// System.out.println(allMetabolites.size());
//
// Set<Long> met = new HashSet<>();
////
//// Set<String> databases = new HashSet<>();
////
// for(Node node : nodes) {
//
// met.add(node.getId());
//
// }
//
// System.out.println(met);
// for(Label label : labels) {
//
// met.add(label.name());
//
// }
//
// System.out.println(met);
// System.out.println("coiso2");
// System.out.println(met.contains("h2o"));
// BiodbMetaboliteNode node = service.getMetabolite("cpd09410", MetaboliteMajorLabel.LigandCompound);
////
// System.out.println(node);
// System.out.println(node.hasRelationship() + " dsa");
// System.out.println(met); //all metabolites by name
// System.out.println();
//
// Iterable<RelationshipType> mm = cpdNode.getRelationshipTypes();
//
// Iterable<Relationship> relationships = cpdNode.getRelationships(RelationshipType.withName("has_crossreference_to"));
////
// MetaboliteMajorLabel database = cpdNode.getDatabase();
//
// System.out.println(database.name());
// Node[] nodes = relationship.getNodes();
////
// for(Relationship rel : relationships) {
//
// Map<String, Object> properties = rel.getAllProperties();
//
// if(properties.containsKey("ref")) {
//
// if(properties.get("ref").equals("KEGG Compound"))
// System.out.println(properties.get("link"));
//
// if(properties.get("ref").equals("KEGG"))
// System.out.println(properties.get("value"));
//
// }
// System.out.println(rel.getType());
// }
// Iterable<Relationship> mm = cpdNode.getRelationships(Direction.BOTH);
//
// for(Relationship rel : mm) {
//
// Map<String, Object> prop = rel.getAllProperties();
//
// System.out.println(prop.keySet());
//
// System.out.println(prop.get("url"));
// }
// System.out.println(cpdNode.getRelationships(Direction.OUTGOING));
// Set<Node> metacycs = new HashSet<>();
//primary labels
//metabolites MetaboliteMajorLabel
//pt.uminho.ceb.biosystems.transyt.service.reactions ReactionMajorLabel
// for (Relationship r : cpdNode.getRelationships(MetaboliteRelationshipType.has_crossreference_to)) {
// Node refNode = r.getOtherNode(cpdNode);
//
// if (refNode.hasLabel(MetaboliteMajorLabel.MetaCyc) &&
// refNode.hasLabel(GlobalLabel.Metabolite)) {