Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Mirrors
biopet.biopet
Commits
01fbae99
Commit
01fbae99
authored
Jan 06, 2017
by
Sander Bollen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-BIOPET-489' into 'develop'
Fix biopet 489 See merge request !509
parents
4cecab46
4bd9f01e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
19 deletions
+20
-19
bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetrics.scala
...nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetrics.scala
+1
-1
bammetrics/src/test/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetricsTest.scala
...umc/sasc/biopet/pipelines/bammetrics/BamMetricsTest.scala
+1
-1
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/CollectHsMetrics.scala
...lumc/sasc/biopet/extensions/picard/CollectHsMetrics.scala
+5
-5
biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VcfStats.scala
...scala/nl/lumc/sasc/biopet/extensions/tools/VcfStats.scala
+3
-4
gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/impute/Impute2Vcf.scala
...mc/sasc/biopet/pipelines/gwastest/impute/Impute2Vcf.scala
+10
-8
No files found.
bammetrics/src/main/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetrics.scala
View file @
01fbae99
...
...
@@ -136,7 +136,7 @@ class BamMetrics(val root: Configurable) extends QScript
ampBedToInterval
.
isIntermediate
=
true
add
(
ampBedToInterval
)
val
chsMetrics
=
C
alculate
HsMetrics
(
this
,
inputBam
,
val
chsMetrics
=
C
ollect
HsMetrics
(
this
,
inputBam
,
List
(
ampIntervals
),
ampIntervals
::
roiIntervals
.
map
(
_
.
intervals
),
outputDir
)
add
(
chsMetrics
)
addSummarizable
(
chsMetrics
,
"hs_metrics"
)
...
...
bammetrics/src/test/scala/nl/lumc/sasc/biopet/pipelines/bammetrics/BamMetricsTest.scala
View file @
01fbae99
...
...
@@ -75,7 +75,7 @@ class BamMetricsTest extends TestNGSuite with Matchers {
bammetrics
.
functions
.
count
(
_
.
isInstanceOf
[
CollectRnaSeqMetrics
])
shouldBe
(
if
(
rna
)
1
else
0
)
bammetrics
.
functions
.
count
(
_
.
isInstanceOf
[
CollectWgsMetrics
])
shouldBe
(
if
(
wgs
)
1
else
0
)
bammetrics
.
functions
.
count
(
_
.
isInstanceOf
[
CollectMultipleMetrics
])
shouldBe
1
bammetrics
.
functions
.
count
(
_
.
isInstanceOf
[
C
alculate
HsMetrics
])
shouldBe
(
if
(
amplicon
)
1
else
0
)
bammetrics
.
functions
.
count
(
_
.
isInstanceOf
[
C
ollect
HsMetrics
])
shouldBe
(
if
(
amplicon
)
1
else
0
)
bammetrics
.
functions
.
count
(
_
.
isInstanceOf
[
CollectTargetedPcrMetrics
])
shouldBe
(
if
(
amplicon
)
1
else
0
)
bammetrics
.
functions
.
count
(
_
.
isInstanceOf
[
BamStats
])
shouldBe
1
}
...
...
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/C
alculate
HsMetrics.scala
→
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/picard/C
ollect
HsMetrics.scala
View file @
01fbae99
...
...
@@ -22,8 +22,8 @@ import nl.lumc.sasc.biopet.core.summary.Summarizable
import
org.broadinstitute.gatk.utils.commandline.
{
Argument
,
Input
,
Output
}
/** Extension for picard CalculateHsMetrics */
class
C
alculate
HsMetrics
(
val
root
:
Configurable
)
extends
Picard
with
Summarizable
with
Reference
{
javaMainClass
=
new
picard
.
analysis
.
directed
.
C
alculate
HsMetrics
().
getClass
.
getName
class
C
ollect
HsMetrics
(
val
root
:
Configurable
)
extends
Picard
with
Summarizable
with
Reference
{
javaMainClass
=
new
picard
.
analysis
.
directed
.
C
ollect
HsMetrics
().
getClass
.
getName
@Input
(
doc
=
"The input SAM or BAM files to analyze. Must be coordinate sorted."
,
required
=
true
)
var
input
:
File
=
_
...
...
@@ -72,14 +72,14 @@ class CalculateHsMetrics(val root: Configurable) extends Picard with Summarizabl
def
summaryStats
:
Any
=
Picard
.
getMetrics
(
output
).
getOrElse
(
Map
())
}
object
C
alculate
HsMetrics
{
object
C
ollect
HsMetrics
{
/** Returns default CalculateHsMetrics */
def
apply
(
root
:
Configurable
,
input
:
File
,
baitIntervals
:
List
[
File
],
targetIntervals
:
List
[
File
],
outputDir
:
File
)
:
C
alculate
HsMetrics
=
{
val
calculateHsMetrics
=
new
C
alculate
HsMetrics
(
root
)
outputDir
:
File
)
:
C
ollect
HsMetrics
=
{
val
calculateHsMetrics
=
new
C
ollect
HsMetrics
(
root
)
calculateHsMetrics
.
input
=
input
calculateHsMetrics
.
baitIntervals
=
baitIntervals
calculateHsMetrics
.
targetIntervals
=
targetIntervals
...
...
biopet-tools-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/tools/VcfStats.scala
View file @
01fbae99
...
...
@@ -16,11 +16,10 @@ package nl.lumc.sasc.biopet.extensions.tools
import
java.io.File
import
nl.lumc.sasc.biopet.core.summary.
{
Summarizable
,
SummaryQScript
}
import
nl.lumc.sasc.biopet.core.summary.
{
Summarizable
}
import
nl.lumc.sasc.biopet.core.
{
Reference
,
ToolCommandFunction
}
import
nl.lumc.sasc.biopet.tools.vcfstats.VcfStats
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.utils.
{
ConfigUtils
,
tryToParseNumber
}
import
nl.lumc.sasc.biopet.utils.
{
ConfigUtils
}
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
import
scala.io.Source
...
...
@@ -31,7 +30,7 @@ import scala.io.Source
* Created by pjvan_thof on 1/10/15.
*/
class
VcfStats
(
val
root
:
Configurable
)
extends
ToolCommandFunction
with
Summarizable
with
Reference
{
def
toolObject
=
VcfStats
def
toolObject
=
nl
.
lumc
.
sasc
.
biopet
.
tools
.
vcfstats
.
VcfStats
mainFunction
=
false
...
...
gwas-test/src/main/scala/nl/lumc/sasc/biopet/pipelines/gwastest/impute/Impute2Vcf.scala
View file @
01fbae99
...
...
@@ -39,14 +39,16 @@ class Impute2Vcf(val root: Configurable) extends QScript with BiopetQScript with
val
phenotypeFile
:
File
=
config
(
"phenotype_file"
)
val
inputGens
:
List
[
GensInput
]
=
config
(
"input_gens"
,
default
=
Nil
).
asList
.
map
{
case
value
:
Map
[
String
,
Any
]
=>
GensInput
(
new
File
(
value
(
"genotypes"
).
toString
),
value
.
get
(
"info"
).
map
(
x
=>
new
File
(
x
.
toString
)),
value
(
"contig"
).
toString
)
case
value
:
util.LinkedHashMap
[
String
,
_
]
=>
GensInput
(
new
File
(
value
.
get
(
"genotypes"
).
toString
),
value
.
toMap
.
get
(
"info"
).
map
(
x
=>
new
File
(
x
.
toString
)),
value
.
get
(
"contig"
).
toString
)
case
value
:
Map
[
_
,
_
]
=>
val
map
=
value
.
map
(
x
=>
x
.
_1
.
toString
->
x
.
_2
)
GensInput
(
new
File
(
map
(
"genotypes"
).
toString
),
map
.
get
(
"info"
).
map
(
x
=>
new
File
(
x
.
toString
)),
map
(
"contig"
).
toString
)
case
value
:
util.LinkedHashMap
[
_
,
_
]
=>
val
map
=
value
.
map
(
x
=>
x
.
_1
.
toString
->
x
.
_2
)
GensInput
(
new
File
(
map
(
"genotypes"
).
toString
),
map
.
get
(
"info"
).
map
(
x
=>
new
File
(
x
.
toString
)),
map
(
"contig"
).
toString
)
case
_
=>
throw
new
IllegalArgumentException
}
++
(
specsFile
match
{
case
Some
(
file
)
=>
Impute2Vcf
.
imputeSpecsToGensInput
(
file
,
config
(
"validate_specs"
,
default
=
true
))
...
...
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