Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biopet.biopet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Mirrors
biopet.biopet
Commits
5fafdb64
Commit
5fafdb64
authored
Apr 05, 2017
by
Peter van 't Hof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Making PU optional
parent
2c9c7c06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/Mapping.scala
...scala/nl/lumc/sasc/biopet/pipelines/mapping/Mapping.scala
+9
-7
No files found.
mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/Mapping.scala
View file @
5fafdb64
...
...
@@ -37,7 +37,9 @@ import org.broadinstitute.gatk.queue.QScript
import
scala.math._
// TODO: documentation
/**
* This pipeline doing a alignment to a given reference genome
*/
class
Mapping
(
val
parent
:
Configurable
)
extends
QScript
with
SummaryQScript
with
SampleLibraryTag
with
Reference
{
def
this
()
=
this
(
null
)
...
...
@@ -79,7 +81,7 @@ class Mapping(val parent: Configurable) extends QScript with SummaryQScript with
protected
var
platform
:
String
=
config
(
"platform"
,
default
=
"illumina"
)
/** Readgroup platform unit */
protected
var
platformUnit
:
String
=
config
(
"platform_unit"
,
default
=
"na
"
)
protected
var
platformUnit
:
Option
[
String
]
=
config
(
"platform_unit
"
)
/** Readgroup sequencing center */
protected
var
readgroupSequencingCenter
:
Option
[
String
]
=
config
(
"readgroup_sequencing_center"
)
...
...
@@ -379,7 +381,7 @@ class Mapping(val parent: Configurable) extends QScript with SummaryQScript with
hisat2
.
R2
=
R2
hisat2
.
rgId
=
Some
(
readgroupId
)
hisat2
.
rg
+:=
s
"PL:$platform"
hisat2
.
rg
+:=
s
"PU:$platformUnit"
platformUnit
.
foreach
(
x
=>
hisat2
.
rg
+:=
s
"PU:$x"
)
libId
match
{
case
Some
(
id
)
=>
hisat2
.
rg
+:=
s
"LB:$id"
case
otherwise
=>
;
...
...
@@ -452,7 +454,7 @@ class Mapping(val parent: Configurable) extends QScript with SummaryQScript with
RG
+=
"SM:"
+
sampleId
.
get
+
","
RG
+=
"LB:"
+
libId
.
get
+
","
if
(
readgroupDescription
!=
null
)
RG
+=
"DS"
+
readgroupDescription
+
","
RG
+=
"PU:"
+
platformUnit
+
","
platformUnit
.
foreach
(
x
=>
RG
+=
"PU:"
+
x
+
","
)
if
(
predictedInsertsize
.
getOrElse
(
0
)
>
0
)
RG
+=
"PI:"
+
predictedInsertsize
.
get
+
","
if
(
readgroupSequencingCenter
.
isDefined
)
RG
+=
"CN:"
+
readgroupSequencingCenter
.
get
+
","
if
(
readgroupDate
!=
null
)
RG
+=
"DT:"
+
readgroupDate
+
","
...
...
@@ -497,7 +499,7 @@ class Mapping(val parent: Configurable) extends QScript with SummaryQScript with
bowtie2
.
rgId
=
Some
(
readgroupId
)
bowtie2
.
rg
+:=
(
"LB:"
+
libId
.
get
)
bowtie2
.
rg
+:=
(
"PL:"
+
platform
)
bowtie2
.
rg
+:=
(
"PU:"
+
platformUnit
)
platformUnit
.
foreach
(
x
=>
bowtie2
.
rg
+:=
(
"PU:"
+
x
)
)
bowtie2
.
rg
+:=
(
"SM:"
+
sampleId
.
get
)
bowtie2
.
R1
=
R1
bowtie2
.
R2
=
R2
...
...
@@ -554,7 +556,7 @@ class Mapping(val parent: Configurable) extends QScript with SummaryQScript with
addOrReplaceReadGroups
.
RGID
=
readgroupId
addOrReplaceReadGroups
.
RGLB
=
libId
.
get
addOrReplaceReadGroups
.
RGPL
=
platform
addOrReplaceReadGroups
.
RGPU
=
platformUnit
addOrReplaceReadGroups
.
RGPU
=
platformUnit
.
getOrElse
(
readgroupId
)
addOrReplaceReadGroups
.
RGSM
=
sampleId
.
get
if
(
readgroupSequencingCenter
.
isDefined
)
addOrReplaceReadGroups
.
RGCN
=
readgroupSequencingCenter
.
get
if
(
readgroupDescription
.
isDefined
)
addOrReplaceReadGroups
.
RGDS
=
readgroupDescription
.
get
...
...
@@ -568,7 +570,7 @@ class Mapping(val parent: Configurable) extends QScript with SummaryQScript with
var
RG
:
String
=
"@RG\\t"
+
"ID:"
+
readgroupId
+
"\\t"
RG
+=
"LB:"
+
libId
.
get
+
"\\t"
RG
+=
"PL:"
+
platform
+
"\\t"
RG
+=
"PU:"
+
platformUnit
+
"\\t"
platformUnit
.
foreach
(
x
=>
RG
+=
"PU:"
+
x
+
"\\t"
)
RG
+=
"SM:"
+
sampleId
.
get
+
"\\t"
if
(
readgroupSequencingCenter
.
isDefined
)
RG
+=
"CN:"
+
readgroupSequencingCenter
.
get
+
"\\t"
if
(
readgroupDescription
.
isDefined
)
RG
+=
"DS:"
+
readgroupDescription
.
get
+
"\\t"
...
...
Write
Preview
Markdown
is supported
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