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
0ed7ca34
Commit
0ed7ca34
authored
Sep 09, 2015
by
Peter van 't Hof
Browse files
Simplify method
parent
7d6eb6fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/SeqStat.scala
View file @
0ed7ca34
...
...
@@ -15,7 +15,7 @@
*/
package
nl.lumc.sasc.biopet.tools
import
java.io.
{
PrintWriter
,
File
}
import
java.io.
{
PrintWriter
,
File
}
import
htsjdk.samtools.fastq.
{
FastqReader
,
FastqRecord
}
import
nl.lumc.sasc.biopet.core.config.Configurable
...
...
@@ -117,12 +117,12 @@ object SeqStat extends ToolCommand {
|$commandName - Summarize FastQ
"""
.
stripMargin
)
opt
[
File
](
'i'
,
"fastq"
)
required
()
unbounded
()
valueName
"<fastq>"
action
{
(
x
,
c
)
=>
opt
[
File
](
'i'
,
"fastq"
)
required
()
unbounded
()
valueName
"<fastq>"
action
{
(
x
,
c
)
=>
c
.
copy
(
fastq
=
x
)
}
validate
{
x
=>
if
(
x
.
exists
)
success
else
failure
(
"FASTQ file not found"
)
}
text
"FastQ file to generate stats from"
opt
[
File
](
'o'
,
"output"
)
unbounded
()
valueName
"<json>"
action
{
(
x
,
c
)
=>
opt
[
File
](
'o'
,
"output"
)
unbounded
()
valueName
"<json>"
action
{
(
x
,
c
)
=>
c
.
copy
(
fastq
=
x
)
}
text
"File to write output to, if not supplied output go to stdout"
}
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/VcfUtils.scala
View file @
0ed7ca34
...
...
@@ -73,24 +73,11 @@ object VcfUtils {
out
}
//TODO: Add genotype comparing to this function
def
identicalVariantContext
(
var1
:
VariantContext
,
var2
:
VariantContext
)
:
Boolean
=
{
if
(
var1
.
getContig
!=
var2
.
getContig
)
{
false
}
if
(
var1
.
getStart
!=
var2
.
getStart
)
{
false
}
if
(
var1
.
getEnd
!=
var2
.
getEnd
)
{
false
}
if
(!
var1
.
getAttributes
.
forall
(
x
=>
var2
.
hasAttribute
(
x
.
_1
))
||
!
var2
.
getAttributes
.
forall
(
x
=>
var1
.
hasAttribute
(
x
.
_1
)))
{
false
}
if
(!
var1
.
getAttributes
.
forall
(
x
=>
var2
.
getAttribute
(
x
.
_1
)
==
var1
.
getAttribute
(
x
.
_1
))
||
!
var2
.
getAttributes
.
forall
(
x
=>
var1
.
getAttribute
(
x
.
_1
)
==
var2
.
getAttribute
(
x
.
_1
)))
{
false
}
true
var1
.
getContig
==
var2
.
getContig
&&
var1
.
getStart
==
var2
.
getStart
&&
var1
.
getEnd
==
var2
.
getEnd
&&
var1
.
getAttributes
==
var2
.
getAttributes
}
}
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