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
dd7f8389
Commit
dd7f8389
authored
Mar 09, 2015
by
bow
Browse files
Update heatmap plotting script
parent
4b348b21
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/plot_heatmap.R
View file @
dd7f8389
...
...
@@ -126,7 +126,7 @@ plotHeatmap <- function(in.data, out.name=OUTPUT.PLOT, count.type=COUNT.TYPE, tm
dev.off
()
}
plotPlaceholder
<-
function
(
out.name
=
OUTPUT.PLOT
,
text.display
=
"Not enough data points for plotting"
)
{
plotPlaceholder
<-
function
(
text.display
,
out.name
=
OUTPUT.PLOT
)
{
png
(
out.name
,
height
=
800
,
width
=
800
,
res
=
100
)
par
(
mar
=
c
(
0
,
0
,
0
,
0
))
plot
(
c
(
0
,
1
),
c
(
0
,
1
),
ann
=
F
,
bty
=
'n'
,
type
=
'n'
,
xaxt
=
'n'
,
yaxt
=
'n'
)
...
...
@@ -139,7 +139,7 @@ plotPlaceholder <- function(out.name=OUTPUT.PLOT, text.display="Not enough data
parsed
<-
tryCatch
(
prepTable
(
INPUT.PATH
),
error
=
function
(
e
)
{
plotPlaceholder
(
text.display
=
"Error occured during table p
arsing
"
)
plotPlaceholder
(
text.display
=
"Error occured during table p
rep
"
)
q
(
status
=
0
)
})
...
...
@@ -147,5 +147,5 @@ if (nrow(parsed) > 0) {
cors
<-
cor
(
parsed
,
method
=
"spearman"
)
tryCatch
(
plotHeatmap
(
cors
),
error
=
function
(
e
)
plotPlaceholder
(
text.display
=
"Error occured during plotting"
))
}
else
{
plotPlaceholder
()
plotPlaceholder
(
text.display
=
"Not enough data points for plotting"
)
}
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