Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
e34fe3a1
Commit
e34fe3a1
authored
Jan 26, 2017
by
Peter van 't Hof
Browse files
Adding a simple placeholder for a tool
parent
d36878da
Changes
2
Hide whitespace changes
Inline
Side-by-side
biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/JsonToHdf5.scala
0 → 100644
View file @
e34fe3a1
package
nl.lumc.sasc.biopet.tools
import
java.io.File
import
ncsa.hdf.
`object`
.
h5
.
H5File
import
nl.lumc.sasc.biopet.tools.GvcfToBed.Args
import
nl.lumc.sasc.biopet.utils.
{
ConfigUtils
,
ToolCommand
}
/**
* Created by pjvanthof on 26/01/2017.
*/
object
JsonToHdf5
extends
ToolCommand
{
case
class
Args
(
inputJson
:
File
=
null
,
outputHdf5
:
File
=
null
)
extends
AbstractArgs
class
OptParser
extends
AbstractOptParser
{
opt
[
File
](
'I'
,
"inputJson"
)
required
()
maxOccurs
1
valueName
"<file>"
action
{
(
x
,
c
)
=>
c
.
copy
(
inputJson
=
x
)
}
text
"Input json file"
opt
[
File
](
'o'
,
"outputHdf5"
)
required
()
maxOccurs
1
valueName
"<file>"
action
{
(
x
,
c
)
=>
c
.
copy
(
outputHdf5
=
x
)
}
text
"Output hdf5 file"
}
def
main
(
args
:
Array
[
String
])
:
Unit
=
{
val
argsParser
=
new
OptParser
val
cmdArgs
=
argsParser
.
parse
(
args
,
Args
())
getOrElse
(
throw
new
IllegalArgumentException
)
val
jsonMap
=
ConfigUtils
.
fileToConfigMap
(
cmdArgs
.
inputJson
)
val
hdf5
=
new
H5File
(
cmdArgs
.
outputHdf5
.
getAbsolutePath
)
}
}
biopet-utils/pom.xml
View file @
e34fe3a1
...
...
@@ -30,6 +30,11 @@
<packaging>
jar
</packaging>
<dependencies>
<dependency>
<groupId>
org.hdfgroup
</groupId>
<artifactId>
hdf-java
</artifactId>
<version>
2.6.1
</version>
</dependency>
<dependency>
<groupId>
colt
</groupId>
<artifactId>
colt
</artifactId>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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