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
674e3168
Commit
674e3168
authored
9 years ago
by
Wai Yi Leung
Browse files
Options
Downloads
Patches
Plain Diff
Style refactor of PindelCaller wrapper
parent
225b0cae
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-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelCaller.scala
+64
-61
64 additions, 61 deletions
.../nl/lumc/sasc/biopet/extensions/pindel/PindelCaller.scala
with
64 additions
and
61 deletions
public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelCaller.scala
+
64
−
61
View file @
674e3168
...
...
@@ -34,48 +34,49 @@ class PindelCaller(val root: Configurable) extends BiopetCommandLineFunction wit
override
def
defaultCoreMemory
=
4.0
override
def
defaultThreads
=
4
override
def
versionRegex
=
"""Pindel version:? (.*)"""
.
r
def
versionRegex
=
"""Pindel version:? (.*)"""
.
r
override
def
versionExitcode
=
List
(
1
)
override
def
versionCommand
=
executable
def
versionCommand
=
executable
/**
* Required parameters
*/
@Input
var
reference
:
File
=
referenceFasta
@Input
(
doc
=
"Input specification for Pindel to use"
)
var
input
:
File
=
_
@Argument
(
doc
=
"The pindel configuration file"
,
required
=
false
)
var
pindel
_f
ile
:
Option
[
File
]
=
None
var
pindel
F
ile
:
Option
[
File
]
=
None
@Argument
(
doc
=
"Configuration file with: bam-location/insert size/name"
,
required
=
false
)
var
config
_f
ile
:
Option
[
File
]
=
None
var
config
F
ile
:
Option
[
File
]
=
None
@Argument
(
doc
=
"Work directory"
)
var
output
_p
refix
:
File
=
_
var
output
P
refix
:
File
=
_
@Output
(
doc
=
"Output file of pindel, pointing to the DEL file"
)
var
output
_f
ile
:
File
=
_
var
output
F
ile
:
File
=
_
var
RP
:
Option
[
Int
]
=
config
(
"RP"
)
var
min
_d
istance
_to_the_e
nd
:
Option
[
Int
]
=
config
(
"min_distance_to_the_end"
)
var
min
D
istance
ToTheE
nd
:
Option
[
Int
]
=
config
(
"min_distance_to_the_end"
)
// var threads
var
max
_r
ange
_i
ndex
:
Option
[
Int
]
=
config
(
"max_range_index"
)
var
window
_s
ize
:
Option
[
Int
]
=
config
(
"window_size"
)
var
sequencing
_e
rror
_r
ate
:
Option
[
Float
]
=
config
(
"sequencing_error_rate"
)
var
max
R
ange
I
ndex
:
Option
[
Int
]
=
config
(
"max_range_index"
)
var
window
S
ize
:
Option
[
Int
]
=
config
(
"window_size"
)
var
sequencing
E
rror
R
ate
:
Option
[
Float
]
=
config
(
"sequencing_error_rate"
)
var
sensitivity
:
Option
[
Float
]
=
config
(
"sensitivity"
)
var
maximum
_a
llowed
_m
ismatch
_r
ate
:
Option
[
Float
]
=
config
(
"maximum_allowed_mismatch_rate"
)
var
maximum
A
llowed
M
ismatch
R
ate
:
Option
[
Float
]
=
config
(
"maximum_allowed_mismatch_rate"
)
var
nm
:
Option
[
Int
]
=
config
(
"nm"
)
var
report
_i
nversions
:
Boolean
=
config
(
"report_inversions"
,
default
=
false
)
var
report
_d
uplications
:
Boolean
=
config
(
"report_duplications"
,
default
=
false
)
var
report
_l
ong
_i
nsertions
:
Boolean
=
config
(
"report_long_insertions"
,
default
=
false
)
var
report
_b
reakpoints
:
Boolean
=
config
(
"report_breakpoints"
,
default
=
false
)
var
report
_c
lose
_m
apped
_r
eads
:
Boolean
=
config
(
"report_close_mapped_reads"
,
default
=
false
)
var
report
_o
nly
_c
lose
_m
apped
_r
eads
:
Boolean
=
config
(
"report_only_close_mapped_reads"
,
default
=
false
)
var
report
_i
nterchromosomal
_e
vents
:
Boolean
=
config
(
"report_interchromosomal_events"
,
default
=
false
)
var
report
I
nversions
:
Boolean
=
config
(
"report_inversions"
,
default
=
false
)
var
report
D
uplications
:
Boolean
=
config
(
"report_duplications"
,
default
=
false
)
var
report
L
ong
I
nsertions
:
Boolean
=
config
(
"report_long_insertions"
,
default
=
false
)
var
report
B
reakpoints
:
Boolean
=
config
(
"report_breakpoints"
,
default
=
false
)
var
report
C
lose
M
apped
R
eads
:
Boolean
=
config
(
"report_close_mapped_reads"
,
default
=
false
)
var
report
O
nly
C
lose
M
apped
R
eads
:
Boolean
=
config
(
"report_only_close_mapped_reads"
,
default
=
false
)
var
report
I
nterchromosomal
E
vents
:
Boolean
=
config
(
"report_interchromosomal_events"
,
default
=
false
)
var
IndelCorrection
:
Boolean
=
config
(
"IndelCorrection"
,
default
=
false
)
var
NormalSamples
:
Boolean
=
config
(
"NormalSamples"
,
default
=
false
)
...
...
@@ -84,21 +85,21 @@ class PindelCaller(val root: Configurable) extends BiopetCommandLineFunction wit
var
include
:
Option
[
File
]
=
config
(
"include"
)
var
exclude
:
Option
[
File
]
=
config
(
"exclude"
)
var
additional
_m
ismatch
:
Option
[
Int
]
=
config
(
"additional_mismatch"
)
var
min
_p
erfect
_m
atch
_a
round
_
BP
:
Option
[
Int
]
=
config
(
"min_perfect_match_around_BP"
)
var
min
_i
nversion
_s
ize
:
Option
[
Int
]
=
config
(
"min_inversion_size"
)
var
min
_num_m
atched
_b
ases
:
Option
[
Int
]
=
config
(
"min_num_matched_bases"
)
var
balance
_c
utoff
:
Option
[
Int
]
=
config
(
"balance_cutoff"
)
var
anchor
_q
uality
:
Option
[
Int
]
=
config
(
"anchor_quality"
)
var
minimum
_s
upport
_for_e
vent
:
Option
[
Int
]
=
config
(
"minimum_support_for_event"
)
var
input
_
SV
_
Calls
_for_a
ssembly
:
Option
[
File
]
=
config
(
"input_SV_Calls_for_assembly"
)
var
additional
M
ismatch
:
Option
[
Int
]
=
config
(
"additional_mismatch"
)
var
min
P
erfect
M
atch
A
roundBP
:
Option
[
Int
]
=
config
(
"min_perfect_match_around_BP"
)
var
min
I
nversion
S
ize
:
Option
[
Int
]
=
config
(
"min_inversion_size"
)
var
min
NumM
atched
B
ases
:
Option
[
Int
]
=
config
(
"min_num_matched_bases"
)
var
balance
C
utoff
:
Option
[
Int
]
=
config
(
"balance_cutoff"
)
var
anchor
Q
uality
:
Option
[
Int
]
=
config
(
"anchor_quality"
)
var
minimum
S
upport
ForE
vent
:
Option
[
Int
]
=
config
(
"minimum_support_for_event"
)
var
inputSVCalls
ForA
ssembly
:
Option
[
File
]
=
config
(
"input_SV_Calls_for_assembly"
)
var
genotyping
:
Boolean
=
config
(
"genotyping"
,
default
=
false
)
var
output
_of_b
reakdancer
_e
vents
:
Option
[
File
]
=
config
(
"output_of_breakdancer_events"
)
var
name
_of_l
ogfile
:
Option
[
File
]
=
config
(
"name_of_logfile"
)
var
output
OfB
reakdancer
E
vents
:
Option
[
File
]
=
config
(
"output_of_breakdancer_events"
)
var
name
OfL
ogfile
:
Option
[
File
]
=
config
(
"name_of_logfile"
)
var
P
loidy
:
Option
[
File
]
=
config
(
"ploidy"
)
var
detect
_
DD
:
Boolean
=
config
(
"detect_DD"
,
default
=
false
)
var
p
loidy
:
Option
[
File
]
=
config
(
"ploidy"
)
var
detectDD
:
Boolean
=
config
(
"detect_DD"
,
default
=
false
)
var
MAX_DD_BREAKPOINT_DISTANCE
:
Option
[
Int
]
=
config
(
"MAX_DD_BREAKPOINT_DISTANCE"
)
var
MAX_DISTANCE_CLUSTER_READS
:
Option
[
Int
]
=
config
(
"MAX_DISTANCE_CLUSTER_READS"
)
...
...
@@ -108,9 +109,11 @@ class PindelCaller(val root: Configurable) extends BiopetCommandLineFunction wit
var
DD_REPORT_DUPLICATION_READS
:
Option
[
Int
]
=
config
(
"DD_REPORT_DUPLICATION_READS"
)
override
def
beforeGraph
:
Unit
=
{
if
(
reference
==
null
)
reference
=
referenceFasta
()
// we should check whether the `pindel-config-file` is set or the `config-file` for the bam-list
// at least one of them should be set.
(
pindel
_f
ile
,
config
_f
ile
)
match
{
(
pindel
F
ile
,
config
F
ile
)
match
{
case
(
None
,
None
)
=>
Logging
.
addError
(
"No pindel config is given"
)
case
(
Some
(
a
),
Some
(
b
))
=>
Logging
.
addError
(
s
"Please specify either a pindel config or bam-config. Not both for Pindel: $a or $b"
)
case
(
Some
(
a
),
None
)
=>
{
...
...
@@ -125,48 +128,48 @@ class PindelCaller(val root: Configurable) extends BiopetCommandLineFunction wit
// set the output file, the DELetion call is always made
// TODO: add more outputs for the LI, SI, INV etc...
output
_f
ile
=
new
File
(
output
_p
refix
+
File
.
separator
,
"sample_D"
)
output
F
ile
=
new
File
(
output
P
refix
+
File
.
separator
,
"sample_D"
)
}
def
cmdLine
=
required
(
executable
)
+
required
(
"--fasta "
,
reference
)
+
optional
(
"--pindel-config-file"
,
pindel
_f
ile
)
+
optional
(
"--config-file"
,
config
_f
ile
)
+
required
(
"--output-prefix "
,
new
File
(
output
_p
refix
+
File
.
separator
,
"sample"
))
+
optional
(
"--pindel-config-file"
,
pindel
F
ile
)
+
optional
(
"--config-file"
,
config
F
ile
)
+
required
(
"--output-prefix "
,
new
File
(
output
P
refix
+
File
.
separator
,
"sample"
))
+
optional
(
"--RP"
,
RP
)
+
optional
(
"--min_distance_to_the_end"
,
min
_d
istance
_to_the_e
nd
)
+
optional
(
"--min_distance_to_the_end"
,
min
D
istance
ToTheE
nd
)
+
optional
(
"--number_of_threads"
,
threads
)
+
optional
(
"--max_range_index"
,
max
_r
ange
_i
ndex
)
+
optional
(
"--windows_size"
,
window
_s
ize
)
+
optional
(
"--sequencing_error_rate"
,
sequencing
_e
rror
_r
ate
)
+
optional
(
"--max_range_index"
,
max
R
ange
I
ndex
)
+
optional
(
"--windows_size"
,
window
S
ize
)
+
optional
(
"--sequencing_error_rate"
,
sequencing
E
rror
R
ate
)
+
optional
(
"--sensitivity"
,
sensitivity
)
+
optional
(
"--maximum_allowed_mismatch_rate"
,
maximum
_a
llowed
_m
ismatch
_r
ate
)
+
optional
(
"--maximum_allowed_mismatch_rate"
,
maximum
A
llowed
M
ismatch
R
ate
)
+
optional
(
"--NM"
,
nm
)
+
conditional
(
report
_i
nversions
,
"--report_inversions"
)
+
conditional
(
report
_d
uplications
,
"--report_duplications"
)
+
conditional
(
report
_l
ong
_i
nsertions
,
"--report_long_insertions"
)
+
conditional
(
report
_b
reakpoints
,
"--report_breakpoints"
)
+
conditional
(
report
_c
lose
_m
apped
_r
eads
,
"--report_close_mapped_reads"
)
+
conditional
(
report
_o
nly
_c
lose
_m
apped
_r
eads
,
"--report_only_close_mapped_reads"
)
+
conditional
(
report
_i
nterchromosomal
_e
vents
,
"--report_interchromosomal_events"
)
+
conditional
(
report
I
nversions
,
"--report_inversions"
)
+
conditional
(
report
D
uplications
,
"--report_duplications"
)
+
conditional
(
report
L
ong
I
nsertions
,
"--report_long_insertions"
)
+
conditional
(
report
B
reakpoints
,
"--report_breakpoints"
)
+
conditional
(
report
C
lose
M
apped
R
eads
,
"--report_close_mapped_reads"
)
+
conditional
(
report
O
nly
C
lose
M
apped
R
eads
,
"--report_only_close_mapped_reads"
)
+
conditional
(
report
I
nterchromosomal
E
vents
,
"--report_interchromosomal_events"
)
+
conditional
(
IndelCorrection
,
"--IndelCorrection"
)
+
conditional
(
NormalSamples
,
"--NormalSamples"
)
+
optional
(
"--breakdancer"
,
breakdancer
)
+
optional
(
"--include"
,
include
)
+
optional
(
"--exclude"
,
exclude
)
+
optional
(
"--additional_mismatch"
,
additional
_m
ismatch
)
+
optional
(
"--min_perfect_match_around_BP"
,
min
_p
erfect
_m
atch
_a
round
_
BP
)
+
optional
(
"--min_inversion_size"
,
min
_i
nversion
_s
ize
)
+
optional
(
"--min_num_matched_bases"
,
min
_num_m
atched
_b
ases
)
+
optional
(
"--balance_cutoff"
,
balance
_c
utoff
)
+
optional
(
"--anchor_quality"
,
anchor
_q
uality
)
+
optional
(
"--minimum_support_for_event"
,
minimum
_s
upport
_for_e
vent
)
+
optional
(
"--input_SV_Calls_for_assembly"
,
input
_
SV
_
Calls
_for_a
ssembly
)
+
optional
(
"--additional_mismatch"
,
additional
M
ismatch
)
+
optional
(
"--min_perfect_match_around_BP"
,
min
P
erfect
M
atch
A
roundBP
)
+
optional
(
"--min_inversion_size"
,
min
I
nversion
S
ize
)
+
optional
(
"--min_num_matched_bases"
,
min
NumM
atched
B
ases
)
+
optional
(
"--balance_cutoff"
,
balance
C
utoff
)
+
optional
(
"--anchor_quality"
,
anchor
Q
uality
)
+
optional
(
"--minimum_support_for_event"
,
minimum
S
upport
ForE
vent
)
+
optional
(
"--input_SV_Calls_for_assembly"
,
inputSVCalls
ForA
ssembly
)
+
conditional
(
genotyping
,
"-g"
)
+
optional
(
"--output_of_breakdancer_events"
,
output
_of_b
reakdancer
_e
vents
)
+
optional
(
"--name_of_logfile"
,
name
_of_l
ogfile
)
+
optional
(
"--Ploidy"
,
P
loidy
)
+
conditional
(
detect
_
DD
,
"detect_DD"
)
+
optional
(
"--output_of_breakdancer_events"
,
output
OfB
reakdancer
E
vents
)
+
optional
(
"--name_of_logfile"
,
name
OfL
ogfile
)
+
optional
(
"--Ploidy"
,
p
loidy
)
+
conditional
(
detectDD
,
"detect_DD"
)
+
optional
(
"--MAX_DD_BREAKPOINT_DISTANCE"
,
MAX_DD_BREAKPOINT_DISTANCE
)
+
optional
(
"--MAX_DISTANCE_CLUSTER_READS"
,
MAX_DISTANCE_CLUSTER_READS
)
+
optional
(
"--MIN_DD_CLUSTER_SIZE"
,
MIN_DD_CLUSTER_SIZE
)
+
...
...
@@ -178,8 +181,8 @@ class PindelCaller(val root: Configurable) extends BiopetCommandLineFunction wit
object
PindelCaller
{
def
apply
(
root
:
Configurable
,
configFile
:
File
,
outputDir
:
File
)
:
PindelCaller
=
{
val
caller
=
new
PindelCaller
(
root
)
caller
.
config
_f
ile
=
Some
(
configFile
)
caller
.
output
_p
refix
=
outputDir
caller
.
config
F
ile
=
Some
(
configFile
)
caller
.
output
P
refix
=
outputDir
caller
}
}
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