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
756c6579
Commit
756c6579
authored
Dec 13, 2016
by
Sander Bollen
Browse files
Some languages updates
parent
622c5c66
Changes
1
Hide whitespace changes
Inline
Side-by-side
biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/ValidateVcf.scala
View file @
756c6579
...
...
@@ -25,7 +25,7 @@ object ValidateVcf extends ToolCommand {
}
text
"Reference fasta to check vcf file against"
opt
[
Unit
](
"disableFail"
)
maxOccurs
1
valueName
"<file>"
action
{
(
x
,
c
)
=>
c
.
copy
(
failOnError
=
false
)
}
text
"D
isable failing,
tool
st
ill st
ops a
t
t
he
first
error but exitcode 0
is given
"
}
text
"D
o not fail on error. The
tool
w
ill st
ill exi
t
w
he
n encountering an
error
,
but
will do so with
exit
code 0"
}
def
main
(
args
:
Array
[
String
])
:
Unit
=
{
...
...
@@ -42,16 +42,16 @@ object ValidateVcf extends ToolCommand {
for
(
record
<-
vcfReader
.
iterator
())
{
val
contig
=
record
.
getContig
require
(
regions
.
chrRecords
.
contains
(
contig
),
s
"contig in vcf file
i
s not
on
reference: ${contig}"
)
s
"
The following
contig in
the
vcf file
doe
s not
exist in the
reference: ${contig}"
)
val
start
=
record
.
getStart
val
end
=
record
.
getEnd
val
contigStart
=
regions
.
chrRecords
(
contig
).
head
.
start
val
contigEnd
=
regions
.
chrRecords
(
contig
).
head
.
end
require
(
start
>=
contigStart
&&
start
<=
contigEnd
,
s
"
P
osition does not exist on reference: ${contig}:$start"
)
s
"
The following p
osition does not exist on reference: ${contig}:$start"
)
if
(
end
!=
start
)
require
(
end
>=
contigStart
&&
end
<=
contigEnd
,
s
"
P
osition does not exist on reference: ${contig}:$end"
)
require
(
start
<=
end
,
"End
is high
er th
e
n
S
tart
, t
his should not be possible"
)
s
"
The following p
osition does not exist on reference: ${contig}:$end"
)
require
(
start
<=
end
,
"End
location of variant is larg
er th
a
n
s
tart
position. T
his should not be possible"
)
}
}
catch
{
case
e
:
IllegalArgumentException
=>
...
...
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