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
c5d042c6
Commit
c5d042c6
authored
Jul 18, 2017
by
pjvan_thof
Browse files
Adding optional properties file for biopet
parent
4d76382d
Changes
5
Hide whitespace changes
Inline
Side-by-side
biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/vcfstats/VcfStats.scala
View file @
c5d042c6
...
...
@@ -30,7 +30,6 @@ import scala.util.Random
import
scala.concurrent.duration._
import
scala.concurrent.
{
Await
,
Future
}
import
scala.concurrent.ExecutionContext.Implicits.global
import
org.apache.spark.SparkContext
import
org.apache.spark.SparkConf
...
...
@@ -77,8 +76,6 @@ object VcfStats extends ToolCommand {
"Filtered"
,
"Variant"
)
//protected var cmdArgs: Args = _
val
defaultGenotypeFields
=
List
(
"DP"
,
"GQ"
,
"AD"
,
"AD-ref"
,
"AD-alt"
,
"AD-used"
,
"AD-not_used"
,
"general"
)
...
...
@@ -108,7 +105,7 @@ object VcfStats extends ToolCommand {
logger
.
info
(
"Init spark context"
)
val
conf
=
new
SparkConf
()
.
setAppName
(
this
.
getClass
.
getSimple
Name
)
.
setAppName
(
command
Name
)
.
setMaster
(
cmdArgs
.
sparkMaster
.
getOrElse
(
s
"local[${cmdArgs.localThreads}]"
))
val
sparkContext
=
new
SparkContext
(
conf
)
...
...
biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/vcfstats/VcfStatsSpark.scala
View file @
c5d042c6
...
...
@@ -61,7 +61,7 @@ object VcfStatsSpark extends ToolCommand {
.
getURLs
.
map
(
_
.
getFile
)
val
conf
=
new
SparkConf
()
.
setAppName
(
this
.
getClass
.
getSimple
Name
)
.
setAppName
(
command
Name
)
.
setMaster
(
cmdArgs
.
sparkMaster
.
getOrElse
(
s
"local[${cmdArgs.localThreads}]"
))
.
setJars
(
jars
)
val
sc
=
new
SparkContext
(
conf
)
...
...
biopet-tools/src/test/resources/biopet.properties
0 → 100644
View file @
c5d042c6
spark.driver.memory
=
500000000
spark.testing.memory
=
500000000
biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/ToolCommand.scala
View file @
c5d042c6
...
...
@@ -21,6 +21,8 @@ import nl.lumc.sasc.biopet.FullVersion
*/
trait
ToolCommand
extends
MainCommand
with
Logging
{
loadBiopetProperties
()
protected
type
Args
protected
type
OptParser
<:
AbstractOptParser
[
Args
]
}
...
...
biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/package.scala
View file @
c5d042c6
...
...
@@ -114,4 +114,14 @@ package object utils {
case
_
=>
a
.
toString
<
b
.
toString
}
}
def
loadBiopetProperties
()
:
Unit
=
{
val
is
=
getClass
.
getClassLoader
.
getResourceAsStream
(
"biopet.properties"
)
if
(
is
!=
null
)
{
val
prop
=
System
.
getProperties
prop
.
load
(
is
)
System
.
setProperties
(
prop
)
}
}
}
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