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
9ed130e8
Commit
9ed130e8
authored
Aug 18, 2016
by
bow
Browse files
Merge branch 'fix-toucan_summary' into 'develop'
Fix toucan summary Fix #381 See merge request !443
parents
79b42eea
f5c50326
Changes
5
Hide whitespace changes
Inline
Side-by-side
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictor.scala
View file @
9ed130e8
...
...
@@ -275,12 +275,12 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu
else
Map
()
}
protected
val
removeOnConflict
=
Set
(
"Output_file"
,
"Command_line_options"
,
"Run_time"
,
"Start_time"
,
"End_time"
,
"Input_file_(format)"
,
"Novel_/_existing_variants"
)
protected
val
nonNumber
=
Set
(
"VEP_version_(API)"
,
"Cache/Database"
,
"Species"
)
protected
val
removeOnConflict
=
Set
(
"Output_file"
,
"Run_time"
,
"Start_time"
,
"End_time"
,
"Novel_/_existing_variants"
,
"Input_file_(format)"
)
protected
val
nonNumber
=
Set
(
"VEP_version_(API)"
,
"Cache/Database"
,
"Species"
,
"Command_line_options"
)
override
def
resolveSummaryConflict
(
v1
:
Any
,
v2
:
Any
,
key
:
String
)
:
Any
=
{
if
(
removeOnConflict
.
contains
(
key
))
None
else
if
(
nonNumber
.
contains
(
key
))
v
1
else
if
(
nonNumber
.
contains
(
key
))
v
2
else
{
(
v1
,
v2
)
match
{
case
(
x1
:
Int
,
x2
:
Int
)
=>
x1
+
x2
...
...
@@ -301,9 +301,10 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu
(
for
((
header
,
headerIndex
)
<-
headers
)
yield
{
val
name
=
header
.
stripPrefix
(
"["
).
stripSuffix
(
"]"
)
name
.
replaceAll
(
" "
,
"_"
)
->
(
contents
.
drop
(
headerIndex
+
1
).
takeWhile
(!
isHeader
(
_
)).
m
ap
{
line
=>
name
.
replaceAll
(
" "
,
"_"
)
->
(
contents
.
drop
(
headerIndex
+
1
).
takeWhile
(!
isHeader
(
_
)).
flatM
ap
{
line
=>
val
values
=
line
.
split
(
"\t"
,
2
)
values
.
head
.
replaceAll
(
" "
,
"_"
)
->
tryToParseNumber
(
values
.
last
).
getOrElse
(
0
)
if
(
values
.
last
.
isEmpty
||
values
.
last
==
"-"
)
None
else
Some
(
values
.
head
.
replaceAll
(
" "
,
"_"
)
->
tryToParseNumber
(
values
.
last
).
getOrElse
(
values
.
last
))
}.
toMap
)
}).
toMap
}
...
...
biopet-extensions/src/test/resources/vep.failed.metrics
0 → 100644
View file @
9ed130e8
[VEP run statistics]
VEP version (API) 82 (82)
Cache/Database /usr/local/Genomes/H.Sapiens/GRCh37/annotation/vep/homo_sapiens_merged/81_GRCh37
Species homo_sapiens
Command line options -i /exports/sasc/pjvan_thof/toucan_test/output/chunk/chr17_GL000204_random-0-81310/chr17_GL000204_random-0-81310.vcf.gz -o /exports/sasc/pjvan_thof/toucan_test/output/chunk/chr17_GL000204_random-0-81310/chr17_GL000204_random-0-81310.vep.vcf -v --everything --stats_text --cache --vcf --allow_non_variant --merged --species homo_sapiens --assembly GRCh37 --dir /usr/local/Genomes/H.Sapiens/GRCh37/annotation/vep --fasta /usr/local/Genomes/H.Sapiens/GRCh37/annotation/vep/reference.fa --fork 2 --cache_version 81 --port 3337 --db_version 81 --failed 1
Start time 2016-08-17 13:44:42
End time 2016-08-17 13:44:42
Run time 0 seconds
Input file (format) /exports/sasc/pjvan_thof/toucan_test/output/chunk/chr17_GL000204_random-0-81310/chr17_GL000204_random-0-81310.vcf.gz (VCF)
Output file /exports/sasc/pjvan_thof/toucan_test/output/chunk/chr17_GL000204_random-0-81310/chr17_GL000204_random-0-81310.vep.vcf [text]
[General statistics]
Lines of input read 413
Variants processed
Variants remaining after filtering
Lines of output written
Novel / existing variants -
Overlapped genes
Overlapped transcripts
Overlapped regulatory features -
[Variant classes]
[Consequences (most severe)]
[Consequences (all)]
[Coding consequences]
[SIFT summary]
[PolyPhen summary]
[Variants by chromosome]
[Position in protein]
biopet-extensions/src/test/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictorTest.scala
View file @
9ed130e8
...
...
@@ -17,6 +17,7 @@ package nl.lumc.sasc.biopet.extensions
import
java.io.File
import
java.nio.file.Paths
import
nl.lumc.sasc.biopet.utils.ConfigUtils
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.Test
...
...
@@ -46,4 +47,26 @@ class VariantEffectPredictorTest extends TestNGSuite with Matchers {
}
@Test
def
testFailedSummaryStats
=
{
val
file
=
new
File
(
Paths
.
get
(
getClass
.
getResource
(
"/vep.failed.metrics"
).
toURI
).
toString
)
val
vep
=
new
VariantEffectPredictor
(
null
)
val
stats
=
vep
.
parseStatsFile
(
file
)
}
@Test
def
testMergeFailSuccess
:
Unit
=
{
val
file1
=
new
File
(
Paths
.
get
(
getClass
.
getResource
(
"/vep.metrics"
).
toURI
).
toString
)
val
vep1
=
new
VariantEffectPredictor
(
null
)
val
stats1
=
vep1
.
parseStatsFile
(
file1
)
val
file2
=
new
File
(
Paths
.
get
(
getClass
.
getResource
(
"/vep.failed.metrics"
).
toURI
).
toString
)
val
vep2
=
new
VariantEffectPredictor
(
null
)
val
stats2
=
vep2
.
parseStatsFile
(
file2
)
ConfigUtils
.
mergeMaps
(
stats1
,
stats2
,
vep1
.
resolveSummaryConflict
)
ConfigUtils
.
mergeMaps
(
stats2
,
stats1
,
vep1
.
resolveSummaryConflict
)
}
}
carp/src/main/scala/nl/lumc/sasc/biopet/pipelines/carp/Carp.scala
View file @
9ed130e8
...
...
@@ -46,7 +46,7 @@ class Carp(val root: Configurable) extends QScript with MultisampleMappingTrait
"samtoolsview"
->
Map
(
"q"
->
10
)
)
override
def
fixedValues
=
Map
(
override
def
fixedValues
=
super
.
fixedValues
++
Map
(
"samtoolsview"
->
Map
(
"h"
->
true
,
"b"
->
true
...
...
mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMapping.scala
View file @
9ed130e8
...
...
@@ -67,6 +67,8 @@ trait MultisampleMappingTrait extends MultiSampleQScript
override
def
defaults
=
super
.
defaults
++
Map
(
"reordersam"
->
Map
(
"allow_incomplete_dict_concordance"
->
true
))
override
def
fixedValues
:
Map
[
String
,
Any
]
=
super
.
fixedValues
++
Map
(
"gearssingle"
->
Map
(
"skip_flexiprep"
->
true
))
/** In a default multisample mapping run there are no multsample jobs. This method can be overriden by other pipelines */
def
addMultiSampleJobs
()
:
Unit
=
{
// this code will be executed after all code of all samples is executed
...
...
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