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
2ca7263f
Commit
2ca7263f
authored
May 09, 2015
by
Peter van 't Hof
Browse files
Check reference allele to allowed vcf chars
parent
6aa0a3d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/MpileupToVcf.scala
View file @
2ca7263f
...
...
@@ -137,7 +137,12 @@ object MpileupToVcf extends ToolCommand {
writer
.
println
(
"##FORMAT=<ID=ARC,Number=A,Type=Integer,Description=\"Alternetive Reverse Reads\">"
)
writer
.
println
(
"##FORMAT=<ID=GT,Number=1,Type=String,Description=\"Genotype\">"
)
writer
.
println
(
"#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\t"
+
commandArgs
.
sample
)
val
inputStream
=
if
(
commandArgs
.
input
!=
null
)
Source
.
fromFile
(
commandArgs
.
input
).
getLines
else
Source
.
stdin
.
getLines
val
inputStream
=
if
(
commandArgs
.
input
!=
null
)
{
Source
.
fromFile
(
commandArgs
.
input
).
getLines
}
else
{
logger
.
info
(
"No input file as argument, waiting on stdin"
)
Source
.
stdin
.
getLines
}
class
Counts
(
var
forward
:
Int
,
var
reverse
:
Int
)
for
(
line
<-
inputStream
;
...
...
@@ -146,7 +151,11 @@ object MpileupToVcf extends ToolCommand {
)
{
val
chr
=
values
(
0
)
val
pos
=
values
(
1
)
val
ref
=
values
(
2
)
val
ref
=
values
(
2
)
match
{
case
"A"
|
"T"
|
"G"
|
"C"
=>
values
(
2
)
case
"a"
|
"t"
|
"g"
|
"c"
=>
values
(
2
).
toUpperCase
case
_
=>
"N"
}
val
reads
=
values
(
3
).
toInt
val
mpileup
=
values
(
4
)
val
qual
=
values
(
5
)
...
...
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