Skip to content
GitLab
Menu
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
ab220766
Commit
ab220766
authored
Jan 05, 2015
by
Wai Yi Leung
Browse files
Adding IGVTools for creation of TDF files (Wiggle for IGV)
parent
5937fdc6
Changes
3
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVTools.scala
0 → 100644
View file @
ab220766
/**
* Created by wyleung on 5-1-15.
*/
package
nl.lumc.sasc.biopet.extensions.igvtools
import
nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
abstract
class
IGVTools
extends
BiopetCommandLineFunction
{
executable
=
config
(
"exe"
,
default
=
"igvtools"
,
submodule
=
"igvtools"
,
freeVar
=
false
)
override
def
versionCommand
=
executable
+
" version"
override
val
versionRegex
=
"""IGV Version: ([\d\.]) .*"""
.
r
override
val
versionExitcode
=
List
(
0
)
}
\ No newline at end of file
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/igvtools/IGVToolsCount.scala
0 → 100644
View file @
ab220766
package
nl.lumc.sasc.biopet.extensions.igvtools
import
nl.lumc.sasc.biopet.core.config.Configurable
import
org.broadinstitute.gatk.utils.commandline.
{
Input
,
Output
,
Argument
}
import
java.io.File
class
IGVToolsCount
(
val
root
:
Configurable
)
extends
IGVTools
{
@Input
(
doc
=
"Bam File"
)
var
input
:
File
=
_
@Argument
(
doc
=
"Genome name"
)
var
genomename
:
String
=
_
@Output
(
doc
=
"output File"
)
var
output
:
File
=
_
def
cmdLine
=
required
(
executable
)
+
required
(
"count"
)
+
required
(
input
)
+
required
(
output
)
+
required
(
genomename
)
}
object
IGVToolsCount
{
def
apply
(
root
:
Configurable
,
input
:
File
,
output
:
File
,
genomename
:
String
)
:
IGVToolsCount
=
{
val
counting
=
new
IGVToolsCount
(
root
)
counting
.
input
=
input
counting
.
output
=
output
counting
.
genomename
=
genomename
return
counting
}
def
apply
(
root
:
Configurable
,
input
:
File
,
genomename
:
String
)
:
IGVToolsCount
=
{
return
apply
(
root
,
input
,
new
File
(
swapExtension
(
input
.
getCanonicalPath
)),
genomename
)
}
private
def
swapExtension
(
inputFile
:
String
)
=
inputFile
+
".tdf"
}
\ No newline at end of file
public/yamsvp/src/main/scala/nl/lumc/sasc/biopet/pipelines/yamsvp/Yamsvp.scala
View file @
ab220766
...
...
@@ -24,6 +24,7 @@ import nl.lumc.sasc.biopet.core.MultiSampleQScript
import
nl.lumc.sasc.biopet.core.PipelineCommand
import
nl.lumc.sasc.biopet.extensions.Ln
import
nl.lumc.sasc.biopet.extensions.igvtools.IGVToolsCount
import
nl.lumc.sasc.biopet.extensions.sambamba.
{
SambambaIndex
,
SambambaMerge
,
SambambaMarkdup
}
import
nl.lumc.sasc.biopet.extensions.svcallers.pindel.Pindel
import
nl.lumc.sasc.biopet.extensions.svcallers.
{
Breakdancer
,
Delly
,
CleverCaller
}
...
...
@@ -91,21 +92,25 @@ class Yamsvp(val root: Configurable) extends QScript with MultiSampleQScript {
val
bamFile
:
File
=
if
(
libraryBamfiles
.
size
==
1
)
{
// When the sample has only 1 run, make a link in the main alignment directory
val
alignmentlink
=
Ln
(
root
,
libraryBamfiles
.
head
,
val
alignmentlink
=
Ln
(
this
,
libraryBamfiles
.
head
,
alignmentDir
+
sampleID
+
".merged.bam"
,
true
)
add
(
alignmentlink
,
isIntermediate
=
true
)
alignmentlink
.
out
}
else
if
(
libraryBamfiles
.
size
>
1
)
{
val
mergeSamFiles
=
new
SambambaMerge
(
root
)
val
mergeSamFiles
=
new
SambambaMerge
(
this
)
mergeSamFiles
.
input
=
libraryBamfiles
mergeSamFiles
.
output
=
alignmentDir
+
sampleID
+
".merged.bam"
add
(
mergeSamFiles
,
isIntermediate
=
true
)
mergeSamFiles
.
output
}
else
null
val
bamMarkDup
=
SambambaMarkdup
(
root
,
bamFile
)
val
bamMarkDup
=
SambambaMarkdup
(
this
,
bamFile
)
add
(
bamMarkDup
)
// create an IGV TDF file
val
tdfCount
=
IGVToolsCount
(
this
,
bamMarkDup
.
output
,
config
(
"genomename"
,
default
=
"hg19"
))
add
(
tdfCount
)
/// bamfile will be used as input for the SV callers. First run Clever
// val cleverVCF : File = sampleDir + "/" + sampleID + ".clever.vcf"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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