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
b8b57869
Commit
b8b57869
authored
May 11, 2015
by
Peter van 't Hof
Browse files
Added resToDom option
parent
c538587a
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/VcfFilter.scala
View file @
b8b57869
...
...
@@ -74,6 +74,7 @@ object VcfFilter extends ToolCommand {
mustHaveVariant
:
List
[
String
]
=
Nil
,
calledIn
:
List
[
String
]
=
Nil
,
deNovoInSample
:
String
=
null
,
resToDom
:
List
[
Trio
]
=
Nil
,
deNovoTrio
:
List
[
Trio
]
=
Nil
,
trioLossOfHet
:
List
[
Trio
]
=
Nil
,
diffGenotype
:
List
[(
String
,
String
)]
=
Nil
,
...
...
@@ -107,6 +108,9 @@ object VcfFilter extends ToolCommand {
opt
[
Int
](
"minBamAlternateDepth"
)
unbounded
()
valueName
(
"<int>"
)
action
{
(
x
,
c
)
=>
c
.
copy
(
minBamAlternateDepth
=
x
)
}
// TODO: Convert this to more generic filter
opt
[
String
](
"resToDom"
)
unbounded
()
valueName
(
"<child:father:mother>"
)
action
{
(
x
,
c
)
=>
c
.
copy
(
resToDom
=
new
Trio
(
x
)
::
c
.
resToDom
)
}
text
(
"Only show variants that contain unique alleles in complete set for given sample"
)
opt
[
String
](
"deNovoInSample"
)
maxOccurs
(
1
)
unbounded
()
valueName
(
"<sample>"
)
action
{
(
x
,
c
)
=>
c
.
copy
(
deNovoInSample
=
x
)
}
text
(
"Only show variants that contain unique alleles in complete set for given sample"
)
...
...
@@ -190,6 +194,7 @@ object VcfFilter extends ToolCommand {
denovoInSample
(
record
)
&&
denovoTrio
(
record
,
commandArgs
.
deNovoTrio
)
&&
denovoTrio
(
record
,
commandArgs
.
trioLossOfHet
,
true
)
&&
resToDom
(
record
,
commandArgs
.
resToDom
)
&&
inIdSet
(
record
))
{
writer
.
add
(
record
)
counterLeft
+=
1
...
...
@@ -301,6 +306,18 @@ object VcfFilter extends ToolCommand {
return
true
}
def
resToDom
(
record
:
VariantContext
,
trios
:
List
[
Trio
])
:
Boolean
=
{
for
(
trio
<-
trios
)
{
val
child
=
record
.
getGenotype
(
trio
.
child
)
if
(
child
.
isHomVar
&&
child
.
getAlleles
.
forall
(
allele
=>
{
record
.
getGenotype
(
trio
.
father
).
countAllele
(
allele
)
==
1
&&
record
.
getGenotype
(
trio
.
mother
).
countAllele
(
allele
)
==
1
}))
return
true
}
return
trios
.
isEmpty
}
def
denovoTrio
(
record
:
VariantContext
,
trios
:
List
[
Trio
],
onlyLossHet
:
Boolean
=
false
)
:
Boolean
=
{
for
(
trio
<-
trios
)
{
val
child
=
record
.
getGenotype
(
trio
.
child
)
...
...
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