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
dd9036c8
Commit
dd9036c8
authored
Apr 27, 2016
by
Peter van 't Hof
Browse files
Added method to get vcf index file
parent
c640dc87
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/VcfUtils.scala
View file @
dd9036c8
...
...
@@ -127,4 +127,11 @@ object VcfUtils {
def
hasMinGenomeQuality
(
gt
:
Genotype
,
minGQ
:
Int
)
:
Boolean
=
{
gt
.
hasGQ
&&
gt
.
getGQ
>=
minGQ
}
def
getVcfIndexFile
(
vcfFile
:
File
)
:
File
=
{
val
name
=
vcfFile
.
getAbsolutePath
if
(
name
.
endsWith
(
".vcf"
))
new
File
(
name
+
".idx"
)
else
if
(
name
.
endsWith
(
".vcf.gz"
))
new
File
(
name
+
".tbi"
)
else
throw
new
IllegalArgumentException
(
s
"File given is no vcf file: $vcfFile"
)
}
}
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