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
55ca079a
Commit
55ca079a
authored
Jan 29, 2015
by
Peter van 't Hof
Browse files
Added allele overlap heatmap
parent
ca4fb8bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/resources/nl/lumc/sasc/biopet/tools/plotHeatmap.R
View file @
55ca079a
...
...
@@ -15,11 +15,11 @@ heat<- heat[,-1]
heat
<-
as.matrix
(
heat
)
png
(
file
=
outputArg
,
width
=
1
5
00
,
height
=
1
5
00
)
heatmap.2
(
heat
,
trace
=
'none'
,
col
=
col
,
Colv
=
NA
,
Rowv
=
NA
,
dendrogram
=
"none"
,
margins
=
c
(
1
0
,
1
0
),
na.color
=
"#00FF00"
)
png
(
file
=
outputArg
,
width
=
1
2
00
,
height
=
1
2
00
)
heatmap.2
(
heat
,
trace
=
'none'
,
col
=
col
,
Colv
=
NA
,
Rowv
=
NA
,
dendrogram
=
"none"
,
margins
=
c
(
1
2
,
1
2
),
na.color
=
"#00FF00"
)
dev.off
()
png
(
file
=
outputArgClustering
,
width
=
1
5
00
,
height
=
1
5
00
)
heatmap.2
(
heat
,
trace
=
'none'
,
col
=
col
,
Colv
=
"Rowv"
,
dendrogram
=
"row"
,
margins
=
c
(
1
0
,
1
0
),
na.color
=
"#00FF00"
)
png
(
file
=
outputArgClustering
,
width
=
1
2
00
,
height
=
1
2
00
)
heatmap.2
(
heat
,
trace
=
'none'
,
col
=
col
,
Colv
=
"Rowv"
,
dendrogram
=
"row"
,
margins
=
c
(
1
2
,
1
2
),
na.color
=
"#00FF00"
)
dev.off
()
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/MultiSampleQScript.scala
View file @
55ca079a
...
...
@@ -129,8 +129,7 @@ trait MultiSampleQScript extends BiopetQScript {
ConfigUtils
.
any2map
(
Config
.
global
.
map
(
"samples"
)).
keySet
}
/**
* Runs addAndTrackJobs method for each sample */
/** Runs addAndTrackJobs method for each sample */
final
def
addSamplesJobs
()
{
for
((
sampleId
,
sample
)
<-
samples
)
{
sample
.
addAndTrackJobs
()
...
...
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/VcfStats.scala
View file @
55ca079a
...
...
@@ -32,7 +32,7 @@ object VcfStats extends ToolCommand {
}
val
genotypeOverlap
:
mutable.Map
[
String
,
mutable.Map
[
String
,
Int
]]
=
mutable
.
Map
()
val
variant
Overlap
:
mutable.Map
[
String
,
mutable.Map
[
String
,
Int
]]
=
mutable
.
Map
()
val
alleles
Overlap
:
mutable.Map
[
String
,
mutable.Map
[
String
,
Int
]]
=
mutable
.
Map
()
val
qualStats
:
mutable.Map
[
Any
,
Int
]
=
mutable
.
Map
()
val
genotypeStats
:
mutable.Map
[
String
,
mutable.Map
[
String
,
mutable.Map
[
Any
,
Int
]]]
=
mutable
.
Map
()
...
...
@@ -53,11 +53,11 @@ object VcfStats extends ToolCommand {
// Init
for
(
sample1
<-
samples
)
{
genotypeOverlap
(
sample1
)
=
mutable
.
Map
()
variant
Overlap
(
sample1
)
=
mutable
.
Map
()
alleles
Overlap
(
sample1
)
=
mutable
.
Map
()
genotypeStats
(
sample1
)
=
mutable
.
Map
()
for
(
sample2
<-
samples
)
{
genotypeOverlap
(
sample1
)(
sample2
)
=
0
variant
Overlap
(
sample1
)(
sample2
)
=
0
alleles
Overlap
(
sample1
)(
sample2
)
=
0
}
}
...
...
@@ -69,11 +69,12 @@ object VcfStats extends ToolCommand {
val
genotype
=
record
.
getGenotype
(
sample1
)
checkGenotype
(
genotype
)
for
(
sample2
<-
samples
)
{
if
(
genotype
.
getAlleles
==
record
.
getGenotype
(
sample2
).
getAlleles
)
{
val
genotype2
=
record
.
getGenotype
(
sample2
)
if
(
genotype
.
getAlleles
==
genotype2
.
getAlleles
)
genotypeOverlap
(
sample1
)(
sample2
)
=
genotypeOverlap
(
sample1
)(
sample2
)
+
1
if
(!(
genotype
.
isHomRef
||
genotype
.
isNoCall
||
genotype
.
isNonInformative
)
)
variantOverlap
(
sample1
)(
sample2
)
=
variantOverlap
(
sample1
)(
sample2
)
+
1
}
for
(
allele
<-
genotype
.
getAlleles
)
if
(
genotype2
.
getAlleles
.
exists
(
_
.
basesMatch
(
allele
)))
allelesOverlap
(
sample1
)(
sample2
)
=
allelesOverlap
(
sample1
)(
sample2
)
+
1
}
}
}
...
...
@@ -82,7 +83,7 @@ object VcfStats extends ToolCommand {
plotXy
(
writeField
(
"QUAL"
,
qualStats
.
toMap
))
writeGenotypeFields
(
commandArgs
.
outputDir
+
"/genotype_"
,
samples
)
writeOverlap
(
genotypeOverlap
,
commandArgs
.
outputDir
+
"/sample_compare/genotype_overlap"
,
samples
)
writeOverlap
(
variant
Overlap
,
commandArgs
.
outputDir
+
"/sample_compare/
variant
_overlap"
,
samples
)
writeOverlap
(
alleles
Overlap
,
commandArgs
.
outputDir
+
"/sample_compare/
allele
_overlap"
,
samples
)
logger
.
info
(
"Done"
)
}
...
...
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