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
7bd5c5b1
Commit
7bd5c5b1
authored
Apr 15, 2016
by
Wai Yi Leung
Browse files
Adding descriptive help to the commandline help
parent
17c5de32
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportBuilder.scala
View file @
7bd5c5b1
...
...
@@ -24,6 +24,7 @@ import org.broadinstitute.gatk.utils.commandline.Input
import
org.fusesource.scalate.
{
TemplateEngine
,
TemplateSource
}
import
scala.collection.mutable
import
scala.language.postfixOps
/**
* This trait is meant to make an extension for a report object
...
...
@@ -66,15 +67,28 @@ trait ReportBuilderExtension extends ToolCommandFunction {
trait
ReportBuilder
extends
ToolCommand
{
case
class
Args
(
summary
:
File
=
null
,
outputDir
:
File
=
null
,
pageArgs
:
mutable.Map
[
String
,
Any
]
=
mutable
.
Map
())
extends
AbstractArgs
case
class
Args
(
summary
:
File
=
null
,
outputDir
:
File
=
null
,
pageArgs
:
mutable.Map
[
String
,
Any
]
=
mutable
.
Map
())
extends
AbstractArgs
class
OptParser
extends
AbstractOptParser
{
head
(
s
"""
|$commandName - Generate HTML formatted report from a biopet summary.json
"""
.
stripMargin
)
opt
[
File
](
's'
,
"summary"
)
unbounded
()
required
()
maxOccurs
1
valueName
"<file>"
action
{
(
x
,
c
)
=>
c
.
copy
(
summary
=
x
)
}
}
validate
{
x
=>
if
(
x
.
exists
)
success
else
failure
(
"Summary JSON file not found!"
)
}
text
"Biopet summary JSON file"
opt
[
File
](
'o'
,
"outputDir"
)
unbounded
()
required
()
maxOccurs
1
valueName
"<file>"
action
{
(
x
,
c
)
=>
c
.
copy
(
outputDir
=
x
)
}
}
text
"Output HTML report files to this directory"
opt
[
Map
[
String
,
String
]](
'a'
,
"args"
)
unbounded
()
action
{
(
x
,
c
)
=>
c
.
copy
(
pageArgs
=
c
.
pageArgs
++
x
)
}
...
...
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