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
d326310a
Commit
d326310a
authored
May 25, 2022
by
cfrainay
Browse files
[Toolbox] empty file handling in NetworkAnalysis
parent
90a25607
Changes
3
Hide whitespace changes
Inline
Side-by-side
met4j-toolbox/src/main/java/fr/inrae/toulouse/metexplore/met4j_toolbox/networkAnalysis/MetaboRank.java
View file @
d326310a
...
...
@@ -144,10 +144,12 @@ public class MetaboRank extends AbstractMet4jApplication {
System
.
err
.
println
(
"transition probabilities computed (reverse graph)"
);
importSeeds
(
seedsFilePath
);
compute
();
printCompoundTable
(
output
);
if
(
seeds
.
isEmpty
()){
System
.
err
.
println
(
"no seed available, computation aborted"
);
}
else
{
compute
();
printCompoundTable
(
output
);
}
System
.
err
.
println
(
"done."
);
}
...
...
met4j-toolbox/src/main/java/fr/inrae/toulouse/metexplore/met4j_toolbox/networkAnalysis/PrecursorNetwork.java
View file @
d326310a
...
...
@@ -71,10 +71,14 @@ public class PrecursorNetwork extends AbstractMet4jApplication {
.
map
(
BioReaction
.
class
::
cast
)
.
collect
(
BioCollection:
:
new
,
BioCollection:
:
add
,
BioCollection:
:
addAll
);
fr
.
inrae
.
toulouse
.
metexplore
.
met4j_graph
.
computation
.
analyze
.
PrecursorNetwork
precursorComp
=
new
fr
.
inrae
.
toulouse
.
metexplore
.
met4j_graph
.
computation
.
analyze
.
PrecursorNetwork
(
graph
,
bootstraps
,
targets
,
forbidden
);
BipartiteGraph
precursorNet
=
precursorComp
.
getPrecursorNetwork
();
ExportGraph
.
toGml
(
precursorNet
,
output
);
if
(
targets
.
isEmpty
()){
System
.
err
.
println
(
"no target available, computation aborted"
);
}
else
{
fr
.
inrae
.
toulouse
.
metexplore
.
met4j_graph
.
computation
.
analyze
.
PrecursorNetwork
precursorComp
=
new
fr
.
inrae
.
toulouse
.
metexplore
.
met4j_graph
.
computation
.
analyze
.
PrecursorNetwork
(
graph
,
bootstraps
,
targets
,
forbidden
);
BipartiteGraph
precursorNet
=
precursorComp
.
getPrecursorNetwork
();
ExportGraph
.
toGml
(
precursorNet
,
output
);
}
}
@Override
...
...
met4j-toolbox/src/main/java/fr/inrae/toulouse/metexplore/met4j_toolbox/networkAnalysis/ScopeNetwork.java
View file @
d326310a
...
...
@@ -79,14 +79,18 @@ public class ScopeNetwork extends AbstractMet4jApplication {
.
map
(
BioReaction
.
class
::
cast
)
.
collect
(
BioCollection:
:
new
,
BioCollection:
:
add
,
BioCollection:
:
addAll
);
ScopeCompounds
scopeComp
=
new
ScopeCompounds
(
graph
,
seeds
,
bootstraps
,
forbidden
);
if
(
includeSides
)
scopeComp
.
includeBootstrapsInScope
();
if
(
trace
)
scopeComp
.
trace
();
BipartiteGraph
scope
=
scopeComp
.
getScopeNetwork
();
if
(
trace
)
{
ExportGraph
.
toGmlWithAttributes
(
scope
,
output
,
scopeComp
.
getExpansionSteps
(),
"step"
);
}
else
{
ExportGraph
.
toGml
(
scope
,
output
);
if
(
seeds
.
isEmpty
()){
System
.
err
.
println
(
"no seed available, computation aborted"
);
}
else
{
ScopeCompounds
scopeComp
=
new
ScopeCompounds
(
graph
,
seeds
,
bootstraps
,
forbidden
);
if
(
includeSides
)
scopeComp
.
includeBootstrapsInScope
();
if
(
trace
)
scopeComp
.
trace
();
BipartiteGraph
scope
=
scopeComp
.
getScopeNetwork
();
if
(
trace
)
{
ExportGraph
.
toGmlWithAttributes
(
scope
,
output
,
scopeComp
.
getExpansionSteps
(),
"step"
);
}
else
{
ExportGraph
.
toGml
(
scope
,
output
);
}
}
}
...
...
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