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
d5906682
Commit
d5906682
authored
Jan 13, 2015
by
Peter van 't Hof
Browse files
Make prefix required
parent
e77963db
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/PrefixFastq.scala
View file @
d5906682
...
...
@@ -5,7 +5,7 @@ import java.io.File
import
nl.lumc.sasc.biopet.core.
{
BiopetJavaCommandLineFunction
,
ToolCommand
}
import
htsjdk.samtools.fastq.
{
FastqRecord
,
AsyncFastqWriter
,
FastqReader
,
BasicFastqWriter
}
import
nl.lumc.sasc.biopet.core.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Output
,
Input
}
import
org.broadinstitute.gatk.utils.commandline.
{
Argument
,
Output
,
Input
}
import
scala.collection.JavaConversions._
/**
...
...
@@ -17,10 +17,11 @@ class PrefixFastq(val root: Configurable) extends BiopetJavaCommandLineFunction
@Input
(
doc
=
"Input fastq"
,
shortName
=
"I"
,
required
=
true
)
var
inputFastq
:
File
=
_
@Output
(
doc
=
"Output fastq"
,
shortName
=
"o"
,
required
=
fals
e
)
@Output
(
doc
=
"Output fastq"
,
shortName
=
"o"
,
required
=
tru
e
)
var
outputFastq
:
File
=
_
var
prefixSeq
=
config
(
"prefix_seq"
,
default
=
"CATG"
)
@Argument
(
doc
=
"Prefix seq"
,
required
=
true
)
var
prefixSeq
:
String
=
_
override
def
commandLine
=
super
.
commandLine
+
required
(
"-i"
,
inputFastq
)
+
...
...
@@ -36,7 +37,7 @@ object PrefixFastq extends ToolCommand {
return
prefixFastq
}
case
class
Args
(
input
:
File
=
null
,
output
:
File
=
null
,
seq
:
String
=
"CATG"
)
extends
AbstractArgs
case
class
Args
(
input
:
File
=
null
,
output
:
File
=
null
,
seq
:
String
=
null
)
extends
AbstractArgs
class
OptParser
extends
AbstractOptParser
{
opt
[
File
](
'i'
,
"input"
)
required
()
maxOccurs
(
1
)
valueName
(
"<file>"
)
action
{
(
x
,
c
)
=>
...
...
@@ -45,7 +46,7 @@ object PrefixFastq extends ToolCommand {
opt
[
File
](
'o'
,
"output"
)
required
()
maxOccurs
(
1
)
valueName
(
"<file>"
)
action
{
(
x
,
c
)
=>
c
.
copy
(
output
=
x
)
}
opt
[
String
](
's'
,
"seq"
)
maxOccurs
(
1
)
valueName
(
"<prefix seq>"
)
action
{
(
x
,
c
)
=>
opt
[
String
](
's'
,
"seq"
)
required
()
maxOccurs
(
1
)
valueName
(
"<prefix seq>"
)
action
{
(
x
,
c
)
=>
c
.
copy
(
seq
=
x
)
}
}
...
...
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