Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Strand Lab
sc-TissueMapper
Commits
857c0bd9
Commit
857c0bd9
authored
Jun 05, 2019
by
Gervaise Henry
🤠
Browse files
Make indevidual plots for filtered qc plots
parent
d8e3c4e2
Changes
1
Show whitespace changes
Inline
Side-by-side
r.scripts/sc-TissueMapper_functions.R
View file @
857c0bd9
...
...
@@ -283,10 +283,11 @@ scQC <- function(sc10x,sp="hu"){
densities.s
[[
j
]]
<-
density
(
sc10x.temp
$
nCount_RNA
,
sc10x.temp
[[
i
]][,
1
],
n
=
1000
)
plots.s
[[
j
]]
<-
ggplotGrob
(
ggplot
(
data.frame
(
cbind
(
sc10x.temp
$
nCount_RNA
,
sc10x.temp
[[
i
]][,
1
])))
+
geom_point
(
aes
(
x
=
X1
,
y
=
X2
,
color
=
densities.s
[[
j
]]),
size
=
0.1
)
+
scale_x_continuous
(
limits
=
c
(
0
,
max.ct
))
+
scale_y_continuous
(
limits
=
c
(
0
,
max.y
))
+
scale_color_viridis
(
option
=
"inferno"
)
+
labs
(
x
=
"nCount"
,
y
=
i
,
color
=
"Density"
)
+
ggtitle
(
j
)
+
cowplot
::
theme_cowplot
()
+
theme
(
plot.title
=
element_text
(
size
=
7.5
),
axis.title
=
element_text
(
size
=
7.5
),
axis.text
=
element_text
(
size
=
5
,
angle
=
45
),
legend.position
=
"bottom"
,
legend.title
=
element_text
(
size
=
5
,
face
=
"bold"
,
vjust
=
1
),
legend.text
=
element_text
(
size
=
5
,
angle
=
45
))
+
guides
(
color
=
guide_colourbar
(
barwidth
=
5
,
barheight
=
0.5
)))
}
}
ggsave
(
paste0
(
"./analysis/qc/Violin_qc.filtered."
,
i
,
".eps"
),
marrangeGrob
(
grobs
=
plots.v
,
nrow
=
1
,
ncol
=
length
(
sc10x
),
top
=
NULL
))
ggsave
(
paste0
(
"./analysis/qc/Violin_qc.filtered."
,
i
,
"."
,
j
,
".eps"
),
plot
=
plots.v
[[
j
]])
if
(
i
%in%
c
(
"nFeature_RNA"
,
"percent.mito"
)){
ggsave
(
paste0
(
"./analysis/qc/Plot_qc.filtered."
,
i
,
".eps"
),
marrangeGrob
(
grobs
=
plots.s
,
nrow
=
1
,
ncol
=
length
(
sc10x
),
top
=
NULL
))
ggsave
(
paste0
(
"./analysis/qc/Plot_qc.filtered."
,
i
,
"."
,
j
,
".eps"
),
plot
=
plots.s
[[
j
]])
}
}
}
...
...
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