Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biopet.biopet
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Mirrors
biopet.biopet
Commits
6778ef3c
Commit
6778ef3c
authored
Jul 28, 2017
by
Peter van 't Hof
Committed by
GitHub
Jul 28, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #168 from biopet/fix-BIOPET-757
Adding a tool to merge jobreports
parents
0ef2b27c
8f6baa78
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
1 deletion
+53
-1
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/jobreport/MergeQueueJobReports.scala
...umc/sasc/biopet/core/jobreport/MergeQueueJobReports.scala
+50
-0
biopet-package/src/main/scala/nl/lumc/sasc/biopet/BiopetExecutableMain.scala
...main/scala/nl/lumc/sasc/biopet/BiopetExecutableMain.scala
+3
-1
No files found.
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/jobreport/MergeQueueJobReports.scala
0 → 100644
View file @
6778ef3c
package
nl.lumc.sasc.biopet.core.jobreport
import
java.io.
{
File
,
PrintStream
}
import
nl.lumc.sasc.biopet.utils.
{
AbstractOptParser
,
ToolCommand
}
import
org.broadinstitute.gatk.utils.report.GATKReport
import
scala.collection.JavaConversions._
/**
* Created by pjvanthof on 25/07/2017.
*/
object
MergeQueueJobReports
extends
ToolCommand
{
case
class
Args
(
inputFiles
:
List
[
File
]
=
Nil
,
outputfile
:
File
=
null
)
class
OptParser
extends
AbstractOptParser
[
Args
](
commandName
)
{
opt
[
File
](
'I'
,
"inputFile"
)
unbounded
()
required
()
valueName
"<file>"
action
{
(
x
,
c
)
=>
c
.
copy
(
inputFiles
=
x
::
c
.
inputFiles
)
}
text
"Output directory of the pipeline"
opt
[
File
](
'o'
,
"outputFile"
)
unbounded
()
required
()
maxOccurs
1
valueName
"<file>"
action
{
(
x
,
c
)
=>
c
.
copy
(
outputfile
=
x
)
}
text
"Output directory of this tool"
}
def
main
(
args
:
Array
[
String
])
:
Unit
=
{
logger
.
info
(
"Start"
)
val
argsParser
=
new
OptParser
val
cmdArgs
:
Args
=
argsParser
.
parse
(
args
,
Args
())
getOrElse
(
throw
new
IllegalArgumentException
)
val
newReport
=
new
GATKReport
val
reports
=
cmdArgs
.
inputFiles
.
map
(
new
GATKReport
(
_
))
val
tableNames
=
reports
.
flatMap
(
_
.
getTables
.
map
(
_
.
getTableName
)).
distinct
for
(
name
<-
tableNames
;
report
<-
reports
if
report
.
hasTable
(
name
))
{
val
table
=
report
.
getTable
(
name
)
if
(
newReport
.
hasTable
(
name
))
newReport
.
getTable
(
name
).
concat
(
table
)
else
newReport
.
addTable
(
table
)
}
val
writer
=
new
PrintStream
(
cmdArgs
.
outputfile
)
newReport
.
print
(
writer
)
writer
.
close
()
logger
.
info
(
"Done"
)
}
}
biopet-package/src/main/scala/nl/lumc/sasc/biopet/BiopetExecutableMain.scala
View file @
6778ef3c
...
...
@@ -14,6 +14,7 @@
*/
package
nl.lumc.sasc.biopet
import
nl.lumc.sasc.biopet.core.jobreport.MergeQueueJobReports
import
nl.lumc.sasc.biopet.core.pipelinestatus.PipelineStatus
import
nl.lumc.sasc.biopet.utils.
{
BiopetExecutable
,
MainCommand
}
...
...
@@ -46,7 +47,8 @@ object BiopetExecutableMain extends BiopetExecutable {
nl
.
lumc
.
sasc
.
biopet
.
pipelines
.
generateindexes
.
ValidateAnnotations
)
def
tools
:
List
[
MainCommand
]
=
PipelineStatus
::
BiopetToolsExecutable
.
tools
def
tools
:
List
[
MainCommand
]
=
MergeQueueJobReports
::
PipelineStatus
::
BiopetToolsExecutable
.
tools
def
templates
:
List
[
MainCommand
]
=
List
(
nl
.
lumc
.
sasc
.
biopet
.
pipelines
.
mapping
.
template
.
MultiSampleMapping
,
...
...
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