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
9a034f28
Commit
9a034f28
authored
May 09, 2016
by
Peter van 't Hof
Browse files
Style fixes
parent
138ab51a
Changes
5
Hide whitespace changes
Inline
Side-by-side
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictor.scala
View file @
9a034f28
...
...
@@ -18,10 +18,10 @@ package nl.lumc.sasc.biopet.extensions
import
java.io.File
import
nl.lumc.sasc.biopet.core.summary.Summarizable
import
nl.lumc.sasc.biopet.utils.
{
Logging
,
VcfUtils
,
tryToParseNumber
}
import
nl.lumc.sasc.biopet.utils.
{
Logging
,
VcfUtils
,
tryToParseNumber
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.core.
{
BiopetCommandLineFunction
,
Reference
,
Version
}
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
import
nl.lumc.sasc.biopet.core.
{
BiopetCommandLineFunction
,
Reference
,
Version
}
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
}
import
scala.io.Source
...
...
@@ -285,7 +285,7 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu
else
{
(
v1
,
v2
)
match
{
case
(
x1
:
Int
,
x2
:
Int
)
=>
x1
+
x2
case
_
=>
throw
new
IllegalStateException
(
s
"Value are not Int's, unable to sum them up, key: $key, v1: $v1, v2: $v2"
)
case
_
=>
throw
new
IllegalStateException
(
s
"Value are not Int's, unable to sum them up, key: $key, v1: $v1, v2: $v2"
)
}
}
}
...
...
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/CatVariants.scala
View file @
9a034f28
...
...
@@ -2,9 +2,9 @@ package nl.lumc.sasc.biopet.extensions.gatk
import
java.io.File
import
nl.lumc.sasc.biopet.core.
{
BiopetJavaCommandLineFunction
,
Reference
}
import
nl.lumc.sasc.biopet.core.
{
BiopetJavaCommandLineFunction
,
Reference
}
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Argument
,
Gather
,
Input
,
Output
}
import
org.broadinstitute.gatk.utils.commandline.
{
Argument
,
Gather
,
Input
,
Output
}
class
CatVariants
(
val
root
:
Configurable
)
extends
BiopetJavaCommandLineFunction
with
Reference
{
analysisName
=
"CatVariants"
...
...
biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/VepNormalizer.scala
View file @
9a034f28
...
...
@@ -24,7 +24,6 @@ import htsjdk.variant.vcf._
import
nl.lumc.sasc.biopet.utils.ToolCommand
import
scala.collection.JavaConversions._
import
scala.collection.mutable.
{
Map
=>
MMap
}
/**
* This tool parses a VEP annotated VCF into a standard VCF file.
...
...
@@ -59,7 +58,7 @@ object VepNormalizer extends ToolCommand {
val
header
=
reader
.
getFileHeader
val
writer
=
new
AsyncVariantContextWriter
(
new
VariantContextWriterBuilder
().
setOutputFile
(
output
).
setReferenceDictionary
(
header
.
getSequenceDictionary
)
build
())
build
())
if
(
reader
.
iterator
().
hasNext
)
{
logger
.
debug
(
"Checking for CSQ tag"
)
...
...
@@ -97,8 +96,8 @@ object VepNormalizer extends ToolCommand {
/**
* Normalizer
*
* @param reader input VCF VCFFileReader
*
* @param reader input VCF VCFFileReader
* @param writer output VCF AsyncVariantContextWriter
* @param newInfos array of string containing names of new info fields
* @param mode normalizer mode (explode or standard)
...
...
@@ -125,8 +124,8 @@ object VepNormalizer extends ToolCommand {
/**
* Checks whether header has a CSQ tag
*
* @param header VCF header
*
* @param header VCF header
*/
def
csqCheck
(
header
:
VCFHeader
)
=
{
if
(!
header
.
hasInfoLine
(
"CSQ"
))
{
...
...
@@ -139,8 +138,8 @@ object VepNormalizer extends ToolCommand {
* Checks whether version of input VCF is at least 4.0
* VEP is known to cause issues below 4.0
* Throws exception if not
*
* @param header VCFHeader of input VCF
*
* @param header VCFHeader of input VCF
*/
def
versionCheck
(
header
:
VCFHeader
)
=
{
var
format
=
""
...
...
@@ -158,8 +157,8 @@ object VepNormalizer extends ToolCommand {
/**
* Parses the CSQ tag in the header
*
* @param header the VCF header
*
* @param header the VCF header
* @return list of strings with new info fields
*/
def
parseCsq
(
header
:
VCFHeader
)
:
Array
[
String
]
=
{
...
...
@@ -170,8 +169,8 @@ object VepNormalizer extends ToolCommand {
/**
* Explode a single VEP-annotated record to multiple normal records
* Based on the number of annotated transcripts in the CSQ tag
*
* @param record the record as a VariantContext object
*
* @param record the record as a VariantContext object
* @param csqInfos An array with names of new info tags
* @return An array with the new records
*/
...
...
biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/BamUtils.scala
View file @
9a034f28
...
...
@@ -17,8 +17,8 @@ package nl.lumc.sasc.biopet.utils
import
java.io.File
import
htsjdk.samtools.
{
SAMSequenceDictionary
,
SamReader
,
SamReaderFactory
}
import
nl.lumc.sasc.biopet.utils.intervals.
{
BedRecord
,
BedRecordList
}
import
htsjdk.samtools.
{
SAMSequenceDictionary
,
SamReader
,
SamReaderFactory
}
import
nl.lumc.sasc.biopet.utils.intervals.
{
BedRecord
,
BedRecordList
}
import
scala.collection.JavaConversions._
import
scala.collection.mutable
...
...
@@ -146,12 +146,12 @@ object BamUtils {
/** This class will add functionality to [[SAMSequenceDictionary]] */
implicit
class
SamDictCheck
(
samDics
:
SAMSequenceDictionary
)
{
/**
* This method will check if all contig and sizes are the same without looking at the order of the contigs
*
* @throws AssertionError
* @param that Dict to compare to
* @param ignoreOrder When true the order of the contig does not matter
*/
* This method will check if all contig and sizes are the same without looking at the order of the contigs
*
* @throws AssertionError
* @param that Dict to compare to
* @param ignoreOrder When true the order of the contig does not matter
*/
def
assertSameDictionary
(
that
:
SAMSequenceDictionary
,
ignoreOrder
:
Boolean
)
:
Unit
=
{
if
(
ignoreOrder
)
{
assert
(
samDics
.
getReferenceLength
==
that
.
getReferenceLength
)
...
...
toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/Toucan.scala
View file @
9a034f28
...
...
@@ -21,11 +21,11 @@ import htsjdk.samtools.reference.FastaSequenceFile
import
nl.lumc.sasc.biopet.core._
import
nl.lumc.sasc.biopet.core.summary.SummaryQScript
import
nl.lumc.sasc.biopet.extensions.bcftools.BcftoolsView
import
nl.lumc.sasc.biopet.extensions.bedtools.
{
BedtoolsIntersect
,
BedtoolsMerge
}
import
nl.lumc.sasc.biopet.extensions.gatk.
{
CatVariants
,
SelectVariants
}
import
nl.lumc.sasc.biopet.extensions.manwe.
{
ManweAnnotateVcf
,
ManweSamplesImport
}
import
nl.lumc.sasc.biopet.extensions.tools.
{
GvcfToBed
,
VcfWithVcf
,
VepNormalizer
}
import
nl.lumc.sasc.biopet.extensions.
{
Bgzip
,
Ln
,
VariantEffectPredictor
}
import
nl.lumc.sasc.biopet.extensions.bedtools.
{
BedtoolsIntersect
,
BedtoolsMerge
}
import
nl.lumc.sasc.biopet.extensions.gatk.
{
CatVariants
,
SelectVariants
}
import
nl.lumc.sasc.biopet.extensions.manwe.
{
ManweAnnotateVcf
,
ManweSamplesImport
}
import
nl.lumc.sasc.biopet.extensions.tools.
{
GvcfToBed
,
VcfWithVcf
,
VepNormalizer
}
import
nl.lumc.sasc.biopet.extensions.
{
Bgzip
,
Ln
,
VariantEffectPredictor
}
import
nl.lumc.sasc.biopet.utils.VcfUtils
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.utils.intervals.BedRecordList
...
...
@@ -47,9 +47,9 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum
def
outputVcf
:
File
=
(
gonlVcfFile
,
exacVcfFile
)
match
{
case
(
Some
(
_
),
Some
(
_
))
=>
swapExt
(
outputDir
,
inputVcf
,
".vcf.gz"
,
".vep.normalized.gonl.exac.vcf.gz"
)
case
(
Some
(
_
),
_
)
=>
swapExt
(
outputDir
,
inputVcf
,
".vcf.gz"
,
".vep.normalized.gonl.vcf.gz"
)
case
(
_
,
Some
(
_
))
=>
swapExt
(
outputDir
,
inputVcf
,
".vcf.gz"
,
".vep.normalized.exac.vcf.gz"
)
case
_
=>
swapExt
(
outputDir
,
inputVcf
,
".vcf.gz"
,
".vep.normalized.vcf.gz"
)
case
(
Some
(
_
),
_
)
=>
swapExt
(
outputDir
,
inputVcf
,
".vcf.gz"
,
".vep.normalized.gonl.vcf.gz"
)
case
(
_
,
Some
(
_
))
=>
swapExt
(
outputDir
,
inputVcf
,
".vcf.gz"
,
".vep.normalized.exac.vcf.gz"
)
case
_
=>
swapExt
(
outputDir
,
inputVcf
,
".vcf.gz"
,
".vep.normalized.vcf.gz"
)
}
lazy
val
minScatterGenomeSize
:
Long
=
config
(
"min_scatter_genome_size"
,
default
=
75000000
)
...
...
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