Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
metexplore
met4j
Commits
c3886952
Commit
c3886952
authored
Feb 14, 2020
by
maxchaza
Browse files
no message
parent
6178be54
Changes
10
Hide whitespace changes
Inline
Side-by-side
met4j-chemUtils/pom.xml
View file @
c3886952
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
</parent>
<artifactId>
met4j-chemUtils
</artifactId>
...
...
@@ -33,7 +33,7 @@
<dependency>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j-core
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
</dependency>
</dependencies>
</project>
met4j-core/pom.xml
View file @
c3886952
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
</parent>
<artifactId>
met4j-core
</artifactId>
...
...
met4j-core/src/main/java/fr/inra/toulouse/metexplore/met4j_core/computation/transform/Merger.java
View file @
c3886952
...
...
@@ -211,7 +211,8 @@ public class Merger {
for
(
String
rId
:
reactionToRemove
){
bn
.
removeBioChemicalReaction
(
rId
);
}
System
.
out
.
println
(
"no transp graph : "
+
bn
.
getBiochemicalReactionList
().
size
());
return
reactionToRemove
.
size
();
}
...
...
@@ -231,7 +232,15 @@ public class Merger {
//add reaction to the to-be-removed list
reactionToRemove
.
add
(
r
.
getId
());
//update compounds links to reactions
BioChemicalReaction
choosenOne
=
uniqReaction
.
get
(
hash
);
for
(
String
key
:
r
.
getPathwayList
().
keySet
())
{
if
(!
choosenOne
.
getPathwayList
().
containsKey
(
key
))
{
choosenOne
.
addPathway
(
r
.
getPathwayList
().
get
(
key
));
}
}
for
(
BioPhysicalEntity
e
:
r
.
getListOfSubstrates
().
values
()){
e
.
getReactionsAsSubstrate
().
remove
(
r
.
getId
());
e
.
getReactionsAsSubstrate
().
put
(
choosenOne
.
getId
(),
choosenOne
);
...
...
@@ -246,7 +255,40 @@ public class Merger {
for
(
String
rId
:
reactionToRemove
){
bn
.
removeBioChemicalReaction
(
rId
);
}
int
nbReac
=
uniqReaction
.
size
();
int
indexReac
=
0
;
int
nbOverlap
=
0
;
System
.
err
.
println
(
"nbReac : "
+
nbReac
);
System
.
err
.
println
(
"{\"reactions\":["
);
for
(
Integer
key
:
uniqReaction
.
keySet
()){
System
.
err
.
print
(
"{"
);
System
.
err
.
print
(
"\"id\" : \""
+
uniqReaction
.
get
(
key
).
getId
()+
"\","
);
int
nbPath
=
uniqReaction
.
get
(
key
).
getPathwayList
().
keySet
().
size
();
int
indexPath
=
0
;
System
.
err
.
print
(
"\"pathways\" : ["
);
for
(
String
pathName
:
uniqReaction
.
get
(
key
).
getPathwayList
().
keySet
())
{
if
(
indexPath
==
2
)
nbOverlap
++;
System
.
err
.
print
(
"\""
+
pathName
+
"\""
);
if
(
nbPath
-
1
!=
indexPath
)
System
.
err
.
print
(
", "
);
indexPath
++;
}
System
.
err
.
print
(
"]}"
);
if
(
nbReac
-
1
!=
indexReac
)
System
.
err
.
println
(
","
);
indexReac
++;
}
System
.
err
.
println
(
"]}"
);
System
.
err
.
println
(
"nbOverlap : "
+
nbOverlap
);
System
.
out
.
println
(
"no compartment graph : "
+
bn
.
getBiochemicalReactionList
().
size
());
return
reactionToRemove
.
size
();
}
...
...
met4j-cytoscape/pom.xml
View file @
c3886952
...
...
@@ -3,7 +3,7 @@
<parent>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
</parent>
<artifactId>
met4j-cytoscape
</artifactId>
<name>
met4j-cytoscape
</name>
...
...
@@ -18,7 +18,7 @@
<dependency>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j-core
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
</dependency>
<dependency>
<groupId>
commons-io
</groupId>
...
...
met4j-graph/pom.xml
View file @
c3886952
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
</parent>
<artifactId>
met4j-graph
</artifactId>
...
...
@@ -35,7 +35,7 @@
<dependency>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j-core
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
...
...
@@ -45,12 +45,12 @@
<dependency>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j-mathUtils
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
</dependency>
<dependency>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j-chemUtils
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
</dependency>
</dependencies>
</project>
met4j-mathUtils/pom.xml
View file @
c3886952
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
</parent>
<artifactId>
met4j-mathUtils
</artifactId>
...
...
met4j-report/pom.xml
View file @
c3886952
...
...
@@ -5,12 +5,12 @@
<parent>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
</parent>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j-report
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
<packaging>
jar
</packaging>
<name>
met4j-report
</name>
...
...
met4j-toolbox/pom.xml
View file @
c3886952
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
</parent>
<artifactId>
met4j-toolbox
</artifactId>
...
...
@@ -28,17 +28,17 @@
<dependency>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j-chemUtils
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
</dependency>
<dependency>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j-core
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
</dependency>
<dependency>
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j-graph
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.kohsuke.args4j/args4j-maven-plugin -->
<dependency>
...
...
met4j-toolbox/src/main/java/fr/inra/toulouse/metexplore/met4j_toolbox/RemoveCompartmentalization.java
View file @
c3886952
...
...
@@ -86,19 +86,22 @@ public class RemoveCompartmentalization {
sbml2BioNetworkLite
.
addDefaultRefHandlers
();
this
.
model
=
sbml2BioNetworkLite
.
getBioNetwork
();
this
.
model
=
Merger
.
mergeCompartmentFromId
(
this
.
model
,
"^(.+)_\\w$"
);
System
.
out
.
println
(
"nb reac : "
+
this
.
model
.
getBiochemicalReactionList
().
size
());
Merger
.
mergeReactions
(
this
.
model
);
int
nbRemove
=
Merger
.
mergeReactions
(
this
.
model
);
System
.
out
.
println
(
nbRemove
);
Merger
.
removeTransport
(
this
.
model
);
nbRemove
=
Merger
.
removeTransport
(
this
.
model
);
System
.
out
.
println
(
nbRemove
);
String
flatFileName
=
fileIn
.
getPath
().
substring
(
0
,
fileIn
.
getPath
().
length
()
-
4
)+
"_Flat.xml"
;
BioNetworkToJSBML
bioNetworkToJSBML
=
new
BioNetworkToJSBML
(
this
.
model
,
flatFileName
);
bioNetworkToJSBML
.
write
();
System
.
out
.
println
(
"Nb reac : "
+
this
.
model
.
getBiochemicalReactionList
().
size
());
Sbml2SbmlGeneAnnotation
sbml2SbmlGeneAnnotation
=
new
Sbml2SbmlGeneAnnotation
(
fileIn
.
getPath
(),
flatFileName
);
sbml2SbmlGeneAnnotation
.
build
();
System
.
err
.
println
(
fileIn
.
getPath
().
substring
(
0
,
fileIn
.
getPath
().
length
()
-
4
)+
"_Flat.xml"
);
}
...
...
pom.xml
View file @
c3886952
...
...
@@ -4,7 +4,7 @@
<groupId>
fr.inra.toulouse.metexplore
</groupId>
<artifactId>
met4j
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
-RemoveCompartments
</version>
<packaging>
pom
</packaging>
<name>
met4j
</name>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment