Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
David Hoksza
bh19-rare-diseases
Commits
7c9fb0d1
Commit
7c9fb0d1
authored
Nov 21, 2019
by
Piotr Gawron
Browse files
command line interface added + README
parent
5f69799f
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
map_generator/README.md
0 → 100644
View file @
7c9fb0d1
# Map generator
This code assemble resources into a single map.
## Requirements
*
Java 8
*
Maven 3.6
## Compilation
```
mvn -DskipTests=true clean install -pl biohackathon -am
```
The compiled runnable file will be located in biohackathon/target/biohackathon-1.0-jar-with-dependencies.jar.
## Execution
To get information about parameters just run:
```
java -jar biohackathon/target/biohackathon-1.0-jar-with-dependencies.jar
```
Sample usage:
```
java -jar biohackathon/target/biohackathon-1.0-jar-with-dependencies.jar --enrichr-file biohackathon/data/enrichr_output.txt --minerva-file biohackathon/data/example_pathway_to_pull.txt --text-mining-file biohackathon/data/brugada_output_file_omnipath.tsv --output-file output.xml
```
map_generator/biohackathon/output.xml
deleted
100644 → 0
View file @
5f69799f
This diff is collapsed.
Click to expand it.
map_generator/biohackathon/pom.xml
View file @
7c9fb0d1
...
...
@@ -37,6 +37,13 @@
<artifactId>
converter-sbml
</artifactId>
<version>
1.0
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-cli/commons-cli -->
<dependency>
<groupId>
commons-cli
</groupId>
<artifactId>
commons-cli
</artifactId>
<version>
1.4
</version>
</dependency>
</dependencies>
<build>
...
...
map_generator/biohackathon/src/main/java/lcsb/mapviewer/Main.java
View file @
7c9fb0d1
...
...
@@ -3,6 +3,7 @@ package lcsb.mapviewer;
import
java.io.ByteArrayInputStream
;
import
java.util.*
;
import
org.apache.commons.cli.*
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -18,14 +19,31 @@ public class Main {
public
static
void
main
(
String
[]
args
)
{
logger
.
debug
(
Arrays
.
asList
(
args
));
Options
options
=
new
Options
();
Option
enricherOption
=
new
Option
(
null
,
"enrichr-file"
,
true
,
"Enrichr output for wikipathway"
);
Option
minervaOption
=
new
Option
(
null
,
"minerva-file"
,
true
,
"Minerva pathways"
);
Option
outputOption
=
new
Option
(
null
,
"output-file"
,
true
,
"Output map in sbml format"
);
Option
textMiningOption
=
new
Option
(
null
,
"text-mining-file"
,
true
,
"Text mining data"
);
enricherOption
.
setRequired
(
true
);
minervaOption
.
setRequired
(
true
);
outputOption
.
setRequired
(
true
);
textMiningOption
.
setRequired
(
true
);
String
wikipathways
=
args
[
0
];
String
minervaPathways
=
args
[
1
];
String
network
=
args
[
2
];
String
output
=
args
[
3
]
;
options
.
addOption
(
enricherOption
)
.
addOption
(
minervaOption
)
.
addOption
(
outputOption
)
.
addOption
(
textMiningOption
)
;
HelpFormatter
formatter
=
new
HelpFormatter
();
CommandLineParser
parser
=
new
DefaultParser
();
try
{
// parse the command line arguments
CommandLine
line
=
parser
.
parse
(
options
,
args
);
String
wikipathways
=
line
.
getOptionValue
(
"enrichr-file"
);
String
minervaPathways
=
line
.
getOptionValue
(
"minerva-file"
);
String
network
=
line
.
getOptionValue
(
"text-mining-file"
);
String
output
=
line
.
getOptionValue
(
"output-file"
);
PathwayMerger
merger
=
new
PathwayMerger
();
PathwayFetcher
fetcher
=
new
PathwayFetcher
();
...
...
@@ -52,6 +70,9 @@ public class Main {
new
ApplySimpleLayoutModelCommand
(
modelWithTextMining
,
reactions
).
execute
();
new
SbmlParser
().
model2File
(
modelWithTextMining
,
output
);
}
catch
(
ParseException
exp
)
{
System
.
err
.
println
(
"Parsing with input parameters: "
+
exp
.
getMessage
());
formatter
.
printHelp
(
"map_generator"
,
options
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
System
.
exit
(-
1
);
...
...
map_generator/output.xml
deleted
100644 → 0
View file @
5f69799f
This diff is collapsed.
Click to expand it.
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