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
bbd005c3
Commit
bbd005c3
authored
Jan 28, 2015
by
Peter van 't Hof
Browse files
Renaming values
parent
91e72434
Changes
8
Hide whitespace changes
Inline
Side-by-side
protected/basty/src/main/scala/nl/lumc/sasc/biopet/pipelines/basty/Basty.scala
View file @
bbd005c3
...
...
@@ -34,14 +34,14 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript {
class
Sample
(
sampleId
:
String
)
extends
AbstractSample
(
sampleId
)
{
def
makeLibrary
(
id
:
String
)
=
new
Library
(
id
)
class
Library
(
libraryId
:
String
)
extends
AbstractLibrary
(
libraryId
)
{
def
addJobs
()
:
Unit
=
{}
protected
def
add
Lib
Jobs
Internal
()
:
Unit
=
{}
}
var
output
:
FastaOutput
=
_
var
outputSnps
:
FastaOutput
=
_
def
addJobs
()
:
Unit
=
{
runLib
rary
Jobs
()
protected
def
addSampleJobsInternal
()
:
Unit
=
{
runLib
s
Jobs
()
output
=
addGenerateFasta
(
sampleId
,
sampleDir
)
outputSnps
=
addGenerateFasta
(
sampleId
,
sampleDir
,
snpsOnly
=
true
)
}
...
...
@@ -59,7 +59,7 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript {
val
refVariants
=
addGenerateFasta
(
null
,
outputDir
+
"reference/"
,
outputName
=
"reference"
)
val
refVariantSnps
=
addGenerateFasta
(
null
,
outputDir
+
"reference/"
,
outputName
=
"reference"
,
snpsOnly
=
true
)
run
SamplesJobs
()
add
SamplesJobs
()
val
catVariants
=
Cat
(
this
,
refVariants
.
variants
::
samples
.
map
(
_
.
_2
.
output
.
variants
).
toList
,
outputDir
+
"fastas/variant.fasta"
)
add
(
catVariants
)
...
...
protected/biopet-gatk-pipelines/src/main/scala/nl/lumc/sasc/biopet/pipelines/gatk/GatkPipeline.scala
View file @
bbd005c3
...
...
@@ -65,7 +65,7 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
gatkVariantcalling
.
sampleID
=
sampleId
gatkVariantcalling
.
outputDir
=
libDir
def
addJobs
()
:
Unit
=
{
protected
def
add
Lib
Jobs
Internal
()
:
Unit
=
{
val
bamFile
:
Option
[
File
]
=
if
(
config
.
contains
(
"R1"
))
{
mapping
.
input_R1
=
config
(
"R1"
)
mapping
.
input_R2
=
config
(
"R2"
)
...
...
@@ -137,8 +137,8 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
gatkVariantcalling
.
sampleID
=
sampleId
gatkVariantcalling
.
outputDir
=
sampleDir
+
"/variantcalling/"
def
addJobs
()
:
Unit
=
{
runLib
rary
Jobs
()
protected
def
addSampleJobsInternal
()
:
Unit
=
{
runLib
s
Jobs
()
gatkVariantcalling
.
inputBams
=
libraries
.
map
(
_
.
_2
.
mapping
.
finalBamFile
).
toList
gatkVariantcalling
.
preProcesBams
=
false
if
(!
singleSampleCalling
)
{
...
...
@@ -162,7 +162,7 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
}
def
biopetScript
()
{
run
SamplesJobs
add
SamplesJobs
//SampleWide jobs
val
gvcfFiles
:
List
[
File
]
=
if
(
mergeGvcfs
&&
externalGvcfs
.
size
+
samples
.
size
>
1
)
{
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/MultiSampleQScript.scala
View file @
bbd005c3
...
...
@@ -47,10 +47,10 @@ trait MultiSampleQScript extends BiopetQScript {
val
config
=
new
ConfigFunctions
(
defaultSample
=
sampleId
,
defaultLibrary
=
libraryId
)
/** Adds the library jobs */
final
def
add
()
:
Unit
=
{
final
def
add
LibJobs
()
:
Unit
=
{
currentSample
=
Some
(
sampleId
)
currentLib
=
Some
(
libraryId
)
addJobs
()
add
Lib
Jobs
Internal
()
currentLib
=
None
currentSample
=
None
}
...
...
@@ -62,7 +62,7 @@ trait MultiSampleQScript extends BiopetQScript {
def
libDir
=
sampleDir
+
"lib_"
+
libraryId
+
File
.
separator
/** Function that add library jobs */
protected
def
addJobs
()
protected
def
add
Lib
Jobs
Internal
()
}
/** Library type, need implementation in pipeline */
...
...
@@ -84,19 +84,19 @@ trait MultiSampleQScript extends BiopetQScript {
}
/** Adds sample jobs */
final
def
add
()
:
Unit
=
{
final
def
add
SampleJobs
()
:
Unit
=
{
currentSample
=
Some
(
sampleId
)
add
Jobs
()
add
SampleJobsInternal
()
currentSample
=
None
}
/** Function to add
library
jobs */
protected
def
add
Jobs
()
/** Function to add
sample
jobs */
protected
def
add
SampleJobsInternal
()
/** function runs all libraries in one call */
protected
final
def
runLib
rary
Jobs
()
:
Unit
=
{
protected
final
def
runLib
s
Jobs
()
:
Unit
=
{
for
((
libraryId
,
library
)
<-
libraries
)
{
library
.
add
()
library
.
add
LibJobs
()
}
}
...
...
@@ -130,9 +130,9 @@ trait MultiSampleQScript extends BiopetQScript {
}
/** Runs runSingleSampleJobs method for each sample */
final
def
run
SamplesJobs
()
{
final
def
add
SamplesJobs
()
{
for
((
sampleId
,
sample
)
<-
samples
)
{
sample
.
add
()
sample
.
add
SampleJobs
()
}
}
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/pipelines/MultisamplePipelineTemplate.scala
View file @
bbd005c3
...
...
@@ -27,12 +27,12 @@ class MultisamplePipelineTemplate(val root: Configurable) extends QScript with M
def
makeLibrary
(
id
:
String
)
=
new
Library
(
id
)
class
Library
(
libraryId
:
String
)
extends
AbstractLibrary
(
libraryId
)
{
def
addJobs
()
:
Unit
=
{
protected
def
add
Lib
Jobs
Internal
()
:
Unit
=
{
// Library jobs
}
}
def
addJobs
()
:
Unit
=
{
protected
def
addSampleJobsInternal
()
:
Unit
=
{
// Sample jobs
}
}
...
...
public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/Flexiprep.scala
View file @
bbd005c3
...
...
@@ -39,10 +39,10 @@ class Flexiprep(val root: Configurable) extends QScript with BiopetQScript {
var
skipClip
:
Boolean
=
config
(
"skip_clip"
,
default
=
false
)
/** Sample name */
var
sample
Name
:
String
=
_
var
sample
Id
:
String
=
_
/** Library name */
var
library
Name
:
String
=
_
var
library
Id
:
String
=
_
var
paired
:
Boolean
=
(
input_R2
!=
null
)
var
R1_ext
:
String
=
_
...
...
@@ -60,8 +60,8 @@ class Flexiprep(val root: Configurable) extends QScript with BiopetQScript {
def
init
()
{
if
(
input_R1
==
null
)
throw
new
IllegalStateException
(
"Missing R1 on flexiprep module"
)
if
(
outputDir
==
null
)
throw
new
IllegalStateException
(
"Missing Output directory on flexiprep module"
)
if
(
sample
Name
==
null
)
throw
new
IllegalStateException
(
"Missing Sample name on flexiprep module"
)
if
(
library
Name
==
null
)
throw
new
IllegalStateException
(
"Missing Library name on flexiprep module"
)
if
(
sample
Id
==
null
)
throw
new
IllegalStateException
(
"Missing Sample name on flexiprep module"
)
if
(
library
Id
==
null
)
throw
new
IllegalStateException
(
"Missing Library name on flexiprep module"
)
else
if
(!
outputDir
.
endsWith
(
"/"
))
outputDir
+=
"/"
paired
=
(
input_R2
!=
null
)
...
...
@@ -79,7 +79,7 @@ class Flexiprep(val root: Configurable) extends QScript with BiopetQScript {
R2_name
=
R2_name
.
substring
(
0
,
R2_name
.
lastIndexOf
(
R2_ext
))
}
summary
.
out
=
outputDir
+
sample
Name
+
"-"
+
library
Name
+
".qc.summary.json"
summary
.
out
=
outputDir
+
sample
Id
+
"-"
+
library
Id
+
".qc.summary.json"
}
def
biopetScript
()
{
...
...
public/flexiprep/src/main/scala/nl/lumc/sasc/biopet/pipelines/flexiprep/FlexiprepSummary.scala
View file @
bbd005c3
...
...
@@ -120,8 +120,8 @@ class FlexiprepSummary(val root: Configurable) extends InProcessFunction with Co
logger
.
debug
(
"Start"
)
md5Summary
()
val
summary
=
(
"samples"
:=
(
flexiprep
.
sample
Name
:=
(
"libraries"
:=
(
flexiprep
.
library
Name
:=
(
(
"samples"
:=
(
flexiprep
.
sample
Id
:=
(
"libraries"
:=
(
flexiprep
.
library
Id
:=
(
(
"flexiprep"
:=
(
(
"clipping"
:=
!
flexiprep
.
skipClip
)
->:
(
"trimming"
:=
!
flexiprep
.
skipTrim
)
->:
...
...
public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/Mapping.scala
View file @
bbd005c3
...
...
@@ -126,8 +126,8 @@ class Mapping(val root: Configurable) extends QScript with BiopetQScript {
flexiprep
.
outputDir
=
outputDir
+
"flexiprep/"
flexiprep
.
input_R1
=
input_R1
if
(
paired
)
flexiprep
.
input_R2
=
input_R2
flexiprep
.
sample
Name
=
this
.
sampleId
flexiprep
.
library
Name
=
this
.
libraryId
flexiprep
.
sample
Id
=
this
.
sampleId
flexiprep
.
library
Id
=
this
.
libraryId
flexiprep
.
init
flexiprep
.
runInitialJobs
}
...
...
public/sage/src/main/scala/nl/lumc/sasc/biopet/pipelines/sage/Sage.scala
View file @
bbd005c3
...
...
@@ -67,14 +67,14 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript {
val
prefixFastq
:
File
=
createFile
(
".prefix.fastq"
)
val
flexiprep
=
new
Flexiprep
(
qscript
)
flexiprep
.
sample
Name
=
sampleId
flexiprep
.
library
Name
=
libraryId
flexiprep
.
sample
Id
=
sampleId
flexiprep
.
library
Id
=
libraryId
val
mapping
=
new
Mapping
(
qscript
)
mapping
.
libraryId
=
libraryId
mapping
.
sampleId
=
sampleId
def
addJobs
()
:
Unit
=
{
protected
def
add
Lib
Jobs
Internal
()
:
Unit
=
{
flexiprep
.
outputDir
=
libDir
+
"flexiprep/"
flexiprep
.
input_R1
=
inputFastq
flexiprep
.
init
...
...
@@ -102,8 +102,8 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript {
}
}
def
addJobs
()
:
Unit
=
{
runLib
rary
Jobs
()
protected
def
addSampleJobsInternal
()
:
Unit
=
{
runLib
s
Jobs
()
val
libraryBamfiles
=
libraries
.
map
(
_
.
_2
.
mapping
.
finalBamFile
).
toList
val
libraryFastqFiles
=
libraries
.
map
(
_
.
_2
.
prefixFastq
).
toList
...
...
@@ -151,7 +151,7 @@ class Sage(val root: Configurable) extends QScript with MultiSampleQScript {
tagsLibrary
=
cdl
.
output
}
run
SamplesJobs
add
SamplesJobs
}
def
addBedtoolsCounts
(
bamFile
:
File
,
outputPrefix
:
String
,
outputDir
:
String
)
{
...
...
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