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
d5bfc948
Commit
d5bfc948
authored
Jan 12, 2019
by
Gervaise Henry
🤠
Browse files
Fix %mito calculation to use the data as sparse matrix so it will not cause memory error
parent
393ed35d
Changes
1
Hide whitespace changes
Inline
Side-by-side
r.scripts/sc-TissueMapper_functions.R
View file @
d5bfc948
...
...
@@ -122,7 +122,7 @@ scQC <- function(sc10x,lg=500,hg=2500,hm=0.1,sub=FALSE){
#Calculate stats
mito.genes
<-
grep
(
pattern
=
"^MT-"
,
x
=
rownames
(
x
=
GetAssayData
(
object
=
sc10x
)),
value
=
TRUE
)
percent.mito
<-
colSums
(
as.matrix
(
GetAssayData
(
object
=
sc10x
,
slot
=
"counts"
)[
mito.genes
,])
)
/
colSums
(
as.matrix
(
GetAssayData
(
object
=
sc10x
,
slot
=
"counts"
))
)
percent.mito
<-
Matrix
::
colSums
(
GetAssayData
(
object
=
sc10x
,
slot
=
"counts"
)[
mito.genes
,])
/
Matrix
::
colSums
(
GetAssayData
(
object
=
sc10x
,
slot
=
"counts"
))
sc10x
$
percent.mito
<-
percent.mito
#Plot raw stats
...
...
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