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
1ee97e08
Commit
1ee97e08
authored
Jun 10, 2015
by
Peter van 't Hof
Browse files
Added picard version to summary
parent
335cc12f
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportBuilder.scala
View file @
1ee97e08
...
...
@@ -2,7 +2,7 @@ package nl.lumc.sasc.biopet.core.report
import
java.io._
import
nl.lumc.sasc.biopet.core.
{
BiopetJavaCommandLineFunction
,
ToolCommand
}
import
nl.lumc.sasc.biopet.core.
{
ToolCommandFuntion
,
BiopetJavaCommandLineFunction
,
ToolCommand
}
import
nl.lumc.sasc.biopet.core.summary.Summary
import
org.broadinstitute.gatk.utils.commandline.Input
import
org.fusesource.scalate.
{
TemplateSource
,
TemplateEngine
}
...
...
@@ -11,7 +11,7 @@ import nl.lumc.sasc.biopet.utils.IoUtils
/**
* Created by pjvan_thof on 3/27/15.
*/
trait
ReportBuilderExtension
extends
BiopetJava
Command
Line
Fun
c
tion
{
trait
ReportBuilderExtension
extends
Tool
CommandFuntion
{
val
builder
:
ReportBuilder
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/Picard.scala
View file @
1ee97e08
...
...
@@ -15,7 +15,7 @@
*/
package
nl.lumc.sasc.biopet.extensions.picard
import
java.io.File
import
java.io.
{
File
Reader
,
File
}
import
scala.io.Source
import
org.broadinstitute.gatk.utils.commandline.Argument
...
...
@@ -63,6 +63,11 @@ abstract class Picard extends BiopetJavaCommandLineFunction {
override
val
defaultCoreMemory
=
3.0
override
def
getVersion
=
{
if
(
jarFile
==
null
)
Picard
.
getBiopetPicardVersion
else
super
.
getVersion
}
override
def
commandLine
=
super
.
commandLine
+
required
(
"TMP_DIR="
+
jobTempDir
)
+
optional
(
"VERBOSITY="
,
verbosity
,
spaceSeparated
=
false
)
+
...
...
@@ -76,6 +81,29 @@ abstract class Picard extends BiopetJavaCommandLineFunction {
object
Picard
extends
Logging
{
lazy
val
getBiopetPicardVersion
:
Option
[
String
]
=
{
val
reader
=
Source
.
fromInputStream
(
getClass
.
getResourceAsStream
(
"/dependency_list.txt"
))
val
dependencies
=
reader
.
getLines
().
map
(
_
.
trim
.
split
(
":"
)).
filter
(
_
.
size
==
5
).
map
(
line
=>
Map
(
"groupId"
->
line
(
0
),
"artifactId"
->
line
(
1
),
"type"
->
line
(
2
),
"version"
->
line
(
3
),
"scope"
->
line
(
4
)
)).
toList
logger
.
debug
(
"dependencies: "
+
dependencies
)
val
htsjdk
=
dependencies
.
find
(
dep
=>
dep
(
"groupId"
)
==
"samtools"
&&
dep
(
"artifactId"
)
==
"htsjdk"
).
collect
{
case
dep
=>
"samtools htsjdk "
+
dep
(
"version"
)
}
dependencies
.
find
(
dep
=>
dep
(
"groupId"
)
==
"picard"
&&
dep
(
"artifactId"
)
==
"picard"
).
collect
{
case
dep
=>
"Picard "
+
dep
(
"version"
)
+
" using "
+
htsjdk
.
getOrElse
(
"unknown htsjdk"
)
}
}
def
getMetrics
(
file
:
File
,
tag
:
String
=
"METRICS CLASS"
,
groupBy
:
Option
[
String
]
=
None
)
:
Option
[
Any
]
=
{
getMetricsContent
(
file
,
tag
)
match
{
...
...
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