Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
biopet.biopet
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
biopet.biopet
Commits
d8697889
Commit
d8697889
authored
10 years ago
by
Peter van 't Hof
Browse files
Options
Downloads
Patches
Plain Diff
Fix args
parent
d399bdb3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/BedToInterval.scala
+8
-6
8 additions, 6 deletions
.../main/scala/nl/lumc/sasc/biopet/tools/BedToInterval.scala
with
8 additions
and
6 deletions
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/BedToInterval.scala
+
8
−
6
View file @
d8697889
...
...
@@ -25,7 +25,7 @@ class BedToInterval(val root: Configurable) extends BiopetJavaCommandLineFunctio
override
val
defaultVmem
=
"8G"
memoryLimit
=
Option
(
4.0
)
override
def
commandLine
=
super
.
commandLine
+
required
(
input
)
+
required
(
bamFile
)
+
required
(
output
)
override
def
commandLine
=
super
.
commandLine
+
required
(
"-I"
,
input
)
+
required
(
"-b"
,
bamFile
)
+
required
(
"-o"
,
output
)
}
object
BedToInterval
extends
ToolCommand
{
...
...
@@ -45,13 +45,15 @@ object BedToInterval extends ToolCommand {
return
bedToInterval
}
case
class
Args
(
inputFile
:
File
=
null
,
outputFile
:
File
=
null
)
extends
AbstractArgs
case
class
Args
(
inputFile
:
File
=
null
,
outputFile
:
File
=
null
,
bamFile
:
File
=
null
)
extends
AbstractArgs
class
OptParser
extends
AbstractOptParser
{
opt
[
File
](
'I'
,
"inputFile"
)
required
()
valueName
(
"<file>"
)
action
{
(
x
,
c
)
=>
c
.
copy
(
inputFile
=
x
)
}
text
(
"out is a required file property"
)
c
.
copy
(
inputFile
=
x
)
}
opt
[
File
](
'o'
,
"output"
)
required
()
valueName
(
"<file>"
)
action
{
(
x
,
c
)
=>
c
.
copy
(
outputFile
=
x
)
}
text
(
"out is a required file property"
)
c
.
copy
(
outputFile
=
x
)
}
opt
[
File
](
'b'
,
"bam"
)
required
()
valueName
(
"<file>"
)
action
{
(
x
,
c
)
=>
c
.
copy
(
bamFile
=
x
)
}
}
/**
...
...
@@ -63,7 +65,7 @@ object BedToInterval extends ToolCommand {
val
writer
=
new
PrintWriter
(
commandArgs
.
outputFile
)
val
inputSam
=
new
SAMFileReader
(
commandArgs
.
input
File
)
val
inputSam
=
new
SAMFileReader
(
commandArgs
.
bam
File
)
val
refs
=
for
(
SQ
<-
inputSam
.
getFileHeader
.
getSequenceDictionary
.
getSequences
.
toArray
)
yield
{
val
record
=
SQ
.
asInstanceOf
[
SAMSequenceRecord
]
writer
.
write
(
"@SQ\tSN:"
+
record
.
getSequenceName
+
"\tLN:"
+
record
.
getSequenceLength
+
"\n"
)
...
...
@@ -72,7 +74,7 @@ object BedToInterval extends ToolCommand {
inputSam
.
close
val
refsMap
=
Map
(
refs
:_
*
)
val
bedFile
=
Source
.
fromFile
(
args
(
0
)
)
val
bedFile
=
Source
.
fromFile
(
commandArgs
.
inputFile
)
for
(
line
<-
bedFile
.
getLines
;
val
split
=
line
.
split
(
"\t"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment