Created
June 1, 2021 06:48
-
-
Save lwaldron/d43b47faa740859a471afee9153c8749 to your computer and use it in GitHub Desktop.
CPU and memory footprints of a few operations on RaggedExperiment objects from TCGA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## --------------------------------------------------------------------------------------------------------------------------------- | |
library(curatedTCGAData) | |
library(TCGAutils) | |
library(RaggedExperiment) | |
## ----------------------------------------------------------------------------------------------------------------------------------------- | |
cnvdry <- | |
curatedTCGAData(assays = "CNVSNP", | |
version = "2.0.1", | |
dry.run = TRUE) | |
nrow(cnvdry) | |
sum(as.numeric(sub(" Mb", "", cnvdry$file_size))) | |
## ----------------------------------------------------------------------------------------------------------------- | |
cnv <- | |
curatedTCGAData(assays = "CNVSNP", | |
version = "2.0.1", | |
dry.run = FALSE) | |
cnvexplist <- experiments(cnv) | |
length(cnvexplist) | |
sum(sapply(cnvexplist, ncol)) | |
print(object.size(cnvexplist), units = "auto") | |
## ---------------------------------------------------------------------------------------------------------------------------------------- | |
mutsdry <- | |
curatedTCGAData(assays = "Mutation", | |
version = "2.0.1", | |
dry.run = TRUE) | |
nrow(mutsdry) | |
sum(as.numeric(sub(" Mb", "", mutsdry$file_size))) | |
## ---------------------------------------------------------------------------------------------------------------- | |
muts <- | |
curatedTCGAData(assays = "Mutation", | |
version = "2.0.1", | |
dry.run = FALSE) | |
mutsexplist <- experiments(muts) | |
length(mutsexplist) | |
sum(sapply(mutsexplist, ncol)) | |
print(object.size(mutsexplist), units = "auto") | |
## ------------------------------------------------------------------------------------------------------------------------------------ | |
system.time(cnvsimp <- simplifyTCGA(cnv[, , "BRCA_CNVSNP-20160128"])) | |
## ----------------------------------------------------------------------------------------------------------------------------------------------- | |
print(object.size(cnv[["BRCA_CNVSNP-20160128"]]), units="Mb") | |
print(object.size(cnvsimp[["BRCA_CNVSNP-20160128_simplified"]]), units="Mb") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment