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
19323af6
Commit
19323af6
authored
Jan 19, 2016
by
Wai Yi Leung
Browse files
Merge branch 'fix-259' into 'develop'
Fixed error message in bamutils Fixes #259 See merge request !311
parents
ac55539b
a13b0d1d
Changes
3
Hide whitespace changes
Inline
Side-by-side
public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/Mpileup2cns.scala
View file @
19323af6
...
...
@@ -39,6 +39,8 @@ class Mpileup2cns(val root: Configurable) extends Varscan {
var
vcfSampleList
:
Option
[
File
]
=
config
(
"vcf_sample_list"
)
var
variants
:
Option
[
Int
]
=
config
(
"variants"
)
override
def
defaultCoreMemory
=
6.0
override
def
beforeGraph
()
:
Unit
=
{
val
validValues
:
Set
[
Int
]
=
Set
(
0
,
1
)
// check for boolean vars that are passed as ints
...
...
public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/varscan/Varscan.scala
View file @
19323af6
...
...
@@ -15,20 +15,15 @@
*/
package
nl.lumc.sasc.biopet.extensions.varscan
import
nl.lumc.sasc.biopet.core.BiopetJavaCommandLineFunction
import
nl.lumc.sasc.biopet.core.
{
Version
,
BiopetJavaCommandLineFunction
}
abstract
class
Varscan
extends
BiopetJavaCommandLineFunction
{
abstract
class
Varscan
extends
BiopetJavaCommandLineFunction
with
Version
{
override
def
subPath
=
"varscan"
::
super
.
subPath
jarFile
=
config
(
"varscan_jar"
)
/**
* TODO: test version
* override def versionCommand = super.commandLine
* override val versionRegex = """VarScan v(.*)""".r
*/
override
def
defaultCoreMemory
=
5.0
def
versionCommand
=
super
.
commandLine
def
versionRegex
=
"""VarScan v(.*)"""
.
r
}
public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/BamUtils.scala
View file @
19323af6
...
...
@@ -25,7 +25,8 @@ object BamUtils {
val
inputSam
=
SamReaderFactory
.
makeDefault
.
open
(
file
)
val
samples
=
inputSam
.
getFileHeader
.
getReadGroups
.
map
(
_
.
getSample
).
distinct
if
(
samples
.
size
==
1
)
samples
.
head
->
file
else
throw
new
IllegalArgumentException
(
"Bam contains multiple sample IDs: "
+
file
)
else
if
(
samples
.
size
>
1
)
throw
new
IllegalArgumentException
(
"Bam contains multiple sample IDs: "
+
file
)
else
throw
new
IllegalArgumentException
(
"Bam does not contain sample ID or have no readgroups defined: "
+
file
)
}
if
(
temp
.
map
(
_
.
_1
).
distinct
.
size
!=
temp
.
size
)
throw
new
IllegalArgumentException
(
"Samples has been found twice"
)
temp
.
toMap
...
...
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