Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simon CHEVOLLEAU
Embryo functions
Commits
c0483617
Commit
c0483617
authored
Mar 09, 2022
by
Simon CHEVOLLEAU
💻
Browse files
Add return_plot parameter to plotMultipleOneDimension function
parent
4cc64bc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
functions.R
View file @
c0483617
...
...
@@ -414,7 +414,8 @@ plotCompressedUmapAllKit <- function(dir_path, pdf_path, desired_annots, annotCo
ggsave
(
paste0
(
dir_path
,
"/compressed_"
,
pdf_path
),
marrangeGrob
(
plot_list_compressed
,
nrow
=
nrow
,
ncol
=
ncol
))
}
plotMultipleOneDimension
<-
function
(
table
,
pseudotimes
,
dir_path
,
colors
=
NULL
,
size_point
=
1
,
legend_title
=
TRUE
,
jitter_amount
=
0.3
)
{
plotMultipleOneDimension
<-
function
(
table
,
pseudotimes
,
dir_path
,
colors
=
NULL
,
size_point
=
1
,
legend_title
=
TRUE
,
jitter_amount
=
0.3
,
return_plot
=
T
)
{
plots
<-
list
()
for
(
gene
in
rownames
(
table
)){
psdtp_list
<-
list
();
annot_list
<-
list
();
text_annot
<-
list
()
...
...
@@ -440,6 +441,8 @@ plotMultipleOneDimension <- function(table, pseudotimes, dir_path, colors = NULL
color
<-
NULL
}
ggsave
(
paste0
(
dir_path
,
"/"
,
gene
,
".pdf"
),
one_dimension
(
psdtp_list
,
annot_list
,
text_annot
,
gene
,
colors
=
color
,
size_point
=
1
,
legend_title
,
jitter_amount
=
jitter_amount
))
plots
[[
gene
]]
<-
one_dimension
(
psdtp_list
,
annot_list
,
text_annot
,
gene
,
colors
=
color
,
size_point
=
1
,
legend_title
,
jitter_amount
=
jitter_amount
)
ggsave
(
paste0
(
dir_path
,
"/"
,
gene
,
".pdf"
),
plots
[[
gene
]])
}
return
(
plots
)
}
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