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
92fd93df
Commit
92fd93df
authored
10 years ago
by
Wai Yi Leung
Browse files
Options
Downloads
Patches
Plain Diff
Reducing the wrapper to take bam and chrom.sizes file only
parent
faeb9100
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
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVToolsCount.scala
+12
-26
12 additions, 26 deletions
.../lumc/sasc/biopet/extensions/igvtools/IGVToolsCount.scala
with
12 additions
and
26 deletions
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVToolsCount.scala
+
12
−
26
View file @
92fd93df
...
...
@@ -16,8 +16,8 @@ class IGVToolsCount(val root: Configurable) extends IGVTools {
@Input
(
doc
=
"Bam File"
)
var
input
:
File
=
_
@
Argumen
t
(
doc
=
"
G
enome
nam
e"
)
var
genome
Name
:
String
=
config
(
"genomeName"
)
@
Inpu
t
(
doc
=
"
<g
enome
>.chrom.sizes Fil
e"
)
var
genome
ChromSizes
:
File
=
_
@Output
protected
var
tdf
:
File
=
_
...
...
@@ -48,30 +48,14 @@ class IGVToolsCount(val root: Configurable) extends IGVTools {
this
.
tdf
=
new
File
(
input
.
getAbsolutePath
+
".tdf"
)
this
.
wig
=
new
File
(
input
.
getAbsolutePath
.
stripSuffix
(
".bam"
)
+
".wig"
)
// check genome name or File
val
genome
=
new
File
(
genomeName
)
if
(!
genome
.
exists
())
{
// check in the IGVTools genome/directory
val
genomeInDir
=
new
File
(
new
File
(
executable
).
getParent
+
File
.
separator
+
"genomes"
+
File
.
separator
+
genomeName
+
".chrom.sizes"
)
if
(!
genomeInDir
.
exists
())
{
throw
new
FileNotFoundException
(
"genomeName contains a invalid filepath/genomename or not supported by IGVTools"
)
}
else
{
genomeName
=
genomeInDir
.
getAbsolutePath
}
}
else
{
// redefine the genomeName.
genomeName
=
genome
.
getAbsolutePath
}
}
def
cmdLine
=
{
required
(
executable
)
+
required
(
"count"
)
+
optional
(
"-
z
"
,
maxZoom
)
+
optional
(
"-
w
"
,
windowSize
)
+
optional
(
"-
e
"
,
extFactor
)
+
optional
(
"-
-maxZoom
"
,
maxZoom
)
+
optional
(
"-
-windowSize
"
,
windowSize
)
+
optional
(
"-
-extFactor
"
,
extFactor
)
+
optional
(
"--preExtFactor"
,
preExtFactor
)
+
optional
(
"--postExtFactor"
,
postExtFactor
)
+
optional
(
"--windowFunctions"
,
windowFunctions
)
+
...
...
@@ -83,9 +67,13 @@ class IGVToolsCount(val root: Configurable) extends IGVTools {
conditional
(
pairs
,
"--pairs"
)
+
required
(
input
)
+
required
(
outputArg
)
+
required
(
genome
Name
)
required
(
genome
ChromSizes
)
}
/**
* This part should never fail, these values are set within this wrapper
*
*/
private
def
outputArg
:
String
=
{
(
tdf
.
isInstanceOf
[
File
],
wig
.
isInstanceOf
[
File
])
match
{
case
(
false
,
false
)
=>
throw
new
IllegalArgumentException
(
"Either TDF or WIG should be supplied"
);
...
...
@@ -102,16 +90,14 @@ object IGVToolsCount {
* and the `genomename` (hg18,hg19,mm10)
*
* @param input Bamfile to count reads from
* @param genomename Name of path to the genome.chrsizes.bed,
* @return a new IGVToolsCount instance
* @throws FileNotFoundException bam File is not found
* @throws IllegalArgumentException tdf or wig not supplied
*/
def
apply
(
root
:
Configurable
,
input
:
File
,
genomename
:
String
)
:
IGVToolsCount
=
{
def
apply
(
root
:
Configurable
,
input
:
File
,
genomeChromSizes
:
File
)
:
IGVToolsCount
=
{
val
counting
=
new
IGVToolsCount
(
root
)
counting
.
input
=
input
counting
.
genome
Name
=
genomename
counting
.
genome
ChromSizes
=
genomeChromSizes
return
counting
}
}
\ No newline at end of file
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