Skip to content
GitLab
Menu
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
5c0f52d3
Commit
5c0f52d3
authored
Jan 04, 2016
by
Peter van 't Hof
Browse files
Style fixes
parent
bdadf513
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/Reference.scala
View file @
5c0f52d3
...
...
@@ -18,7 +18,7 @@ package nl.lumc.sasc.biopet.core
import
java.io.File
import
htsjdk.samtools.reference.IndexedFastaSequenceFile
import
nl.lumc.sasc.biopet.core.summary.
{
SummaryQScript
,
Summarizable
}
import
nl.lumc.sasc.biopet.core.summary.
{
SummaryQScript
,
Summarizable
}
import
nl.lumc.sasc.biopet.utils.Logging
import
nl.lumc.sasc.biopet.utils.config.Configurable
...
...
@@ -135,10 +135,10 @@ object Reference {
* @param fastaFile Fasta file
*/
def
requireDict
(
fastaFile
:
File
)
:
Unit
=
{
val
dict
=
new
File
(
fastaFile
.
getAbsolutePath
.
stripSuffix
(
".fna"
)
.
stripSuffix
(
".fa"
)
.
stripSuffix
(
".fasta"
)
+
".dict"
)
val
dict
=
new
File
(
fastaFile
.
getAbsolutePath
.
stripSuffix
(
".fna"
)
.
stripSuffix
(
".fa"
)
.
stripSuffix
(
".fasta"
)
+
".dict"
)
if
(!
checked
.
contains
(
dict
))
{
checked
+=
dict
if
(!
dict
.
exists
())
Logging
.
addError
(
"Reference is missing a dict file"
)
...
...
public/biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/ReferenceTest.scala
View file @
5c0f52d3
...
...
@@ -2,8 +2,8 @@ package nl.lumc.sasc.biopet.core
import
java.nio.file.Paths
import
nl.lumc.sasc.biopet.utils.
{
ConfigUtils
,
Logging
}
import
nl.lumc.sasc.biopet.utils.config.
{
Configurable
,
Config
}
import
nl.lumc.sasc.biopet.utils.
{
ConfigUtils
,
Logging
}
import
nl.lumc.sasc.biopet.utils.config.
{
Configurable
,
Config
}
import
org.scalatest.Matchers
import
org.scalatest.mock.MockitoSugar
import
org.scalatest.testng.TestNGSuite
...
...
@@ -11,8 +11,8 @@ import org.mockito.Mockito._
import
org.testng.annotations.Test
/**
* Created by pjvan_thof on 12/30/15.
*/
* Created by pjvan_thof on 12/30/15.
*/
class
ReferenceTest
extends
TestNGSuite
with
Matchers
with
MockitoSugar
{
import
ReferenceTest._
...
...
@@ -71,7 +71,7 @@ object ReferenceTest {
dict
:
Boolean
=
false
)
=
new
Reference
{
val
root
=
r
override
def
globalConfig
=
new
Config
(
configs
.
foldLeft
(
Map
[
String
,
Any
]())
{
case
(
a
,
b
)
=>
ConfigUtils
.
mergeMaps
(
a
,
b
)
}
)
.
foldLeft
(
Map
[
String
,
Any
]())
{
case
(
a
,
b
)
=>
ConfigUtils
.
mergeMaps
(
a
,
b
)
}
)
override
def
dictRequired
=
if
(
dict
)
true
else
super
.
dictRequired
override
def
faiRequired
=
if
(
fai
)
true
else
super
.
faiRequired
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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