This document takes the various outputs produced by salmon/hisat/htseq/etc and generates the data which will be used in all of the following analyses.
Periodically, the shared metadata sheet was downloaded locally to the sample_sheets/ directory, given a suffix corresponding to the current worksheet revision, and the various trimming/alignment/etc statistics were manually added. Finally, some demographics were appended to the sample metadata. The resulting modified metadata was used as the input for all following analyses.
samplesheet <- "sample_sheets/tmrc3_samples.xlsx"
testthat::expect_true(file.exists(samplesheet))
demographics <- "sample_sheets/tmrc3_demographicsv2.xlsx"
hslp_samplesheet <- "sample_sheets/tmrc3_samples_pruned.xlsx"
species_identities <- "sample_sheets/identified_parasite_species.xlsx"
data_structures <- c(data_structures, "samplesheet", "demographics")The primary annotation sources are:
Both provide GO data. They also provide helpful links to other data sources. For the moment, we are focusing on the human annotations. In the first instance, the annotations are acquired via some functions in hpgltools which seek to make biomaRt (Smedley et al. (2009)) a little more robust. In the second instance, the annotations are extracted from a locally generated orgDB/annotationDbi (“AnnotationDbi” (n.d.)) instance.
These analyses have focused on gene-level abundances/differences. Thus, when htseq-count was invoked against the hisat2-based mappings, parameters were chosen to count genes rather than transcripts. In this context, a gene refers to the non-redundant union of the transcripts’ exons. Similarly, when salmon counts were used via tximport, a mapping of genes to transcripts was used to collapse the matrix to gene-level abundances. This decision may be revisited.
The parasite annotations were downloaded from the tritrypdb via the provided REST interface, exported into an OrgDB instance, and extracted via the EuPathDB package.
hs_annot <- load_biomart_annotations(year = "2020", month = "jan")## Using mart: ENSEMBL_MART_ENSEMBL from host: jan2020.archive.ensembl.org.
## Successfully connected to the hsapiens_gene_ensembl database.
## Finished downloading ensembl gene annotations.
## Finished downloading ensembl structure annotations.
## symbol columns is null, pattern matching 'symbol'.
## Including symbols, there are 68435 vs the 249606 gene annotations.
## Not dropping haplotype chromosome annotations, set drop_haplotypes = TRUE if this is bad.
## Saving annotations to hsapiens_biomart_annotations.rda.
## Finished save().
hs_annot <- hs_annot[["annotation"]]
## The next two lines make a bridge between the gff file used by hisat2
## and the gene IDs.The following lines may be used if one wishes to use the relatively strict ID.version system (optionally) enforced by salmon. It should be noted that newer versions of tximport have options which ignore this, and I also now have a function which will set the ID.version for the gene annotations to be the same as what was observed in the count tables. Either of those strategies makes the following not necessary; but if you wish to be a little bit pedantic about the gene<->Tx IDs, then this should give you a sense of how well matched are the downloaded annotations and gene IDs used by salmon.
hs_annot[["transcript"]] <- paste0(rownames(hs_annot), ".", hs_annot[["version"]])
hs_annot <- group_mean_cds_length(hs_annot)
hs_tx_annot <- hs_annot ## Make a copy so I don't lose transcript IDs for salmon
rownames(hs_annot) <- make.names(hs_annot[["ensembl_gene_id"]], unique = TRUE)
not_unique_idx <- grepl(x = rownames(hs_annot), pattern = "\\.\\d+$")
hs_annot <- hs_annot[!not_unique_idx, ]The following block will stop working soon. Its purpose is to download the current (or a specific version) annotations from one of the eupathdb.org websites. These are being retired/moved soon. My version of the EuPathDB package creates installable orgdb packages; so I presumably will just need to include the appropriate tarballs in the recipe for this container. In response to the retirement of eupathdb, I spun up an instance of my eupathdb package to download everything; hopefully it will finish before the various servers go down. I was too late for schistodb, it is already offline (I am pretty sure I have an older copy though).
Given that I recently included the parasite transcripts to the data, I should also spend a moment and figure out how to include the annotations.
As a starting point, I will just grab the EuPathDB panamensis annotations. I think I will need to limit them to just the shared columns and drop the rest.
meta <- sm(download_eupath_metadata(webservice = "tritrypdb"))
panamensis_entry <- get_eupath_entry("MHOM", metadata = meta[["valid"]])
panamensis_db <- make_eupath_orgdb(panamensis_entry)
panamensis_pkg <- panamensis_db[["pkgname"]]
package_name <- panamensis_db[["pkgname"]]
if (is.null(panamensis_pkg)) {
panamensis_pkg <- panamensis_db[["orgdb_name"]]
package_name <- panamensis_pkg
}
tt <- library(panamensis_pkg, character.only = TRUE)
panamensis_pkg <- get0(panamensis_pkg)
all_fields <- columns(panamensis_pkg)
all_lp_annot <- sm(load_orgdb_annotations(
panamensis_pkg,
keytype = "gid",
fields = c("annot_gene_entrez_id", "annot_gene_name",
"annot_strand", "annot_chromosome", "annot_cds_length",
"annot_gene_location_text", "annot_gene_product")))$genesOk, I added the orgdb tarball and an entry to install it to my bootstrap for this container. So let us load the annotations for our Leishmanial strain of interest!
package_name <- "org.Lpanamensis.MHOMCOL81L13.v68.eg.db"
tt <- library(package_name, character.only = TRUE)## Loading required package: AnnotationDbi
##
## Attaching package: 'AnnotationDbi'
## The following object is masked from 'package:dplyr':
##
## select
##
panamensis_pkg <- get0(package_name)
all_fields <- columns(panamensis_pkg)
all_lp_annot <- sm(load_orgdb_annotations(
package_name,
keytype = "gid",
fields = c("annot_gene_entrez_id", "annot_gene_name",
"annot_strand", "annot_chromosome", "annot_cds_length",
"annot_gene_location_text", "annot_gene_product")))[["genes"]]The following was added to support the possibility of making a single expressionset using the mappings against a genome of concatenated hg38 and lpanamensis sequence. In order to do that, one must have an annotation set with consistent columns across all genes from both species.
I am not sure if I copied those count tables to the container (I suspect I did not), but I will leave the code here as an example of how one might make a concatenated expressionset/summarizedexperiment.
all_lp_annot[["end"]] <- gsub(x = all_lp_annot[["annot_gene_location_text"]],
pattern = "^.*\\.\\.", replacement = "")
all_lp_annot[["end"]] <- gsub(x = all_lp_annot[["end"]],
pattern = "\\(.*$", replacement = "")
all_lp_annot[["end"]] <- gsub(x = all_lp_annot[["end"]],
pattern = "\\,", replacement = "")
all_lp_annot[["start"]] <- gsub(x = all_lp_annot[["annot_gene_location_text"]],
pattern = "^.*:", replacement = "")
all_lp_annot[["start"]] <- gsub(x = all_lp_annot[["start"]],
pattern = "\\.\\..*$", replacement = "")
all_lp_annot[["start"]] <- gsub(x = all_lp_annot[["start"]],
pattern = "\\,", replacement = "")
all_lp_annot[["mean_cds_len"]] <- all_lp_annot[["annot_cds_length"]]
all_lp_annot[["version"]] <- 1
all_lp_annot[["transcript_version"]] <- 1
all_lp_annot[["hgnc_symbol"]] <- ""
all_lp_annot[["uniprot_gn_symbol"]] <- ""
all_lp_annot[["transcript"]] <- all_lp_annot[["gid"]]
all_lp_annot[["ensembl_transcript_id"]] <- all_lp_annot[["gid"]]
colnames(hs_tx_annot)## [1] "ensembl_gene_id" "ensembl_transcript_id" "version"
## [4] "transcript_version" "description" "gene_biotype"
## [7] "cds_length" "chromosome_name" "strand"
## [10] "start_position" "end_position" "hgnc_symbol"
## [13] "uniprot_gn_symbol" "transcript" "mean_cds_len"
colnames(all_lp_annot)## [1] "gid" "annot_external_db_name"
## [3] "gene_type" "annot_gene_entrez_id"
## [5] "annot_gene_name" "annot_strand"
## [7] "annot_chromosome" "annot_cds_length"
## [9] "annot_gene_location_text" "annot_gene_product"
## [11] "end" "start"
## [13] "mean_cds_len" "version"
## [15] "transcript_version" "hgnc_symbol"
## [17] "uniprot_gn_symbol" "transcript"
## [19] "ensembl_transcript_id"
wanted_columns <- c("gid", "ensembl_transcript_id", "version", "transcript_version", "annot_gene_product",
"gene_type", "annot_cds_length", "annot_chromosome", "annot_strand", "start",
"end", "hgnc_symbol", "uniprot_gn_symbol", "transcript", "mean_cds_len")
all_lp_annot <- all_lp_annot[, wanted_columns]
colnames(all_lp_annot) <- colnames(hs_tx_annot)
hslp_annot <- rbind(hs_tx_annot, all_lp_annot)Finally, dump the current gene ontology data from the EuPathDB-generated orgdb instance. This may be used by goseq/topgo/gostats/etc…
Just as a lark, grab orthologs across the EuPathDB as well in the following block.
One might reasonably ask why in the heck the gene ID column was changed to ‘ensembl_gene_id’, this is to make it easier (possible) to merge these annotations with the ensembl human annotations, if one chooses to combine the two genomes and examine them together.
lp_go <- load_orgdb_go(package_name)## The chosen keytype was not available. Using 'GID'.
## This is an orgdb, good.
lp_go <- lp_go[, c("GID", "GO")]
lp_lengths <- all_lp_annot[, c("ensembl_gene_id", "mean_cds_len")]
colnames(lp_lengths) <- c("gid", "length")
all_lp_annot[["description"]] <- tolower(all_lp_annot[["description"]])
## extract_eupath_orthologs is from EuPathDB and isn't really
## being used for anything in this document afaik.
##orthos <- extract_eupath_orthologs(db = panamensis_pkg)
data_structures <- c(data_structures, "lp_lengths", "lp_go", "all_lp_annot", "meta")One should pay careful attention to the columns used to concatenate the gene/version and transcript/version. If these do not match exactly, many genes will be dropped by tximport without any output to signify something is wrong.
Note to self, I made a fun function which grabs the ids from salmon results. In addition I found that tximport can optionally ignore them.
## The tx_gene_map is used for tximport and salmon quantifications.
hs_annot[["transcript"]] <- paste0(rownames(hs_annot), ".",
hs_annot[["transcript_version"]])
rownames(hs_annot) <- make.names(hs_annot[["ensembl_gene_id"]], unique = TRUE)
hs_tx_gene_map <- hs_annot[, c("transcript", "ensembl_gene_id")]The set of GO categories has not been limited to the 2020 data at the time of this writing. The GO categories is collected along with lengths for goseq. The other methods either have built-in databases of human data (gProfiler) or support orgDB data (org.Hs.eg.db) (clusterProfiler/topGO/gostats).
hs_go <- try(load_biomart_go()[["go"]])## Using mart: ENSEMBL_MART_ENSEMBL from host: useast.ensembl.org.
## Successfully connected to the hsapiens_gene_ensembl database.
## Finished downloading ensembl go annotations, saving to hsapiens_go_annotations.rda.
## Saving ontologies to hsapiens_go_annotations.rda.
## Finished save().
if ("try-error" %in% class(hs_go)) {
hs_go <- NULL
}
hs_length <- hs_annot[, c("ensembl_gene_id", "cds_length")]
colnames(hs_length) <- c("ID", "length")
data_structures <- c(data_structures, "hs_length", "hs_go", "hs_annot")Before we do any of the following subsets/analyses of the data, we need to collect it all in one place. Let’s do that here and name it ‘hs_expt’, it will comprise the full set of human data. When we cull some samples it will be renamed to ‘hs_valid’.
The variable ‘data_structures’ will contain the names of every variable I create in this document which I wish to save to disk.
Similarly, the character vector ‘sanitize_columns’ is the list of metadata columns over which I will iterate and sanitize the data, removing any spurious spaces, capitalization, etc.
The primary function used is ‘create_expt()’, which is responsible for combining the metadata (from the first block of code), the gene annotations (from the 2nd/3rd), and count tables (included in the metadata as a column of filenames) into a single expressionset (Huber et al. (2015)). The sanitize_columns variable defines the metadata columns which will be explicitly sanitized beyond the general checks performed. ‘subset_genes()’ is responsible for including only the protein coding genes in the data; it records the amount of information lost to the metadata as column ‘ncrna_lost’. ‘sanitize_metadata()’ will perform some sanity checks of the metadata to ensure that excel did not do anything untoward to the metadata. The ’set_expt_*()’ functions modify the metadata to make it more friendly for future tasks, including setting some columns to factors, defining the column of interest vs. known surrogate(s). Finally, ‘subset_expt()’ is used to drop samples which are known to not be of interest, like the few samples from people who presented as healthy in the clinic (when the clinicalpresentation column of the metadata is ‘h’).
One note if anyone actually reads this, I have a sister function which creates summarizedExperiments (“SummarizedExperiment” (n.d.)) instead of expressionSets, and I think all of my code should move to that; but it just has not happened because I just haven’t had a chance to finish writing the tests and making whatever little changes would be required to get them to all pass. If my fictitious reader is interested, I would love help completing the switch from exprs->se.
sanitize_columns <- c("visitnumber", "finaloutcome", "donor",
"typeofcells", "clinicalpresentation", "drug",
"condition", "batch", "clinic")
hs_expt <- create_expt(samplesheet,
file_column = "hg38_100hisatfile",
savefile = glue("rda/tmrc3_hs_expt_all_raw-v{ver}.rda"),
gene_info = hs_annot) %>%
subset_genes(column = "gene_biotype", method = "keep",
pattern = "protein_coding", meta_column = "ncrna_lost") %>%
sanitize_expt_pData(columns = sanitize_columns) %>%
set_expt_factors(columns = sanitize_columns, class = "factor") %>%
set_expt_conditions(fact = "finaloutcome") %>%
set_expt_batches(fact = "visitnumber") %>%
subset_expt(subset = "typeofcells!='pbmcs'") %>%
subset_expt(subset = "typeofcells!='macrophages'") %>%
subset_expt(subset = "clinicalpresentation!='h'")## Reading the sample metadata.
## Did not find the column: sampleid.
## Setting the ID column to the first column.
## Dropped 69 rows from the sample metadata because the sample ID is blank.
## Warning in extract_metadata(metadata, id_column = id_column, ...): There were
## NA values in the condition column, setting them to 'undefined'.
## Warning in extract_metadata(metadata, id_column = id_column, ...): There were
## NA values in the condition column, setting them to 'undefined'.
## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'object' in selecting a method for function 'fData': error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'object' in selecting a method for function 'fData': character string is not in a standard unambiguous format
data_structures <- c(data_structures, "hs_expt")
## The following should make visit 1 the largest if one uses that column as a size factor when plotting.
meta <- pData(hs_expt) %>%
mutate(visitnumber = fct_relevel(visitnumber, c("3", "2", "1")))## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
start_order <- rownames(meta)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'rownames': object 'meta' not found
## Incorporate the identified strains
identified <- openxlsx::read.xlsx(species_identities)
no_data_idx <- identified[["Species"]] == "No hay dato"
identified <- identified[!no_data_idx, ]
identified <- identified[, c("Patient", "Species")]
colnames(identified) <- c("Patient", "ParasiteSpecies")
meta <- merge(meta, identified, by.x = "tubelabelorigin", by.y = "Patient", all.x = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'merge': object 'meta' not found
meta <- sanitize_metadata(meta, columns = "ParasiteSpecies", spaces = TRUE)## Error in eval(expr, envir, enclos): object 'meta' not found
## Note that the merge removes the rownames and maybe changes sample order.
rownames(meta) <- meta[["tmrcidentifier"]]## Error in eval(expr, envir, enclos): object 'meta' not found
meta <- meta[start_order, ]## Error in eval(expr, envir, enclos): object 'meta' not found
pData(hs_expt) <- meta## Error in eval(expr, envir, enclos): object 'meta' not found
save(list = "hs_expt", file = glue("rda/tmrc3_hs_expt_all_sanitized-v{ver}.rda"))## Error in save(list = "hs_expt", file = glue("rda/tmrc3_hs_expt_all_sanitized-v{ver}.rda")): object 'hs_expt' not found
There are some parameters provided by the clinicians which may prove to be of interest. I therefore am adding the demographics here. I will also run some simple checks to try to make sure that the clinician’s metadata agrees with the sample metadata.
In this first block, read the demographics and sanitize out the encoded NAs (999 and 888 or whatever) and add a column to join it to the sample sheet data.
hs_demographics <- openxlsx::read.xlsx(demographics)
hs_demographics[["join"]] <- tolower(hs_demographics[["Patient_ID"]])
columns_with_encoded_na <- c("Adherence_Glucantime", "Adherence_Miltefosine",
"Total_Ampules_Prescribed_Milt", "Prescribed_Daily_Dose_Milt",
"Total_Ampules_Prescribed_Gluc", "Prescribed_Daily_Dose_Gluc",
"V5_Total_Area_Ulcer", "V5_Vertical_Axis_Ulcer",
"V5_Horizontal_Axis_Ulcer", "V5_Total_Area_Lesion",
"V5_Vertical_Axis_Lesion", "V5_Horizontal_Axis_Lesion",
"V4_Total_Area_Ulcer", "V4_Vertical_Axis_Ulcer",
"V4_Horizontal_Axis_Ulcer", "V4_Total_Area_Lesion",
"V4_Vertical_Axis_Lesion", "V4_Horizontal_Axis_Lesion",
"V3_Total_Area_Ulcer", "V3_Vertical_Axis_Ulcer",
"V3_Horizontal_Axis_Ulcer", "V3_Total_Area_Lesion",
"V3_Vertical_Axis_Lesion", "V3_Horizontal_Axis_Lesion",
"V2_Total_Area_Ulcer", "V2_Vertical_Axis_Ulcer",
"V2_Horizontal_Axis_Ulcer", "V2_Total_Area_Lesion",
"V2_Vertical_Axis_Lesion", "V2_Horizontal_Axis_Lesion",
"V5_New_Lesions", "V4_New_Lesions", "V3_New_Lesions",
"V2_New_Lesions")
for (col in columns_with_encoded_na) {
na_idx <- hs_demographics[[col]] == 999
message("Column ", col, " contains ", sum(na_idx), " encoded NA values.")
hs_demographics[na_idx, col] <- NA
}## Column Adherence_Glucantime contains 5 encoded NA values.
## Column Adherence_Miltefosine contains 35 encoded NA values.
## Column Total_Ampules_Prescribed_Milt contains 35 encoded NA values.
## Column Prescribed_Daily_Dose_Milt contains 35 encoded NA values.
## Column Total_Ampules_Prescribed_Gluc contains 5 encoded NA values.
## Column Prescribed_Daily_Dose_Gluc contains 5 encoded NA values.
## Column V5_Total_Area_Ulcer contains 38 encoded NA values.
## Column V5_Vertical_Axis_Ulcer contains 38 encoded NA values.
## Column V5_Horizontal_Axis_Ulcer contains 38 encoded NA values.
## Column V5_Total_Area_Lesion contains 38 encoded NA values.
## Column V5_Vertical_Axis_Lesion contains 38 encoded NA values.
## Column V5_Horizontal_Axis_Lesion contains 38 encoded NA values.
## Column V4_Total_Area_Ulcer contains 35 encoded NA values.
## Column V4_Vertical_Axis_Ulcer contains 35 encoded NA values.
## Column V4_Horizontal_Axis_Ulcer contains 35 encoded NA values.
## Column V4_Total_Area_Lesion contains 35 encoded NA values.
## Column V4_Vertical_Axis_Lesion contains 35 encoded NA values.
## Column V4_Horizontal_Axis_Lesion contains 35 encoded NA values.
## Column V3_Total_Area_Ulcer contains 10 encoded NA values.
## Column V3_Vertical_Axis_Ulcer contains 10 encoded NA values.
## Column V3_Horizontal_Axis_Ulcer contains 10 encoded NA values.
## Column V3_Total_Area_Lesion contains 10 encoded NA values.
## Column V3_Vertical_Axis_Lesion contains 10 encoded NA values.
## Column V3_Horizontal_Axis_Lesion contains 10 encoded NA values.
## Column V2_Total_Area_Ulcer contains 4 encoded NA values.
## Column V2_Vertical_Axis_Ulcer contains 4 encoded NA values.
## Column V2_Horizontal_Axis_Ulcer contains 4 encoded NA values.
## Column V2_Total_Area_Lesion contains 4 encoded NA values.
## Column V2_Vertical_Axis_Lesion contains 4 encoded NA values.
## Column V2_Horizontal_Axis_Lesion contains 4 encoded NA values.
## Column V5_New_Lesions contains 21 encoded NA values.
## Column V4_New_Lesions contains 14 encoded NA values.
## Column V3_New_Lesions contains 4 encoded NA values.
## Column V2_New_Lesions contains 2 encoded NA values.
factor_columns <- c("Sex", "Ethnicity", "Infection_Location", "Previously_Diagnosed",
"Adverse_Effects_V3", "Adverse_Effects_V4", "Therapeutic_Outcome_V3",
"Therapeutic_Outcome_V4", "Therapeutic_Outcome_V5",
"Therapeutic_Outcome_Final")
for (col in factor_columns) {
hs_demographics[[col]] <- as.factor(hs_demographics[[col]])
}
## Extract the clinic from the patient id via a cheeseball regex.
hs_demographics[["Clinic"]] <- gsub(x = hs_demographics[["Patient_ID"]],
pattern = "^SU(\\d){1}.*$", replacement = "\\1")
data_structures <- c(data_structures, "hs_demographics")In the following we add a column ‘join’ analagous to that added to the demographics, this will be used to add the various columns across each person’s samples. I guess I could have done this with merge(all.x = TRUE, all.y = TRUE)
Some changes I made to enforce more consistent date management are causing problems. Notably, some columns are now getting set to the format ‘Date’, which cannot have strings like ‘undefined’.
hs_pd <- pData(hs_expt)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
hs_pd[["join"]] <- hs_pd[["tubelabelorigin"]]## Error in eval(expr, envir, enclos): object 'hs_pd' not found
hs_pd_demographics <- plyr::join(hs_pd, hs_demographics, by = "join")## Error in eval(expr, envir, enclos): object 'hs_pd' not found
rownames(hs_pd_demographics) <- rownames(hs_pd)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'rownames': object 'hs_pd' not found
na_idx <- is.na(hs_pd_demographics)## Error in eval(expr, envir, enclos): object 'hs_pd_demographics' not found
sum(na_idx)## [1] 2
hs_pd_demographics[na_idx] <- ""## Error: object 'hs_pd_demographics' not found
data_structures <- c(data_structures, "hs_pd_demographics")In addition we will create a series of composite variables from combinations of extant factors.
pData(hs_expt) <- hs_pd_demographics## Error in eval(expr, envir, enclos): object 'hs_pd_demographics' not found
## Now add in the ethnicity and sex
## Add a combination of the ethnicity and clinic
## While I am at it, do sex+clinic
table(pData(hs_expt)[["Sex"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
table(pData(hs_expt)[["Ethnicity"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
table(pData(hs_expt)[["clinic"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
etnia_names <- as.character(pData(hs_expt)[["Ethnicity"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
etnia_idx <- etnia_names == 1## Error in eval(expr, envir, enclos): object 'etnia_names' not found
etnia_names[etnia_idx] <- "afrocol"## Error: object 'etnia_names' not found
etnia_idx <- etnia_names == 2## Error in eval(expr, envir, enclos): object 'etnia_names' not found
etnia_names[etnia_idx] <- "indigena"## Error: object 'etnia_names' not found
etnia_idx <- etnia_names == 3## Error in eval(expr, envir, enclos): object 'etnia_names' not found
etnia_names[etnia_idx] <- "mestiza"## Error: object 'etnia_names' not found
pData(hs_expt)[["etnia"]] <- as.factor(etnia_names)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.factor': object 'etnia_names' not found
table(pData(hs_expt)[["etnia"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
table(pData(hs_expt)[["Ethnicity"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
etnia_factor <- paste0(pData(hs_expt)[["clinic"]], "_",
etnia_names)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
pData(hs_expt)[["clinic_etnia"]] <- as.factor(etnia_factor)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.factor': object 'etnia_factor' not found
table(pData(hs_expt)[["clinic_etnia"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
pData(hs_expt)[["sex"]] <- "female"## Error: object 'hs_expt' not found
male_idx <- pData(hs_expt)[["Sex"]] == 1## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
pData(hs_expt)[male_idx, "sex"] <- "male"## Error: object 'hs_expt' not found
pData(hs_expt)[["sex"]] <- as.factor(pData(hs_expt)[["sex"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.factor': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
sex_factor <- paste0(pData(hs_expt)[["clinic"]], "_",
pData(hs_expt)[["sex"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
pData(hs_expt)[["clinic_sex"]] <- as.factor(sex_factor)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.factor': object 'sex_factor' not found
table(pData(hs_expt)[["clinic_sex"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
pData(hs_expt)[["etnia_sex"]] <- paste0(pData(hs_expt)[["etnia"]], "_",
pData(hs_expt)[["sex"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
pData(hs_expt)[["etnia_sex"]] <- as.factor(pData(hs_expt)[["etnia_sex"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.factor': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
table(pData(hs_expt)[["etnia_sex"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
## Set a factor of samples which are visit 1 vs. 2/3.
v1_samples <- pData(hs_expt)[["visitnumber"]] == "1"## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
pData(hs_expt)[v1_samples, "visitbipart"] <- "v1"## Error: object 'hs_expt' not found
pData(hs_expt)[!v1_samples, "visitbipart"] <- "vother"## Error: object 'hs_expt' not found
table(pData(hs_expt)[["visitbipart"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
pData(hs_expt)[["cell_visit_cf"]] <- paste0(pData(hs_expt)[["typeofcells"]], "_",
pData(hs_expt)[["visitnumber"]], "_",
pData(hs_expt)[["finaloutcome"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
age_vector <- pData(hs_expt)[["Age"]]## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
pData(hs_expt)[["age_cat"]] <- make_quartile_factor(age_vector)## Error in eval(expr, envir, enclos): object 'age_vector' not found
save(list = "hs_expt", file = glue("rda/tmrc3_hs_expt_all_sanitized_demographics-v{ver}.rda"))## Error in save(list = "hs_expt", file = glue("rda/tmrc3_hs_expt_all_sanitized_demographics-v{ver}.rda")): object 'hs_expt' not found
Check to make sure the demographics agrees with the metadata. I really want this block to return NULL upon completion.
two_columns <- pData(hs_expt)[, c("finaloutcome", "Therapeutic_Outcome_Final")]## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
undef_idx <- two_columns[[2]] == "undefined"## Error in eval(expr, envir, enclos): object 'two_columns' not found
two_columns <- two_columns[!undef_idx, ]## Error in eval(expr, envir, enclos): object 'two_columns' not found
two_columns[["rewritten"]] <- "undef"## Error: object 'two_columns' not found
cure_idx <- two_columns[[2]] == 0## Error in eval(expr, envir, enclos): object 'two_columns' not found
two_columns[cure_idx, "rewritten"] <- "cure"## Error: object 'two_columns' not found
fail_idx <- two_columns[[2]] == 1## Error in eval(expr, envir, enclos): object 'two_columns' not found
two_columns[fail_idx, "rewritten"] <- "failure"## Error: object 'two_columns' not found
lost_idx <- two_columns[[2]] == 2## Error in eval(expr, envir, enclos): object 'two_columns' not found
two_columns[lost_idx, "rewritten"] <- "lost"## Error: object 'two_columns' not found
same_idx <- two_columns[["finaloutcome"]] == two_columns[["rewritten"]]## Error in eval(expr, envir, enclos): object 'two_columns' not found
broken <- two_columns[!same_idx, ]## Error in eval(expr, envir, enclos): object 'two_columns' not found
## I very much want the following line to evaluate to 0 rows.
broken## Error in eval(expr, envir, enclos): object 'broken' not found
There are some metadata factors for which I think it will be nice to see the numbers before and after our filters. The following shows how many samples we have of the primary types before filtering.
dim(pData(hs_expt))## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
table(pData(hs_expt)[["drug"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
table(pData(hs_expt)[["clinic"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
table(pData(hs_expt)[["finaloutcome"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
table(pData(hs_expt)[["typeofcells"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
table(pData(hs_expt)[["visitnumber"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
summary(as.numeric(pData(hs_expt)[["Evolution_Time"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
summary(as.numeric(pData(hs_expt)[["Prescribed_Daily_Dose_Gluc"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
summary(as.numeric(pData(hs_expt)[["V3_Vertical_Axis_Lesion"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
summary(as.numeric(pData(hs_expt)[["V3_Total_Area_Lesion"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
summary(as.numeric(pData(hs_expt)[["V3_Horizontal_Axis_Lesion"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
table(pData(hs_expt)[["sex"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
table(pData(hs_expt)[["etnia"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
table(pData(hs_expt)[["Ethnicity"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
summary(as.numeric(pData(hs_expt)[["Age"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
summary(pData(hs_expt)[["Weight"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
summary(pData(hs_expt)[["Height"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
table(pData(hs_expt)[["Therapeutic_Outcome_Final"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
table(pData(hs_expt)[["finaloutcome"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
unique(pData(hs_expt)[["Patient_ID"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'unique': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
length(unique(pData(hs_expt)[["Patient_ID"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'unique': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
Get the sex of the unique patients.
unique_people <- unique(pData(hs_expt)[["Patient_ID"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'unique': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
unique_people## Error in eval(expr, envir, enclos): object 'unique_people' not found
length(unique_people)## Error in eval(expr, envir, enclos): object 'unique_people' not found
df <- pData(hs_expt)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
people <- df[["Patient_ID"]]## Error in df[["Patient_ID"]]: object of type 'closure' is not subsettable
first_indices <- order(people)[!duplicated(sort(people))]## Error in eval(expr, envir, enclos): object 'people' not found
table(df[first_indices, "sex"])## Error in eval(expr, envir, enclos): object 'first_indices' not found
table(df[first_indices, "finaloutcome"])## Error in eval(expr, envir, enclos): object 'first_indices' not found
There are lots of ways which we will categorize the data, here are some potential color choices for them.
color_choices <- list(
"cf" = list(
"cure" = "#998EC3",
"failure" = "#F1A340"),
"cflost" = list(
"cure" = "#998EC3",
"failure" = "#F1A340",
"lost" = "#343434"),
"type_visit" = list(
"monocytes_v1" = "#DD1C77",
"monocytes_v2" = "#C994C7",
"monocytes_v3" = "#E7E1EF",
"eosinophils_v1" = "#31A354",
"eosinophils_v2" = "#ADDD8E",
"eosinophils_v3" = "#F7FCD9",
"neutrophils_v1" = "#3182BD",
"neutrophils_v2" = "#9ECAE1",
"neutrophils_v3" = "#DEEBF7",
"biopsy_v1" = "#D95F0E"),
"type" = list(
"monocytes" = "#DD1C77",
"eosinophils" = "#31A354",
"neutrophils" = "#3182BD",
"biopsy" = "#D95F0E"),
"two_visit" = list(
"first" = "#33EE33",
"later" = "#023302"),
"visit" = list(
"v1" = "#CCCCCC",
"v2" = "#666666",
"v3" = "#111111"),
"visit2" = list(
"1" = "#CCCCCC",
"2" = "#666666",
"3" = "#111111"),
"visitbi" = list(
"v1" = "#BB0000",
"vother" = "#0000BB"),
"labs" = list(
"Brazil" = "#FFC300",
"Colombia" = "#525252"),
"clinic" = list(
"tumaco" = "#3182AA",
"cali" = "#C994AA"),
"clinic_cf" = list(
"tumaco_cure" = "#7670B3",
"tumaco_failure" = "#E7298A",
"cali_cure" = "#1B9E77",
"cali_failure" = "#D95F02"),
"ethnicity" = list(
"afrocol" = "#4293CE",
"indigena" = "#BDBDBD",
"mestiza" = "#FEB24C"),
"clinic_etnia" = list(
"cali_afrocol" = "#3182BD",
"cali_indigena" = "#636363",
"cali_mestiza" = "#F03B20",
"tumaco_afrocol" = "#9ECAE1",
"tumaco_indigena" = "#BDBDBD",
"tumaco_mestiza" = "#FEB24C"),
"sex" = list(
"female" = "#3182BD",
"male" = "#C994C7"),
"clinic_sex" = list(
"cali_female" = "#0000CC",
"tumaco_female" = "#3182BD",
"cali_male" = "#E7298A",
"tumaco_male" = "#C994C7"),
"cf_type" = list(
"cure_biopsy" = "#D95F0E",
"failure_biopsy" = "#FEC44F",
"cure_monocytes" = "#DD1C77",
"failure_monocytes" = "#C994C7",
"cure_eosinophils" = "#31A354",
"failure_eosinophils" = "#ADDD8E",
"cure_neutrophils" = "#3182BD",
"failure_neutrophils" = "#9ECAE1"),
"parasite" = list(
"notapplicable" = "#000000",
"lvbraziliensis" = "#AA0000",
"lvguyanensis" = "#660066",
"lvpanamensis" = "#3160AC"))
data_structures <- c(data_structures, "color_choices")Given the starting point above, we will start extracting groups of samples of interest.
The first set of samples removed from the data are those with too many missing genes.
all_nz <- plot_nonzero(hs_expt)## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'plot_nonzero': object 'hs_expt' not found
pp(file = "figures/S2_nonzero_all_samples.svg")
all_nz$plot## Error in eval(expr, envir, enclos): object 'all_nz' not found
dev.off()## png
## 2
all_nz## Error in eval(expr, envir, enclos): object 'all_nz' not found
We should save a cpm and rpkm copy of the raw data for every subset in order to make it easier for folks to work with WGCNA and other tools (STRING).
dir.create("cpm/3_Cali_and_Tumaco", recursive = TRUE)
dir.create("rpkm")## Warning in dir.create("rpkm"): 'rpkm' already exists
cpm_data <- normalize_expt(hs_expt, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'hs_expt' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/3_Cali_and_Tumaco/all_samples-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(hs_expt, filter = TRUE, convert = "rpkm",
column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'hs_expt' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/hs_expt_rpkm-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
To my eyes, there are 3 or 4 samples which are likely candidates for removal. In addition, we will remove samples which were lost during the treatment and/or ones which were used in other experiments but included in the TMRC3 sample sheet (thus the ‘notapplicable’ or ‘null’).
I think this is stated elsewhere: variables prefixed with ‘tc’ are Tumaco and Cali; ‘t’ or ‘c’ correspond.
tc_nolost <- subset_expt(hs_expt, subset = "finaloutcome!='lost'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'hs_expt' not found
tc_nomilt <- subset_expt(tc_nolost, subset = "drug=='antimony'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_nolost' not found
plot_legend(tc_nomilt)## Error in eval(expr, envir, enclos): object 'tc_nomilt' not found
nomilt_nonzero <- plot_nonzero(tc_nomilt, plot_labels = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'plot_nonzero': object 'tc_nomilt' not found
nomilt_nonzero## Error in eval(expr, envir, enclos): object 'nomilt_nonzero' not found
pp(file = "figures/figs2_nonzero.svg")
nomilt_nonzero## Error in eval(expr, envir, enclos): object 'nomilt_nonzero' not found
dev.off()## png
## 2
tc_valid <- subset_expt(tc_nomilt, nonzero = 11000) %>%
set_expt_colors(colors = color_choices[["cf"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_nomilt' not found
save(list = "tc_valid", file = glue("rda/tmrc3_tc_valid-v{ver}.rda"))## Error in save(list = "tc_valid", file = glue("rda/tmrc3_tc_valid-v{ver}.rda")): object 'tc_valid' not found
data_structures <- c(data_structures, "tc_valid")clinic_type_outcome_sankey <- plot_meta_sankey(
tc_valid, factors = c("clinic", "typeofcells", "finaloutcome"),
drill_down = TRUE, color_choices = color_choices)## Error in h(simpleError(msg, call)): error in evaluating the argument 'design' in selecting a method for function 'plot_meta_sankey': object 'tc_valid' not found
clinic_type_outcome_sankey## Error in eval(expr, envir, enclos): object 'clinic_type_outcome_sankey' not found
clinic_ethnicity_outcome_sankey <- plot_meta_sankey(
tc_valid, factors = c("clinic", "etnia", "finaloutcome"),
drill_down = TRUE, color_choices = color_choices)## Error in h(simpleError(msg, call)): error in evaluating the argument 'design' in selecting a method for function 'plot_meta_sankey': object 'tc_valid' not found
clinic_ethnicity_outcome_sankey## Error in eval(expr, envir, enclos): object 'clinic_ethnicity_outcome_sankey' not found
clinic_sex_outcome_sankey <- plot_meta_sankey(
tc_valid, factors = c("clinic", "sex", "finaloutcome"),
drill_down = TRUE, color_choices = color_choices)## Error in h(simpleError(msg, call)): error in evaluating the argument 'design' in selecting a method for function 'plot_meta_sankey': object 'tc_valid' not found
clinic_sex_outcome_sankey## Error in eval(expr, envir, enclos): object 'clinic_sex_outcome_sankey' not found
The following plot is essentially identical to the previous with two exceptions:
nz_post <- plot_nonzero(tc_valid)## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'plot_nonzero': object 'tc_valid' not found
nz_post## Error in eval(expr, envir, enclos): object 'nz_post' not found
pp(file = "figures/figS2v2_post.svg")
nz_post## Error in eval(expr, envir, enclos): object 'nz_post' not found
dev.off()## png
## 2
We need to keep track of how many of each sample type is lost when we do our various filters. Thus I am repeating the same set of tallies. This will likely happen one more time, following the removal of samples which came from Cali.
table(pData(tc_valid)[["drug"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
table(pData(tc_valid)[["clinic"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
table(pData(tc_valid)[["finaloutcome"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
table(pData(tc_valid)[["typeofcells"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
table(pData(tc_valid)[["visit"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
summary(as.numeric(pData(tc_valid)[["Evolution_Time"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
summary(as.numeric(pData(tc_valid)[["Prescribed_Daily_Dose_Gluc"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
summary(as.numeric(pData(tc_valid)[["V3_Vertical_Axis_Lesion"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
summary(as.numeric(pData(tc_valid)[["V3_Total_Area_Lesion"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
summary(as.numeric(pData(tc_valid)[["V3_Horizontal_Axis_Ulcer"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
table(pData(tc_valid)[["sex"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
table(pData(tc_valid)[["etnia"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
summary(as.numeric(pData(tc_valid)[["Age"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
summary(pData(tc_valid)[["Weight"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
summary(pData(tc_valid)[["Height"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
length(unique(pData(tc_valid)[["Patient_ID"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'unique': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
When we perform the logistic/linear models examining variables in the demographics, we need to ensure that we are working with only the people who are included in the final dataset.
people_remaining <- unique(pData(tc_valid)[["Patient_ID"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'unique': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
demographics_filtered_idx <- hs_demographics[["Patient_ID"]] %in% people_remaining## Error in h(simpleError(msg, call)): error in evaluating the argument 'table' in selecting a method for function '%in%': object 'people_remaining' not found
demographics_filtered <- hs_demographics[demographics_filtered_idx, ]## Error in eval(expr, envir, enclos): object 'demographics_filtered_idx' not found
data_structures <- c(data_structures, "demographics_filtered")We now have two datasets which are comprised of only the cure/fail samples. It is worth considering if there are ways we can leverage this separation.
tc_cure <- subset_expt(tc_valid, subset = "finaloutcome=='cure'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_valid' not found
data_structures <- c(data_structures, "tc_cure")
table(pData(tc_cure)[["visitnumber"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_cure' not found
tc_fail <- subset_expt(tc_valid, subset = "finaloutcome=='failure'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_valid' not found
data_structures <- c(data_structures, "tc_fail")
table(pData(tc_fail)[["visitnumber"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_fail' not found
all_types <- table(pData(tc_valid)[["typeofcells"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
all_types## Error in eval(expr, envir, enclos): object 'all_types' not found
all_times <- table(pData(tc_valid)[["visitnumber"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
all_times## Error in eval(expr, envir, enclos): object 'all_times' not found
We completed the initial filter of the data. Write it out. This data should include all samples except those we explicitly removed due to poor coverage, lost-status, or non-canonical cell type (the pilot study).
cpm_data <- normalize_expt(tc_valid, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tc_valid' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/3_Cali_and_Tumaco/all_valid_samples-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tc_valid, filter = TRUE, convert = "rpkm",
column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tc_valid' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tc_all_valid_samples-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
Extract the samples of each cell type, these will be the basis for a significant number of the clinical outcome comparisons.
## Note, I will save these data structures in a little bit when I
## decide how I want to set the conditions, batches, and colors.
tc_eosinophils <- subset_expt(tc_valid, subset = "typeofcells=='eosinophils'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_valid' not found
tc_monocytes <- subset_expt(tc_valid, subset = "typeofcells=='monocytes'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_valid' not found
tc_neutrophils <- subset_expt(tc_valid, subset = "typeofcells=='neutrophils'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_valid' not found
The following writes out rpkm/cpm values for each celltype from both clinics(tc prefix).
cpm_data <- normalize_expt(tc_eosinophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tc_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/3_Cali_and_Tumaco/tc_eosinophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tc_eosinophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tc_eosinophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tc_eosinophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tc_monocytes, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tc_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/3_Cali_and_Tumaco/tc_monocytes-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tc_monocytes, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tc_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tc_monocytes-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tc_neutrophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tc_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/3_Cali_and_Tumaco/tc_neutrophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tc_neutrophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tc_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tc_neutrophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
The prefixes of the following datastructures state that these are from both clinics (tc) and a specific visit (v1/v2/v3). The rpkm/cpm values will be written immediately thereafter.
tcv1_samples <- subset_expt(tc_valid, subset = "visitnumber=='1'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_valid' not found
save(list = "tcv1_samples", file = glue("rda/tmrc3_tcv1_samples-v{ver}.rda"))## Error in save(list = "tcv1_samples", file = glue("rda/tmrc3_tcv1_samples-v{ver}.rda")): object 'tcv1_samples' not found
data_structures <- c(data_structures, "tcv1_samples")
tcv2_samples <- subset_expt(tc_valid, subset = "visitnumber=='2'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_valid' not found
save(list = "tcv2_samples", file = glue("rda/tmrc3_tcv2_samples-v{ver}.rda"))## Error in save(list = "tcv2_samples", file = glue("rda/tmrc3_tcv2_samples-v{ver}.rda")): object 'tcv2_samples' not found
data_structures <- c(data_structures, "tcv2_samples")
tcv3_samples <- subset_expt(tc_valid, subset = "visitnumber=='3'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_valid' not found
save(list = "tcv3_samples", file = glue("rda/tmrc3_tcv3_samples-v{ver}.rda"))## Error in save(list = "tcv3_samples", file = glue("rda/tmrc3_tcv3_samples-v{ver}.rda")): object 'tcv3_samples' not found
data_structures <- c(data_structures, "tcv3_samples")cpm_data <- normalize_expt(tcv1_samples, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tcv1_samples' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/3_Cali_and_Tumaco/tcv1_samples-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tcv1_samples, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tcv1_samples' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tcv1_samples-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tcv2_samples, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tcv2_samples' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/3_Cali_and_Tumaco/tcv2_samples-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tcv2_samples, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tcv2_samples' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tcv2_samples-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tcv3_samples, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tcv3_samples' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/3_Cali_and_Tumaco/tcv3_samples-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tcv3_samples, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tcv3_samples' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tcv3_samples-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
All data structures which start with the prefix ‘tc’ are Tumaco and Cali. Those with ‘t’ are only Tumaco, ‘c’ are only Cali.
tc_clinical <- tc_valid %>%
set_expt_conditions(fact = "finaloutcome", colors = color_choices[["cf"]]) %>%
set_expt_batches(fact = "typeofcells")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
save(list = "tc_clinical", file = glue("rda/tmrc3_tc_clinical-v{ver}.rda"))## Error in save(list = "tc_clinical", file = glue("rda/tmrc3_tc_clinical-v{ver}.rda")): object 'tc_clinical' not found
data_structures <- c(data_structures, "tc_clinical")For some of the following data structures, we will be concatenating various metadata factors of interest, usually the final outcome and one other metadatum.
In the following block I am writing out the Monocytes in a couple different ways, once with the clinical outcome as the primary factor, and again using the concatenation of clinic/outcome.
clinic_cf <- paste0(pData(tc_monocytes)[["clinic"]], "_",
pData(tc_monocytes)[["finaloutcome"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_monocytes' not found
table(clinic_cf)## Error in eval(expr, envir, enclos): object 'clinic_cf' not found
tc_monocytes <- set_expt_conditions(
tc_monocytes, fact = clinic_cf, colors = color_choices[["clinic_cf"]]) %>%
set_expt_batches(fact = "visitnumber")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_monocytes' not found
save(list = "tc_monocytes", file = glue("rda/tmrc3_tc_monocytes-v{ver}.rda"))## Error in save(list = "tc_monocytes", file = glue("rda/tmrc3_tc_monocytes-v{ver}.rda")): object 'tc_monocytes' not found
data_structures <- c(data_structures, "tc_monocytes")
tcv1_monocytes <- subset_expt(tc_monocytes, subset = "visitnumber=='1'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_monocytes' not found
save(list = "tcv1_monocytes", file = glue("rda/tmrc3_tcv1_monocytes-v{ver}.rda"))## Error in save(list = "tcv1_monocytes", file = glue("rda/tmrc3_tcv1_monocytes-v{ver}.rda")): object 'tcv1_monocytes' not found
data_structures <- c(data_structures, "tcv1_monocytes")
tcv2_monocytes <- subset_expt(tc_monocytes, subset = "visitnumber=='2'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_monocytes' not found
save(list = "tcv2_monocytes", file = glue("rda/tmrc3_tcv2_monocytes-v{ver}.rda"))## Error in save(list = "tcv2_monocytes", file = glue("rda/tmrc3_tcv2_monocytes-v{ver}.rda")): object 'tcv2_monocytes' not found
data_structures <- c(data_structures, "tcv2_monocytes")
tcv3_monocytes <- subset_expt(tc_monocytes, subset = "visitnumber=='3'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_monocytes' not found
save(list = "tcv3_monocytes", file = glue("rda/tmrc3_tcv3_monocytes-v{ver}.rda"))## Error in save(list = "tcv3_monocytes", file = glue("rda/tmrc3_tcv3_monocytes-v{ver}.rda")): object 'tcv3_monocytes' not found
data_structures <- c(data_structures, "tcv3_monocytes")… and the Eosinophils. These are noteworthy because they have fewer fails than some other cohorts.
clinic_cf <- paste0(pData(tc_eosinophils)[["clinic"]], "_",
pData(tc_eosinophils)[["finaloutcome"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_eosinophils' not found
table(clinic_cf)## Error in eval(expr, envir, enclos): object 'clinic_cf' not found
tc_eosinophils <- set_expt_conditions(
tc_eosinophils, fact = clinic_cf, colors = color_choices[["clinic_cf"]]) %>%
set_expt_batches(fact = "visitnumber")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_eosinophils' not found
save(list = "tc_eosinophils", file = glue("rda/tmrc3_tc_eosinophils-v{ver}.rda"))## Error in save(list = "tc_eosinophils", file = glue("rda/tmrc3_tc_eosinophils-v{ver}.rda")): object 'tc_eosinophils' not found
data_structures <- c(data_structures, "tc_eosinophils")
tcv1_eosinophils <- subset_expt(tc_eosinophils, subset = "visitnumber=='1'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_eosinophils' not found
save(list = "tcv1_eosinophils", file = glue("rda/tmrc3_tcv1_eosinophils-v{ver}.rda"))## Error in save(list = "tcv1_eosinophils", file = glue("rda/tmrc3_tcv1_eosinophils-v{ver}.rda")): object 'tcv1_eosinophils' not found
data_structures <- c(data_structures, "tcv1_eosinophils")
tcv2_eosinophils <- subset_expt(tc_eosinophils, subset = "visitnumber=='2'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_eosinophils' not found
save(list = "tcv2_eosinophils", file = glue("rda/tmrc3_tcv2_eosinophils-v{ver}.rda"))## Error in save(list = "tcv2_eosinophils", file = glue("rda/tmrc3_tcv2_eosinophils-v{ver}.rda")): object 'tcv2_eosinophils' not found
data_structures <- c(data_structures, "tcv2_eosinophils")
tcv3_eosinophils <- subset_expt(tc_eosinophils, subset = "visitnumber=='3'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_eosinophils' not found
save(list = "tcv3_eosinophils", file = glue("rda/tmrc3_tcv3_eosinophils-v{ver}.rda"))## Error in save(list = "tcv3_eosinophils", file = glue("rda/tmrc3_tcv3_eosinophils-v{ver}.rda")): object 'tcv3_eosinophils' not found
data_structures <- c(data_structures, "tcv3_eosinophils")Followed by the Biopsy samples…
tc_clinical_nobiop <- subset_expt(tc_clinical, subset = "typeofcells!='biopsy'") %>%
set_expt_colors(color_choices[["cf"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_clinical' not found
save(list = "tc_clinical_nobiop", file = glue("rda/tmrc3_tc_clinical_nobiop-v{ver}.rda"))## Error in save(list = "tc_clinical_nobiop", file = glue("rda/tmrc3_tc_clinical_nobiop-v{ver}.rda")): object 'tc_clinical_nobiop' not found
data_structures <- c(data_structures, "tc_clinical_nobiop")
tc_biopsies <- tc_valid %>%
set_expt_conditions(fact = "clinic") %>%
set_expt_batches(fact = "finaloutcome") %>%
subset_expt(subset = "typeofcells=='biopsy'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
tc_cf <- paste0(pData(tc_biopsies)[["clinic"]], "_",
pData(tc_biopsies)[["finaloutcome"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_biopsies' not found
table(tc_cf)## Error in eval(expr, envir, enclos): object 'tc_cf' not found
tc_biopsies <- set_expt_conditions(
tc_biopsies, fact = tc_cf, colors = color_choices[["clinic_cf"]]) %>%
set_expt_batches(fact = "visitnumber")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_biopsies' not found
save(list = "tc_biopsies", file = glue("rda/tmrc3_tc_biopsies-v{ver}.rda"))## Error in save(list = "tc_biopsies", file = glue("rda/tmrc3_tc_biopsies-v{ver}.rda")): object 'tc_biopsies' not found
data_structures <- c(data_structures, "tc_biopsies")Followed by the Neutrophils…
clinic_cf <- paste0(pData(tc_neutrophils)[["clinic"]], "_",
pData(tc_neutrophils)[["finaloutcome"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_neutrophils' not found
table(clinic_cf)## Error in eval(expr, envir, enclos): object 'clinic_cf' not found
tc_neutrophils <- set_expt_conditions(
tc_neutrophils, fact = clinic_cf, colors = color_choices[["clinic_cf"]]) %>%
set_expt_batches(fact = "visitnumber")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_neutrophils' not found
save(list = "tc_neutrophils", file = glue("rda/tmrc3_tc_neutrophils-v{ver}.rda"))## Error in save(list = "tc_neutrophils", file = glue("rda/tmrc3_tc_neutrophils-v{ver}.rda")): object 'tc_neutrophils' not found
data_structures <- c(data_structures, "tc_neutrophils")
tcv1_neutrophils <- subset_expt(tc_neutrophils, subset = "visitnumber=='1'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_neutrophils' not found
save(list = "tcv1_neutrophils", file = glue("rda/tmrc3_tcv1_neutrophils-v{ver}.rda"))## Error in save(list = "tcv1_neutrophils", file = glue("rda/tmrc3_tcv1_neutrophils-v{ver}.rda")): object 'tcv1_neutrophils' not found
data_structures <- c(data_structures, "tcv1_neutrophils")
tcv2_neutrophils <- subset_expt(tc_neutrophils, subset = "visitnumber=='2'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_neutrophils' not found
save(list = "tcv2_neutrophils", file = glue("rda/tmrc3_tcv2_neutrophils-v{ver}.rda"))## Error in save(list = "tcv2_neutrophils", file = glue("rda/tmrc3_tcv2_neutrophils-v{ver}.rda")): object 'tcv2_neutrophils' not found
data_structures <- c(data_structures, "tcv2_neutrophils")
tcv3_neutrophils <- subset_expt(tc_neutrophils, subset = "visitnumber=='3'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_neutrophils' not found
save(list = "tcv3_neutrophils", file = glue("rda/tmrc3_tcv3_neutrophils-v{ver}.rda"))## Error in save(list = "tcv3_neutrophils", file = glue("rda/tmrc3_tcv3_neutrophils-v{ver}.rda")): object 'tcv3_neutrophils' not found
data_structures <- c(data_structures, "tcv3_neutrophils")tc_sex <- set_expt_conditions(tc_valid, fact = "sex", colors = color_choices[["sex"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_valid' not found
save(list = "tc_sex", file = glue("rda/tmrc3_tc_sex-v{ver}.rda"))## Error in save(list = "tc_sex", file = glue("rda/tmrc3_tc_sex-v{ver}.rda")): object 'tc_sex' not found
data_structures <- c(data_structures, "tc_sex")Our recent discussions have settled one big question regarding which samples to use: We will limit our analyses to only those samples from Tumaco.
The following block will therefore set that group as our default for future analyses. We will essentially repeat all of the above sample separations for the Tumaco-only cohort.
t_clinical <- tc_clinical %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_clinical' not found
save(list = "t_clinical", file = glue("rda/tmrc3_t_clinical-v{ver}.rda"))## Error in save(list = "t_clinical", file = glue("rda/tmrc3_t_clinical-v{ver}.rda")): object 't_clinical' not found
data_structures <- c(data_structures, "t_clinical")
cpm_data <- normalize_expt(t_clinical, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_clinical' not found
t_clinical_cpm_variance <- variance_expt(cpm_data)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cpm_data' not found
## Add variance by gene for all samples excluding biopsies (I assume also excluding Cali).
## This is intended to address a query from Maria Adelaida on 20230111written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/t_clinical-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(t_clinical, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_clinical' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/t_clinical-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(t_clinical, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_clinical' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/t_clinical_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(t_clinical, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_clinical' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/t_clinical_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
written_expt <- write_expt(
t_clinical,
excel = glue("excel/t_clinical-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'exprs': object 't_clinical' not found
dir.create("cpm/4_Tumaco", recursive = TRUE)
t_clinical_nobiop <- subset_expt(t_clinical, subset = "typeofcells!='biopsy'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 't_clinical' not found
save(list = "t_clinical_nobiop", file = glue("rda/tmrc3_t_clinical_nobiop-v{ver}.rda"))## Error in save(list = "t_clinical_nobiop", file = glue("rda/tmrc3_t_clinical_nobiop-v{ver}.rda")): object 't_clinical_nobiop' not found
data_structures <- c(data_structures, "t_clinical_nobiop")
cpm_data <- normalize_expt(t_clinical_nobiop, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_clinical_nobiop' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/t_clinical_nobiop-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(t_clinical, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_clinical' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/t_clinical_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(t_clinical_nobiop, convert = "cpm",
filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_clinical_nobiop' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/t_clinical_nobiop_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(t_clinical_nobiop, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_clinical_nobiop' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/t_clinical_nobiop_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
I added a few columns to the gene annotations reflecting the variance/stdev/mean expression of each gene. This really highlights the extraordinary degree to which genes are changing in the data…
top_expt <- normalize_expt(t_clinical_cpm_variance, filter = TRUE) %>%
variance_expt()## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_clinical_cpm_variance' not found
top_fd <- fData(top_expt)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'fData': object 'top_expt' not found
top_ex <- exprs(top_expt)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'top_expt' not found
idx <- order(top_fd[["exprs_gene_stdev"]], decreasing = TRUE)## Error in eval(expr, envir, enclos): object 'top_fd' not found
top_df <- top_fd[idx, ]## Error in eval(expr, envir, enclos): object 'top_fd' not found
written <- write_xlsx(
data = head(top_fd, n = 100),
excel = glue("excel/t_clinical_cpm_stdev_top100-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'x' in selecting a method for function 'head': object 'top_fd' not found
bottom_expt <- normalize_expt(t_clinical_cpm_variance, filter = "simple", threshold = 500) %>%
variance_expt()## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_clinical_cpm_variance' not found
bottom_fd <- fData(bottom_expt)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'fData': object 'bottom_expt' not found
bottom_ex <- exprs(bottom_expt)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'bottom_expt' not found
idx <- order(bottom_fd[["exprs_gene_stdev"]])## Error in eval(expr, envir, enclos): object 'bottom_fd' not found
bottom <- bottom_fd[idx, ]## Error in eval(expr, envir, enclos): object 'bottom_fd' not found
written <- write_xlsx(
data = head(bottom_fd, n = 100),
excel = glue("excel/t_clinical_cpm_stdev_bottom100-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'x' in selecting a method for function 'head': object 'bottom_fd' not found
At least in theory, everything which follows will be using the above ‘clinical’ data structure. Thus, let us count it up and get a sense of what we will work with.
table(pData(t_clinical)[["drug"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
table(pData(t_clinical)[["clinic"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
table(pData(t_clinical)[["finaloutcome"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
table(pData(t_clinical)[["typeofcells"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
table(pData(t_clinical)[["visitnumber"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
summary(pData(t_clinical)[["Evolution_Time"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
summary(pData(t_clinical)[["Prescribed_Daily_Dose_Gluc"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
summary(pData(t_clinical)[["V3_Vertical_Axis_Lesion"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
summary(pData(t_clinical)[["V3_Total_Area_Lesion"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
summary(pData(t_clinical)[["V3_Horizontal_Axis_Ulcer"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
table(pData(t_clinical)[["Sex"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
table(pData(t_clinical)[["Ethnicity"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
summary(pData(t_clinical)[["Age"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
summary(pData(t_clinical)[["Weight"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
table(pData(t_clinical)[["Height"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
length(unique(pData(t_clinical)[["Patient_ID"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'unique': error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
only_cure <- pData(t_clinical)[["finaloutcome"]] == "cure"## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
c_meta <- pData(t_clinical)[only_cure, ]## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
length(unique(c_meta[["Patient_ID"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'unique': object 'c_meta' not found
only_fail <- pData(t_clinical)[["finaloutcome"]] == "failure"## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
f_meta <- pData(t_clinical)[only_fail, ]## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
length(unique(f_meta[["Patient_ID"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'unique': object 'f_meta' not found
t_cure <- subset_expt(t_clinical, subset = "finaloutcome=='cure'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 't_clinical' not found
table(pData(t_cure)$visitnumber)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_cure' not found
t_fail <- subset_expt(t_clinical, subset = "finaloutcome=='failure'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 't_clinical' not found
table(pData(t_fail)$visitnumber)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_fail' not found
I previously made a bunch of data subsets by visit, cell type, etc. So let us overwrite them all with versions which contain only the Tumaco samples.
The is a copy of the cell type extractions above, except we lead off with the removal of the Cali samples.
t_biopsies <- tc_biopsies %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_biopsies' not found
save(list = "t_biopsies", file = glue("rda/tmrc3_t_biopsies-v{ver}.rda"))## Error in save(list = "t_biopsies", file = glue("rda/tmrc3_t_biopsies-v{ver}.rda")): object 't_biopsies' not found
data_structures <- c(data_structures, "t_biopsies")
cpm_data <- normalize_expt(t_biopsies, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_biopsies' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/t_biopsies-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(t_biopsies, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_biopsies' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/t_biopsies-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(t_biopsies, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_biopsies' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/t_biopsies_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
t_eosinophils <- tc_eosinophils %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_eosinophils' not found
save(list = "t_eosinophils", file = glue("rda/tmrc3_t_eosinophils-v{ver}.rda"))## Error in save(list = "t_eosinophils", file = glue("rda/tmrc3_t_eosinophils-v{ver}.rda")): object 't_eosinophils' not found
data_structures <- c(data_structures, "t_eosinophils")
cpm_data <- normalize_expt(t_eosinophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/t_eosinophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
cpm_data <- normalize_expt(t_eosinophils, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/t_eosinophils_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(t_eosinophils, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_eosinophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/t_eosinophils_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
t_monocytes <- tc_monocytes %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_monocytes' not found
save(list = "t_monocytes", file = glue("rda/tmrc3_t_monocytes-v{ver}.rda"))## Error in save(list = "t_monocytes", file = glue("rda/tmrc3_t_monocytes-v{ver}.rda")): object 't_monocytes' not found
data_structures <- c(data_structures, "t_monocytes")
cpm_data <- normalize_expt(t_monocytes, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/t_monocytes-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(t_monocytes, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/t_monocytes-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(t_monocytes, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/t_monocytes_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(t_monocytes, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/t_monocytes_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
t_neutrophils <- tc_neutrophils %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_neutrophils' not found
save(list = "t_neutrophils", file = glue("rda/tmrc3_t_neutrophils-v{ver}.rda"))## Error in save(list = "t_neutrophils", file = glue("rda/tmrc3_t_neutrophils-v{ver}.rda")): object 't_neutrophils' not found
data_structures <- c(data_structures, "t_neutrophils")
cpm_data <- normalize_expt(t_neutrophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/t_neutrophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(t_neutrophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/t_neutrophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(t_neutrophils, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/t_neutrophils_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(t_neutrophils, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/t_neutrophils_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
tv1_samples <- tcv1_samples %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv1_samples' not found
save(list = "tv1_samples", file = glue("rda/tmrc3_tv1_samples-v{ver}.rda"))## Error in save(list = "tv1_samples", file = glue("rda/tmrc3_tv1_samples-v{ver}.rda")): object 'tv1_samples' not found
data_structures <- c(data_structures, "tv1_samples")
cpm_data <- normalize_expt(tv1_samples, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_samples' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv1_samples-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv1_samples, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_samples' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv1_samples-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tv1_samples, convert="cpm", filter=TRUE, batch="svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_samples' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv1_samples_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv1_samples, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_samples' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv1_samples_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
tv2_samples <- tcv2_samples %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv2_samples' not found
save(list = "tv2_samples", file = glue("rda/tmrc3_tv2_samples-v{ver}.rda"))## Error in save(list = "tv2_samples", file = glue("rda/tmrc3_tv2_samples-v{ver}.rda")): object 'tv2_samples' not found
data_structures <- c(data_structures, "tv2_samples")
cpm_data <- normalize_expt(tv2_samples, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_samples' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv2_samples-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv2_samples, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_samples' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv2_samples-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tv2_samples, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_samples' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv2_samples_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv2_samples, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_samples' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv2_samples_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
tv3_samples <- tcv3_samples %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv3_samples' not found
save(list = "tv3_samples", file = glue("rda/tmrc3_tv3_samples-v{ver}.rda"))## Error in save(list = "tv3_samples", file = glue("rda/tmrc3_tv3_samples-v{ver}.rda")): object 'tv3_samples' not found
data_structures <- c(data_structures, "tv3_samples")
cpm_data <- normalize_expt(tv3_samples, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_samples' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv3_samples-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv3_samples, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_samples' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv3_samples-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tv3_samples, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_samples' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv3_samples_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv3_samples, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_samples' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv3_samples_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
tv1_eosinophils <- tcv1_eosinophils %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv1_eosinophils' not found
save(list = "tv1_eosinophils", file = glue("rda/tmrc3_tv1_eosinophils-v{ver}.rda"))## Error in save(list = "tv1_eosinophils", file = glue("rda/tmrc3_tv1_eosinophils-v{ver}.rda")): object 'tv1_eosinophils' not found
data_structures <- c(data_structures, "tv1_eosinophils")
cpm_data <- normalize_expt(tv1_eosinophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv1_eosinophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv1_eosinophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_eosinophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv1_eosinophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tv1_eosinophils, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv1_eosinophils_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv1_eosinophils, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_eosinophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv1_eosinophils_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
tv2_eosinophils <- tcv2_eosinophils %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv2_eosinophils' not found
save(list = "tv2_eosinophils", file = glue("rda/tmrc3_tv2_eosinophils-v{ver}.rda"))## Error in save(list = "tv2_eosinophils", file = glue("rda/tmrc3_tv2_eosinophils-v{ver}.rda")): object 'tv2_eosinophils' not found
data_structures <- c(data_structures, "tv2_eosinophils")
cpm_data <- normalize_expt(tv2_eosinophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv2_eosinophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv2_eosinophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_eosinophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv2_eosinophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tv2_eosinophils, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv2_eosinophils_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv2_eosinophils, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_eosinophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv2_eosinophils_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
tv3_eosinophils <- tcv3_eosinophils %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv3_eosinophils' not found
save(list = "tv3_eosinophils", file = glue("rda/tmrc3_tv3_eosinophils-v{ver}.rda"))## Error in save(list = "tv3_eosinophils", file = glue("rda/tmrc3_tv3_eosinophils-v{ver}.rda")): object 'tv3_eosinophils' not found
data_structures <- c(data_structures, "tv3_eosinophils")
cpm_data <- normalize_expt(tv3_eosinophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv3_eosinophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv3_eosinophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_eosinophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv3_eosinophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tv3_eosinophils, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv3_eosinophils_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
## Note, the cbcb filter left behind a sufficient number of zeros that it confused cpm.
rpkm_data <- normalize_expt(tv3_eosinophils, filter = "simple", batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_eosinophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv3_eosinophils_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
tv1_monocytes <- tcv1_monocytes %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv1_monocytes' not found
save(list = "tv1_monocytes", file = glue("rda/tmrc3_tv1_monocytes-v{ver}.rda"))## Error in save(list = "tv1_monocytes", file = glue("rda/tmrc3_tv1_monocytes-v{ver}.rda")): object 'tv1_monocytes' not found
data_structures <- c(data_structures, "tv1_monocytes")
cpm_data <- normalize_expt(tv1_monocytes, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv1_monocytes-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv1_monocytes, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv1_monocytes-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tv1_monocytes, convert="cpm", filter=TRUE, batch="svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv1_monocytes_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv1_monocytes, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv1_monocytes_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
tv2_monocytes <- tcv2_monocytes %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv2_monocytes' not found
save(list = "tv2_monocytes", file = glue("rda/tmrc3_tv2_monocytes-v{ver}.rda"))## Error in save(list = "tv2_monocytes", file = glue("rda/tmrc3_tv2_monocytes-v{ver}.rda")): object 'tv2_monocytes' not found
data_structures <- c(data_structures, "tv2_monocytes")
cpm_data <- normalize_expt(tv2_monocytes, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv2_monocytes-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv2_monocytes, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv2_monocytes-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tv2_monocytes, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv2_monocytes_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv2_monocytes, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv2_monocytes_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
tv3_monocytes <- tcv3_monocytes %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv3_monocytes' not found
save(list = "tv3_monocytes", file = glue("rda/tmrc3_tv3_monocytes-v{ver}.rda"))## Error in save(list = "tv3_monocytes", file = glue("rda/tmrc3_tv3_monocytes-v{ver}.rda")): object 'tv3_monocytes' not found
data_structures <- c(data_structures, "tv3_monocytes")
cpm_data <- normalize_expt(tv3_monocytes, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv3_monocytes-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv3_monocytes, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv3_monocytes-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tv3_monocytes, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv3_monocytes_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv3_monocytes, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv3_monocytes_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
tv1_neutrophils <- tcv1_neutrophils %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv1_neutrophils' not found
save(list = "tv1_neutrophils", file = glue("rda/tmrc3_tv1_neutrophils-v{ver}.rda"))## Error in save(list = "tv1_neutrophils", file = glue("rda/tmrc3_tv1_neutrophils-v{ver}.rda")): object 'tv1_neutrophils' not found
data_structures <- c(data_structures, "tv1_neutrophils")
cpm_data <- normalize_expt(tv1_neutrophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv1_neutrophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv1_neutrophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv1_neutrophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tv1_neutrophils, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv1_neutrophils_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv1_neutrophils, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv1_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv1_neutrophils_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
tv2_neutrophils <- tcv2_neutrophils %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv2_neutrophils' not found
save(list = "tv2_neutrophils", file = glue("rda/tmrc3_tv2_neutrophils-v{ver}.rda"))## Error in save(list = "tv2_neutrophils", file = glue("rda/tmrc3_tv2_neutrophils-v{ver}.rda")): object 'tv2_neutrophils' not found
data_structures <- c(data_structures, "tv2_neutrophils")
cpm_data <- normalize_expt(tv2_neutrophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv2_neutrophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv2_neutrophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv2_neutrophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tv2_neutrophils, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv2_neutrophils_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv2_neutrophils, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv2_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv2_neutrophils_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
tv3_neutrophils <- tcv3_neutrophils %>%
subset_expt(subset = "clinic=='tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv3_neutrophils' not found
save(list = "tv3_neutrophils", file = glue("rda/tmrc3_tv3_neutrophils-v{ver}.rda"))## Error in save(list = "tv3_neutrophils", file = glue("rda/tmrc3_tv3_neutrophils-v{ver}.rda")): object 'tv3_neutrophils' not found
data_structures <- c(data_structures, "tv3_neutrophils")
cpm_data <- normalize_expt(tv3_neutrophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv3_neutrophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv3_neutrophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv3_neutrophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(tv3_neutrophils, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/tv3_neutrophils_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(tv3_neutrophils, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tv3_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/tv3_neutrophils_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
Even though we are only considering the Tumaco samples, one might wish to perform comparisons among the Cali samples. The following blocks therefore separate them out in a similar fashion.
dir.create("cpm/4_Cali", recursive = TRUE)
c_clinical <- tc_clinical %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_clinical' not found
save(list = "c_clinical", file = glue("rda/tmrc3_c_clinical-v{ver}.rda"))## Error in save(list = "c_clinical", file = glue("rda/tmrc3_c_clinical-v{ver}.rda")): object 'c_clinical' not found
data_structures <- c(data_structures, "c_clinical")
cpm_data <- normalize_expt(c_clinical, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_clinical' not found
c_clinical_cpm_variance <- variance_expt(cpm_data)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cpm_data' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/c_clinical-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(c_clinical, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_clinical' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/t_clinical-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(c_clinical, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_clinical' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/c_clinical_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(c_clinical, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_clinical' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/c_clinical_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
The Cali samples without biopsies.
c_clinical_nobiop <- subset_expt(c_clinical, subset = "typeofcells!='biopsy'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'c_clinical' not found
save(list = "c_clinical_nobiop", file = glue("rda/tmrc3_c_clinical_nobiop-v{ver}.rda"))## Error in save(list = "c_clinical_nobiop", file = glue("rda/tmrc3_c_clinical_nobiop-v{ver}.rda")): object 'c_clinical_nobiop' not found
data_structures <- c(data_structures, "c_clinical_nobiop")
cpm_data <- normalize_expt(c_clinical_nobiop, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_clinical_nobiop' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/c_clinical_nobiop-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(c_clinical, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_clinical' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/c_clinical_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(c_clinical_nobiop, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_clinical_nobiop' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/c_clinical_nobiop_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(c_clinical_nobiop, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_clinical_nobiop' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/c_clinical_nobiop_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
I added a few columns to the gene annotations reflecting the variance/stdev/mean expression of each gene. This really highlights the extraordinary degree to which genes are changing in the data…
top_expt <- normalize_expt(c_clinical_cpm_variance, filter = TRUE) %>%
variance_expt()## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_clinical_cpm_variance' not found
top_fd <- fData(top_expt)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'fData': object 'top_expt' not found
top_ex <- exprs(top_expt)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'top_expt' not found
idx <- order(top_fd[["exprs_gene_stdev"]], decreasing = TRUE)## Error in eval(expr, envir, enclos): object 'top_fd' not found
top_df <- top_fd[idx, ]## Error in eval(expr, envir, enclos): object 'top_fd' not found
written <- write_xlsx(
data = head(top_fd, n = 100),
excel = glue("excel/c_clinical_cpm_stdev_top100-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'x' in selecting a method for function 'head': object 'top_fd' not found
bottom_expt <- normalize_expt(c_clinical_cpm_variance, filter = "simple", threshold = 500) %>%
variance_expt()## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_clinical_cpm_variance' not found
bottom_fd <- fData(bottom_expt)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'fData': object 'bottom_expt' not found
bottom_ex <- exprs(bottom_expt)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'bottom_expt' not found
idx <- order(bottom_fd[["exprs_gene_stdev"]])## Error in eval(expr, envir, enclos): object 'bottom_fd' not found
bottom <- bottom_fd[idx, ]## Error in eval(expr, envir, enclos): object 'bottom_fd' not found
written <- write_xlsx(
data = head(bottom_fd, n = 100),
excel = glue("excel/c_clinical_cpm_stdev_bottom100-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'x' in selecting a method for function 'head': object 'bottom_fd' not found
This is copy/pasted from above and prints out how many of each sample type there are of each category.
table(pData(c_clinical)[["drug"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
table(pData(c_clinical)[["clinic"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
table(pData(c_clinical)[["finaloutcome"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
table(pData(c_clinical)[["typeofcells"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
table(pData(c_clinical)[["visitnumber"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
summary(pData(c_clinical)[["Evolution_Time"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
summary(pData(c_clinical)[["Prescribed_Daily_Dose_Gluc"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
summary(pData(c_clinical)[["V3_Vertical_Axis_Lesion"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
summary(pData(c_clinical)[["V3_Total_Area_Lesion"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
summary(pData(c_clinical)[["V3_Horizontal_Axis_Ulcer"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
table(pData(c_clinical)[["Sex"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
table(pData(c_clinical)[["Ethnicity"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
summary(pData(c_clinical)[["Age"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
summary(pData(c_clinical)[["Height"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
summary(pData(c_clinical)[["Weight"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
length(unique(pData(c_clinical)[["Patient_ID"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'unique': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
only_cure <- pData(c_clinical)[["finaloutcome"]] == "cure"## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
c_meta <- pData(c_clinical)[only_cure, ]## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
length(unique(c_meta[["Patient_ID"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'unique': object 'c_meta' not found
only_fail <- pData(c_clinical)[["finaloutcome"]] == "failure"## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
f_meta <- pData(c_clinical)[only_fail, ]## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
length(unique(f_meta[["Patient_ID"]]))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'unique': object 'f_meta' not found
cali_cure <- subset_expt(c_clinical, subset = "finaloutcome=='cure'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'c_clinical' not found
table(pData(cali_cure)[["visitnumber"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cali_cure' not found
cali_fail <- subset_expt(c_clinical, subset = "finaloutcome=='failure'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'c_clinical' not found
table(pData(cali_fail)[["visitnumber"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cali_fail' not found
I previously made a bunch of data subsets by visit, cell type, etc. So let us overwrite them all with versions which contain only the Cali samples.
There is no going back to the Cali samples after this block unless we regenerate the data from the original expressionsets.
c_biopsies <- tc_biopsies %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_biopsies' not found
save(list = "c_biopsies", file = glue("rda/tmrc3_c_biopsies-v{ver}.rda"))## Error in save(list = "c_biopsies", file = glue("rda/tmrc3_c_biopsies-v{ver}.rda")): object 'c_biopsies' not found
data_structures <- c(data_structures, "c_biopsies")
cpm_data <- normalize_expt(c_biopsies, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_biopsies' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/c_biopsies-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(c_biopsies, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_biopsies' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/c_biopsies-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(c_biopsies, convert = "cpm", filter = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_biopsies' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/c_biopsies_nosva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
c_eosinophils <- tc_eosinophils %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_eosinophils' not found
save(list = "c_eosinophils", file = glue("rda/tmrc3_c_eosinophils-v{ver}.rda"))## Error in save(list = "c_eosinophils", file = glue("rda/tmrc3_c_eosinophils-v{ver}.rda")): object 'c_eosinophils' not found
data_structures <- c(data_structures, "c_eosinophils")
cpm_data <- normalize_expt(c_eosinophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/c_eosinophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
cpm_data <- normalize_expt(c_eosinophils, convert = "cpm", filter = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/c_eosinophils_nosva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(c_eosinophils, filter = TRUE) %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_eosinophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/c_eosinophils_nosva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
c_monocytes <- tc_monocytes %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_monocytes' not found
save(list = "c_monocytes", file = glue("rda/tmrc3_c_monocytes-v{ver}.rda"))## Error in save(list = "c_monocytes", file = glue("rda/tmrc3_c_monocytes-v{ver}.rda")): object 'c_monocytes' not found
data_structures <- c(data_structures, "c_monocytes")
cpm_data <- normalize_expt(c_monocytes, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/c_monocytes-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(c_monocytes, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/c_monocytes-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(c_monocytes, convert = "cpm", filter = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/c_monocytes_nosva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(c_monocytes, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/c_monocytes_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
c_neutrophils <- tc_neutrophils %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_neutrophils' not found
save(list = "c_neutrophils", file = glue("rda/tmrc3_c_neutrophils-v{ver}.rda"))## Error in save(list = "c_neutrophils", file = glue("rda/tmrc3_c_neutrophils-v{ver}.rda")): object 'c_neutrophils' not found
data_structures <- c(data_structures, "c_neutrophils")
cpm_data <- normalize_expt(c_neutrophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/c_neutrophil-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(c_neutrophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/c_neutrophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(c_neutrophils, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/c_neutrophils_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(c_neutrophils, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/c_neutrophils_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cv1_samples <- tcv1_samples %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv1_samples' not found
save(list = "cv1_samples", file = glue("rda/tmrc3_cv1_samples-v{ver}.rda"))## Error in save(list = "cv1_samples", file = glue("rda/tmrc3_cv1_samples-v{ver}.rda")): object 'cv1_samples' not found
data_structures <- c(data_structures, "cv1_samples")
cpm_data <- normalize_expt(cv1_samples, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_samples' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv1_samples-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv1_samples, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_samples' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv1_samples-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(cv1_samples, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_samples' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv1_samples_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv1_samples, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_samples' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv1_samples_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cv2_samples <- tcv2_samples %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv2_samples' not found
save(list = "cv2_samples", file = glue("rda/tmrc3_cv2_samples-v{ver}.rda"))## Error in save(list = "cv2_samples", file = glue("rda/tmrc3_cv2_samples-v{ver}.rda")): object 'cv2_samples' not found
data_structures <- c(data_structures, "cv2_samples")
cpm_data <- normalize_expt(cv2_samples, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_samples' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv2_samples-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv2_samples, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_samples' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv2_samples-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(cv2_samples, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_samples' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv2_samples_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv2_samples, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_samples' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv2_samples_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cv3_samples <- tcv3_samples %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv3_samples' not found
save(list = "cv3_samples", file = glue("rda/tmrc3_cv3_samples-v{ver}.rda"))## Error in save(list = "cv3_samples", file = glue("rda/tmrc3_cv3_samples-v{ver}.rda")): object 'cv3_samples' not found
data_structures <- c(data_structures, "cv3_samples")
cpm_data <- normalize_expt(cv3_samples, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_samples' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv3_samples-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv3_samples, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_samples' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv3_samples-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(cv3_samples, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_samples' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv3_samples_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv3_samples, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_samples' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv3_samples_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cv1_eosinophils <- tcv1_eosinophils %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv1_eosinophils' not found
save(list = "cv1_eosinophils", file = glue("rda/tmrc3_cv1_eosinophils-v{ver}.rda"))## Error in save(list = "cv1_eosinophils", file = glue("rda/tmrc3_cv1_eosinophils-v{ver}.rda")): object 'cv1_eosinophils' not found
data_structures <- c(data_structures, "cv1_eosinophils")
cpm_data <- normalize_expt(cv1_eosinophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv1_eosinophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv1_eosinophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_eosinophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv1_eosinophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(cv1_eosinophils, convert = "cpm", filter = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv1_eosinophils_nosva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv1_eosinophils, filter = TRUE) %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_eosinophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv1_eosinophils_nosva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cv2_eosinophils <- tcv2_eosinophils %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv2_eosinophils' not found
save(list = "cv2_eosinophils", file = glue("rda/tmrc3_cv2_eosinophils-v{ver}.rda"))## Error in save(list = "cv2_eosinophils", file = glue("rda/tmrc3_cv2_eosinophils-v{ver}.rda")): object 'cv2_eosinophils' not found
data_structures <- c(data_structures, "cv2_eosinophils")
cpm_data <- normalize_expt(cv2_eosinophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv2_eosinophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv2_eosinophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_eosinophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv2_eosinophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(cv2_eosinophils, convert = "cpm", filter = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv2_eosinophils_nosva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv2_eosinophils, filter = TRUE) %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_eosinophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv2_eosinophils_nosva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cv3_eosinophils <- tcv3_eosinophils %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv3_eosinophils' not found
save(list = "cv3_eosinophils", file = glue("rda/tmrc3_cv3_eosinophils-v{ver}.rda"))## Error in save(list = "cv3_eosinophils", file = glue("rda/tmrc3_cv3_eosinophils-v{ver}.rda")): object 'cv3_eosinophils' not found
data_structures <- c(data_structures, "cv3_eosinophils")
cpm_data <- normalize_expt(cv3_eosinophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv3_eosinophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv3_eosinophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_eosinophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv3_eosinophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(cv3_eosinophils, convert = "cpm", filter = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_eosinophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv3_eosinophils_nosva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
## Note, the cbcb filter left behind a sufficient number of zeros that it confused cpm.
rpkm_data <- normalize_expt(cv3_eosinophils, filter = "simple") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_eosinophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv3_eosinophils_nosva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cv1_monocytes <- tcv1_monocytes %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv1_monocytes' not found
save(list = "cv1_monocytes", file = glue("rda/tmrc3_cv1_monocytes-v{ver}.rda"))## Error in save(list = "cv1_monocytes", file = glue("rda/tmrc3_cv1_monocytes-v{ver}.rda")): object 'cv1_monocytes' not found
data_structures <- c(data_structures, "cv1_monocytes")
cpm_data <- normalize_expt(cv1_monocytes, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv1_monocytes-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv1_monocytes, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv1_monocytes-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(cv1_monocytes, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv1_monocytes_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv1_monocytes, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv1_monocytes_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cv2_monocytes <- tcv2_monocytes %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv2_monocytes' not found
save(list = "cv2_monocytes", file = glue("rda/tmrc3_cv2_monocytes-v{ver}.rda"))## Error in save(list = "cv2_monocytes", file = glue("rda/tmrc3_cv2_monocytes-v{ver}.rda")): object 'cv2_monocytes' not found
data_structures <- c(data_structures, "cv2_monocytes")
cpm_data <- normalize_expt(cv2_monocytes, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv2_monocytes-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv2_monocytes, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv2_monocytes-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(cv2_monocytes, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv2_monocytes_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv2_monocytes, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv2_monocytes_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cv3_monocytes <- tcv3_monocytes %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv3_monocytes' not found
save(list = "cv3_monocytes", file = glue("rda/tmrc3_cv3_monocytes-v{ver}.rda"))## Error in save(list = "cv3_monocytes", file = glue("rda/tmrc3_cv3_monocytes-v{ver}.rda")): object 'cv3_monocytes' not found
data_structures <- c(data_structures, "cv3_monocytes")
cpm_data <- normalize_expt(cv3_monocytes, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv3_monocytes-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv3_monocytes, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv3_monocytes-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(cv3_monocytes, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_monocytes' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv3_monocytes_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv3_monocytes, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_monocytes' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv3_monocytes_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cv1_neutrophils <- tcv1_neutrophils %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv1_neutrophils' not found
save(list = "cv1_neutrophils", file = glue("rda/tmrc3_cv1_neutrophils-v{ver}.rda"))## Error in save(list = "cv1_neutrophils", file = glue("rda/tmrc3_cv1_neutrophils-v{ver}.rda")): object 'cv1_neutrophils' not found
data_structures <- c(data_structures, "cv1_neutrophils")
cpm_data <- normalize_expt(cv1_neutrophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv1_neutrophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv1_neutrophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv1_neutrophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(cv1_neutrophils, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv1_neutrophils_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv1_neutrophils, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv1_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv1_neutrophils_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cv2_neutrophils <- tcv2_neutrophils %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv2_neutrophils' not found
save(list = "cv2_neutrophils", file = glue("rda/tmrc3_cv2_neutrophils-v{ver}.rda"))## Error in save(list = "cv2_neutrophils", file = glue("rda/tmrc3_cv2_neutrophils-v{ver}.rda")): object 'cv2_neutrophils' not found
data_structures <- c(data_structures, "cv2_neutrophils")
cpm_data <- normalize_expt(cv2_neutrophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv2_neutrophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv2_neutrophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv2_neutrophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(cv2_neutrophils, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv2_neutrophils_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv2_neutrophils, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv2_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv2_neutrophils_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cv3_neutrophils <- tcv3_neutrophils %>%
subset_expt(subset = "clinic=='cali'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tcv3_neutrophils' not found
save(list = "cv3_neutrophils", file = glue("rda/tmrc3_cv3_neutrophils-v{ver}.rda"))## Error in save(list = "cv3_neutrophils", file = glue("rda/tmrc3_cv3_neutrophils-v{ver}.rda")): object 'cv3_neutrophils' not found
data_structures <- c(data_structures, "cv3_neutrophils")
cpm_data <- normalize_expt(cv3_neutrophils, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv3_neutrophils-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv3_neutrophils, filter = TRUE, convert = "rpkm",
na_to_zero = TRUE, column = "mean_cds_len")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv3_neutrophils-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
cpm_data <- normalize_expt(cv3_neutrophils, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_neutrophils' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/cv3_neutrophils_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
rpkm_data <- normalize_expt(cv3_neutrophils, filter = TRUE, batch = "svaseq") %>%
normalize_expt(convert = "rpkm", column = "mean_cds_len", na_to_zero = TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'cv3_neutrophils' not found
write.csv(x = as.data.frame(exprs(rpkm_data)),
file = glue("rpkm/cv3_neutrophils_sva-v{ver}.csv"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'rpkm_data' not found
Is this redundant?
tc_visit <- set_expt_conditions(
tc_clinical, fact = "visitnumber", colors = color_choices[["visit2"]]) %>%
set_expt_batches(fact = "finaloutcome") %>%
subset_expt(subset = "typeofcells!='biopsy'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_clinical' not found
save(list = "tc_visit", file = glue("rda/tmrc3_tc_visit-v{ver}.rda"))## Error in save(list = "tc_visit", file = glue("rda/tmrc3_tc_visit-v{ver}.rda")): object 'tc_visit' not found
data_structures <- c(data_structures, "tc_visit")
tc_v1vs <- tc_visit## Error in eval(expr, envir, enclos): object 'tc_visit' not found
pData(tc_v1vs)[["visit"]] <- as.character(pData(tc_v1vs)[["visitnumber"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_v1vs' not found
v1_samples <- pData(tc_v1vs)[["visit"]] == "1"## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_v1vs' not found
pData(tc_v1vs)[v1_samples, "visit"] <- "first"## Error: object 'tc_v1vs' not found
pData(tc_v1vs)[!v1_samples, "visit"] <- "later"## Error: object 'tc_v1vs' not found
pData(tc_v1vs)[["visit"]] <- as.factor(pData(tc_v1vs)[["visit"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.factor': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_v1vs' not found
tc_v1vs <- set_expt_conditions(
tc_v1vs, fact = "visit", colors = color_choices[["two_visits"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_v1vs' not found
save(list = "tc_v1vs", file = glue("rda/tmrc3_tc_v1vs-v{ver}.rda"))## Error in save(list = "tc_v1vs", file = glue("rda/tmrc3_tc_v1vs-v{ver}.rda")): object 'tc_v1vs' not found
data_structures <- c(data_structures, "tc_v1vs")
t_v1vs <- subset_expt(tc_v1vs, subset = "clinic == 'tumaco'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'tc_v1vs' not found
save(list = "t_v1vs", file = glue("rda/tmrc3_t_v1vs-v{ver}.rda"))## Error in save(list = "t_v1vs", file = glue("rda/tmrc3_t_v1vs-v{ver}.rda")): object 't_v1vs' not found
data_structures <- c(data_structures, "t_v1vs")
t_visit <- set_expt_conditions(
t_clinical, fact = "visitnumber", colors = color_choices[["visit2"]]) %>%
set_expt_batches(fact = "finaloutcome") %>%
subset_expt(subset = "typeofcells!='biopsy'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
save(list = "t_visit", file = glue("rda/tmrc3_t_visit-v{ver}.rda"))## Error in save(list = "t_visit", file = glue("rda/tmrc3_t_visit-v{ver}.rda")): object 't_visit' not found
data_structures <- c(data_structures, "t_visit")
cpm_data <- normalize_expt(t_visit, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_visit' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/t_visit-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
cpm_data <- normalize_expt(t_visit, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 't_visit' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/t_visit_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
visit_cf_expt_factor <- paste0("v", pData(t_clinical)[["visitnumber"]],
pData(t_clinical)[["finaloutcome"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
t_visitcf <- set_expt_conditions(t_clinical, fact = visit_cf_expt_factor)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
save(list = "t_visitcf", file = glue("rda/tmrc3_t_visitcf-v{ver}.rda"))## Error in save(list = "t_visitcf", file = glue("rda/tmrc3_t_visitcf-v{ver}.rda")): object 't_visitcf' not found
data_structures <- c(data_structures, "t_visitcf")
t_visitcf_eosinophil <- subset_expt(t_visitcf, subset = "typeofcells=='eosinophils'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 't_visitcf' not found
save(list = "t_visitcf_eosinophil", file = glue("rda/tmrc3_t_visitcf_eosinophil-v{ver}.rda"))## Error in save(list = "t_visitcf_eosinophil", file = glue("rda/tmrc3_t_visitcf_eosinophil-v{ver}.rda")): object 't_visitcf_eosinophil' not found
data_structures <- c(data_structures, "t_visitcf_eosinophil")
t_visitcf_monocyte <- subset_expt(t_visitcf, subset = "typeofcells=='monocytes'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 't_visitcf' not found
save(list = "t_visitcf_monocyte", file = glue("rda/tmrc3_t_visitcf_monocyte-v{ver}.rda"))## Error in save(list = "t_visitcf_monocyte", file = glue("rda/tmrc3_t_visitcf_monocyte-v{ver}.rda")): object 't_visitcf_monocyte' not found
data_structures <- c(data_structures, "t_visitcf_monocyte")
t_visitcf_neutrophil <- subset_expt(t_visitcf, subset = "typeofcells=='neutrophils'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 't_visitcf' not found
save(list = "t_visitcf_neutrophil", file = glue("rda/tmrc3_t_visitcf_neutrophil-v{ver}.rda"))## Error in save(list = "t_visitcf_neutrophil", file = glue("rda/tmrc3_t_visitcf_neutrophil-v{ver}.rda")): object 't_visitcf_neutrophil' not found
data_structures <- c(data_structures, "t_visitcf_neutrophil")Is this redundant?
c_visit <- set_expt_conditions(c_clinical, fact = "visitnumber") %>%
set_expt_batches(fact = "finaloutcome") %>%
subset_expt(subset = "typeofcells!='biopsy'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
save(list = "c_visit", file = glue("rda/tmrc3_c_visit-v{ver}.rda"))## Error in save(list = "c_visit", file = glue("rda/tmrc3_c_visit-v{ver}.rda")): object 'c_visit' not found
data_structures <- c(data_structures, "c_visit")
cpm_data <- normalize_expt(c_visit, convert = "cpm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_visit' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Tumaco/c_visit-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
cpm_data <- normalize_expt(c_visit, convert = "cpm", filter = TRUE, batch = "svaseq")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'c_visit' not found
written <- write_xlsx(
exprs(cpm_data),
excel = glue("cpm/4_Cali/c_visit_sva-v{ver}.xlsx"))## Error in h(simpleError(msg, call)): error in evaluating the argument 'data' in selecting a method for function 'write_xlsx': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'cpm_data' not found
visit_cf_expt_factor <- paste0("v", pData(c_clinical)[["visitnumber"]],
pData(c_clinical)[["finaloutcome"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
c_visitcf <- set_expt_conditions(c_clinical, fact = visit_cf_expt_factor)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
save(list = "c_visitcf", file = glue("rda/tmrc3_c_visitcf-v{ver}.rda"))## Error in save(list = "c_visitcf", file = glue("rda/tmrc3_c_visitcf-v{ver}.rda")): object 'c_visitcf' not found
data_structures <- c(data_structures, "c_visitcf")
c_visitcf_eosinophil <- subset_expt(c_visitcf, subset = "typeofcells=='eosinophils'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'c_visitcf' not found
save(list = "c_visitcf_eosinophil", file = glue("rda/tmrc3_c_visitcf_eosinophil-v{ver}.rda"))## Error in save(list = "c_visitcf_eosinophil", file = glue("rda/tmrc3_c_visitcf_eosinophil-v{ver}.rda")): object 'c_visitcf_eosinophil' not found
data_structures <- c(data_structures, "c_visitcf_eosinophil")
c_visitcf_monocyte <- subset_expt(c_visitcf, subset = "typeofcells=='monocytes'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'c_visitcf' not found
save(list = "c_visitcf_monocyte", file = glue("rda/tmrc3_c_visitcf_monocyte-v{ver}.rda"))## Error in save(list = "c_visitcf_monocyte", file = glue("rda/tmrc3_c_visitcf_monocyte-v{ver}.rda")): object 'c_visitcf_monocyte' not found
data_structures <- c(data_structures, "c_visitcf_monocyte")
c_visitcf_neutrophil <- subset_expt(c_visitcf, subset = "typeofcells=='neutrophils'")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': object 'c_visitcf' not found
save(list = "c_visitcf_neutrophil", file = glue("rda/tmrc3_c_visitcf_neutrophil-v{ver}.rda"))## Error in save(list = "c_visitcf_neutrophil", file = glue("rda/tmrc3_c_visitcf_neutrophil-v{ver}.rda")): object 'c_visitcf_neutrophil' not found
data_structures <- c(data_structures, "c_visitcf_neutrophil")ncol(exprs(tc_clinical))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'ncol': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'tc_clinical' not found
sum(pData(tc_clinical)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_clinical' not found
sum(pData(tc_clinical)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_clinical' not found
all_types[["biopsy"]]## Error in eval(expr, envir, enclos): object 'all_types' not found
sum(pData(tc_biopsies)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_biopsies' not found
sum(pData(tc_biopsies)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_biopsies' not found
all_types[["eosinophils"]]## Error in eval(expr, envir, enclos): object 'all_types' not found
sum(pData(tc_eosinophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_eosinophils' not found
sum(pData(tc_eosinophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_eosinophils' not found
nrow(pData(tcv1_eosinophils))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv1_eosinophils' not found
sum(pData(tcv1_eosinophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv1_eosinophils' not found
sum(pData(tcv1_eosinophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv1_eosinophils' not found
nrow(pData(tcv2_eosinophils))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv2_eosinophils' not found
sum(pData(tcv2_eosinophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv2_eosinophils' not found
sum(pData(tcv2_eosinophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv2_eosinophils' not found
nrow(pData(tcv3_eosinophils))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv3_eosinophils' not found
sum(pData(tcv3_eosinophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv3_eosinophils' not found
sum(pData(tcv3_eosinophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv3_eosinophils' not found
all_types[["monocytes"]]## Error in eval(expr, envir, enclos): object 'all_types' not found
sum(pData(tc_monocytes)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_monocytes' not found
sum(pData(tc_monocytes)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_monocytes' not found
nrow(pData(tcv1_monocytes))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv1_monocytes' not found
sum(pData(tcv1_monocytes)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv1_monocytes' not found
sum(pData(tcv1_monocytes)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv1_monocytes' not found
nrow(pData(tcv2_monocytes))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv2_monocytes' not found
sum(pData(tcv2_monocytes)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv2_monocytes' not found
sum(pData(tcv2_monocytes)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv2_monocytes' not found
nrow(pData(tcv3_monocytes))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv3_monocytes' not found
sum(pData(tcv3_monocytes)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv3_monocytes' not found
sum(pData(tcv3_monocytes)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv3_monocytes' not found
all_types[["neutrophils"]]## Error in eval(expr, envir, enclos): object 'all_types' not found
sum(pData(tc_neutrophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_neutrophils' not found
sum(pData(tc_neutrophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_neutrophils' not found
nrow(pData(tcv1_neutrophils))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv1_neutrophils' not found
sum(pData(tcv1_neutrophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv1_neutrophils' not found
sum(pData(tcv1_neutrophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv1_neutrophils' not found
nrow(pData(tcv2_monocytes))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv2_monocytes' not found
sum(pData(tcv2_neutrophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv2_neutrophils' not found
sum(pData(tcv2_neutrophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv2_neutrophils' not found
nrow(pData(tcv3_neutrophils))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv3_neutrophils' not found
sum(pData(tcv3_neutrophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv3_neutrophils' not found
sum(pData(tcv3_neutrophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tcv3_neutrophils' not found
Here is an outline of the samples in their current state:
ncol(exprs(t_clinical))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'ncol': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 't_clinical' not found
sum(pData(t_clinical)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
sum(pData(t_clinical)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
all_types[["biopsy"]]## Error in eval(expr, envir, enclos): object 'all_types' not found
sum(pData(t_biopsies)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_biopsies' not found
sum(pData(t_biopsies)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_biopsies' not found
all_types[["eosinophils"]]## Error in eval(expr, envir, enclos): object 'all_types' not found
sum(pData(t_eosinophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_eosinophils' not found
sum(pData(t_eosinophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_eosinophils' not found
nrow(pData(tv1_eosinophils))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv1_eosinophils' not found
sum(pData(tv1_eosinophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv1_eosinophils' not found
sum(pData(tv1_eosinophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv1_eosinophils' not found
nrow(pData(tv2_eosinophils))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv2_eosinophils' not found
sum(pData(tv2_eosinophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv2_eosinophils' not found
sum(pData(tv2_eosinophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv2_eosinophils' not found
nrow(pData(tv3_eosinophils))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv3_eosinophils' not found
sum(pData(tv3_eosinophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv3_eosinophils' not found
sum(pData(tv3_eosinophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv3_eosinophils' not found
all_types[["monocytes"]]## Error in eval(expr, envir, enclos): object 'all_types' not found
sum(pData(t_monocytes)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_monocytes' not found
sum(pData(t_monocytes)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_monocytes' not found
nrow(pData(tv1_monocytes))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv1_monocytes' not found
sum(pData(tv1_monocytes)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv1_monocytes' not found
sum(pData(tv1_monocytes)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv1_monocytes' not found
nrow(pData(tv2_monocytes))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv2_monocytes' not found
sum(pData(tv2_monocytes)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv2_monocytes' not found
sum(pData(tv2_monocytes)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv2_monocytes' not found
nrow(pData(tv3_monocytes))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv3_monocytes' not found
sum(pData(tv3_monocytes)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv3_monocytes' not found
sum(pData(tv3_monocytes)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv3_monocytes' not found
all_types[["neutrophils"]]## Error in eval(expr, envir, enclos): object 'all_types' not found
sum(pData(t_neutrophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_neutrophils' not found
sum(pData(t_neutrophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_neutrophils' not found
nrow(pData(tv1_neutrophils))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv1_neutrophils' not found
sum(pData(tv1_neutrophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv1_neutrophils' not found
sum(pData(tv1_neutrophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv1_neutrophils' not found
nrow(pData(tv2_monocytes))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv2_monocytes' not found
sum(pData(tv2_neutrophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv2_neutrophils' not found
sum(pData(tv2_neutrophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv2_neutrophils' not found
nrow(pData(tv3_neutrophils))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv3_neutrophils' not found
sum(pData(tv3_neutrophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv3_neutrophils' not found
sum(pData(tv3_neutrophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tv3_neutrophils' not found
ncol(exprs(c_clinical))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'ncol': error in evaluating the argument 'object' in selecting a method for function 'exprs': object 'c_clinical' not found
sum(pData(c_clinical)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
sum(pData(c_clinical)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_clinical' not found
#all_types[["biopsy"]]
sum(pData(c_biopsies)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_biopsies' not found
sum(pData(c_biopsies)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_biopsies' not found
#all_types[["eosinophils"]]
sum(pData(c_eosinophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_eosinophils' not found
sum(pData(c_eosinophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_eosinophils' not found
nrow(pData(cv1_eosinophils))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv1_eosinophils' not found
sum(pData(cv1_eosinophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv1_eosinophils' not found
sum(pData(cv1_eosinophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv1_eosinophils' not found
nrow(pData(cv2_eosinophils))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv2_eosinophils' not found
sum(pData(cv2_eosinophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv2_eosinophils' not found
sum(pData(cv2_eosinophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv2_eosinophils' not found
nrow(pData(cv3_eosinophils))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv3_eosinophils' not found
sum(pData(cv3_eosinophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv3_eosinophils' not found
sum(pData(cv3_eosinophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv3_eosinophils' not found
#all_types[["monocytes"]]
sum(pData(c_monocytes)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_monocytes' not found
sum(pData(c_monocytes)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_monocytes' not found
nrow(pData(cv1_monocytes))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv1_monocytes' not found
sum(pData(cv1_monocytes)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv1_monocytes' not found
sum(pData(cv1_monocytes)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv1_monocytes' not found
nrow(pData(cv2_monocytes))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv2_monocytes' not found
sum(pData(cv2_monocytes)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv2_monocytes' not found
sum(pData(cv2_monocytes)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv2_monocytes' not found
nrow(pData(cv3_monocytes))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv3_monocytes' not found
sum(pData(cv3_monocytes)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv3_monocytes' not found
sum(pData(cv3_monocytes)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv3_monocytes' not found
#all_types[["neutrophils"]]
sum(pData(c_neutrophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_neutrophils' not found
sum(pData(c_neutrophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'c_neutrophils' not found
nrow(pData(cv1_neutrophils))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv1_neutrophils' not found
sum(pData(cv1_neutrophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv1_neutrophils' not found
sum(pData(cv1_neutrophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv1_neutrophils' not found
nrow(pData(cv2_monocytes))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv2_monocytes' not found
sum(pData(cv2_neutrophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv2_neutrophils' not found
sum(pData(cv2_neutrophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv2_neutrophils' not found
nrow(pData(cv3_neutrophils))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'nrow': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv3_neutrophils' not found
sum(pData(cv3_neutrophils)[["finaloutcome"]] == "cure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv3_neutrophils' not found
sum(pData(cv3_neutrophils)[["finaloutcome"]] == "failure")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'cv3_neutrophils' not found
One potentially interesting comparisons point, especially vis a vis the Biopsy samples, is to compare with another set of recent L. braziliensis infected biopsy samples. The following sets up an expressionset using the raw data from bioproject PRJNA525604.
Note 202409: I just added the scott tsv metadata to this container and thus to this data structure; this only works because the samples are nicely in the same order.
new_sample_sheet <- sm(
suppressWarnings(gather_preprocessing_metadata(
"sample_sheets/scott_sra_samples.xlsx", specification = make_rnaseq_spec())))
scott_metadata <- as.data.frame(readr::read_tsv("sample_sheets/scott_capsule_studydesign.tsv"))## Rows: 28 Columns: 8
## -- Column specification --------------------------------------------------------
## Delimiter: "\t"
## chr (8): sample, disease, treatment_outcome, age, sex, DTH, lesion_size, Tim...
##
## i Use `spec()` to retrieve the full column specification for this data.
## i Specify the column types or set `show_col_types = FALSE` to quiet this message.
new_meta <- cbind.data.frame(new_sample_sheet[["new_meta"]], scott_metadata)
external_cf <- create_expt(new_meta,
gene_info = hs_annot, file_column = "hisat_count_table") %>%
set_expt_conditions(fact = "treatment_outcome") %>%
set_expt_batches(fact = "sex") %>%
subset_expt(subset = "condition!='na'")## Reading the sample metadata.
## The sample definitions comprises: 28 rows(samples) and 47 columns(metadata fields).
## Matched 21476 annotations and counts.
## Bringing together the count matrix and gene information.
## Some annotations were lost in merging, setting them to 'undefined'.
## Saving the expressionset to 'expt.rda'.
## The final expressionset has 21481 features and 28 samples.
## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': error in evaluating the argument 'object' in selecting a method for function 'pData': The provided factor is not in the design matrix.
pData(external_cf)[["ParasiteSpecies"]] <- "lvbraziliensis"## Error: object 'external_cf' not found
save(list = "external_cf", file = glue("rda/tmrc3_external_cf-v{ver}.rda"))## Error in save(list = "external_cf", file = glue("rda/tmrc3_external_cf-v{ver}.rda")): object 'external_cf' not found
data_structures <- c(data_structures, "external_cf")
biopsy_cf <- set_expt_conditions(tc_biopsies, fact = "finaloutcome")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_biopsies' not found
pData(biopsy_cf)[["lab"]] <- "Colombia"## Error: object 'biopsy_cf' not found
pData(external_cf)[["lab"]] <- "Brazil"## Error: object 'external_cf' not found
pData(external_cf)[["finaloutcome"]] <- pData(external_cf)[["treatmentoutcome"]]## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'external_cf' not found
tmrc3_external <- combine_expts(external_cf, biopsy_cf) %>%
set_expt_conditions(fact = "lab", colors = color_choices[["labs"]]) %>%
set_expt_batches(fact = "finaloutcome")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'external_cf' not found
save(list = "tmrc3_external", file = glue("rda/tmrc3_external-v{ver}.rda"))## Error in save(list = "tmrc3_external", file = glue("rda/tmrc3_external-v{ver}.rda")): object 'tmrc3_external' not found
data_structures <- c(data_structures, "tmrc3_external")
tmrc3_external_species <- set_expt_conditions(
tmrc3_external, fact = "ParasiteSpecies", colors = color_choices[["parasite"]]) %>%
set_expt_batches(fact = "lab")## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tmrc3_external' not found
save(list = "tmrc3_external_species", file = glue("rda/tmrc3_external_sepcies-v{ver}.rda"))## Error in save(list = "tmrc3_external_species", file = glue("rda/tmrc3_external_sepcies-v{ver}.rda")): object 'tmrc3_external_species' not found
data_structures <- c(data_structures, "tmrc3_external_species")
## In my singularity container, this fails with a pthread problem, not doing quant here.
#tt <- normalize_expt(tmrc3_external_species, filter = TRUE, transform = "log2",
# convert = "cpm", norm = "quant")
tt <- normalize_expt(tmrc3_external_species, filter = TRUE, transform = "log2",
convert = "cpm", norm = "tmm")## Error in h(simpleError(msg, call)): error in evaluating the argument 'expt' in selecting a method for function 'normalize_expt': object 'tmrc3_external_species' not found
plot_pca(tt)## Error in plot_pca(tt): This understands classes of type: expt, ExpressionSet, data.frame, and matrix.
confused <- set_expt_conditions(
hs_expt, fact = "ParasiteSpecies", colors = color_choices[["parasite"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'hs_expt' not found
tc_etnia_expt <- set_expt_conditions(
tc_clinical, fact = "etnia", colors = color_choices[["ethnicity"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'tc_clinical' not found
save(list = "tc_etnia_expt", file = glue("rda/tmrc3_tc_etnia-v{ver}.rda"))## Error in save(list = "tc_etnia_expt", file = glue("rda/tmrc3_tc_etnia-v{ver}.rda")): object 'tc_etnia_expt' not found
data_structures <- c(data_structures, "tc_etnia_expt")
t_etnia_expt <- set_expt_conditions(
t_clinical, fact = "etnia", colors = color_choices[["ethnicity"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 't_clinical' not found
save(list = "t_etnia_expt", file = glue("rda/tmrc3_t_etnia-v{ver}.rda"))## Error in save(list = "t_etnia_expt", file = glue("rda/tmrc3_t_etnia-v{ver}.rda")): object 't_etnia_expt' not found
data_structures <- c(data_structures, "t_etnia_expt")haha I knew I should not have removed the following block. In previous iterations of this I included a datastructure which pulled in the parasite reads from all samples with ‘sufficient’ coverage. This is not very many samples, for the simple reason that the drug treatment basically works! As a result, we removed the following section from the container (also for space). Oh, I may need to copy some more count tables into the container recipe for this to work.
It should be noted (if anyone ever reads this), that I also did a version of all of these analyses where I explicitly made a concatenated database (genome/gff/CDS) of human and parasite references (e.g. for salmon/hisat/bwa/etc) and did all of this using it in order to satisfy myself that the various treatments are similar enough to be called the same (I just saw that block while hunting for this parasite data and thought it was worth noting).
In any event, the following is copy/pasted from my working tree:
Make an expressionset of the parasite reads in the TMRC3 samples and distinguish between the faux and real reads. E.g: Are there samples which definitively contain parasites?
Later, I manually went through the mappings of samples with a significant number of parasite reads in IGV with some TMRC2 known zymodeme samples. In many cases it is possible to state definitively the classification of the parasite which infected an individual.
Note: I am renaming the resulting data structures a little because we generally do not call things ‘tmrc2/tmrc3/etc’ in the container.
lp_expt <- create_expt(
samplesheet,
file_column = "lpanamensis_v36hisat_file", gene_info = all_lp_annot) %>%
subset_expt(coverage = 30000) %>%
subset_expt(nonzero = 3000) %>%
set_expt_conditions(fact = "typeofcells") %>%
subset_expt(subset = "clinic!='undefined'") %>%
sanitize_expt_pData("finaloutcome")## Reading the sample metadata.
## Did not find the column: sampleid.
## Setting the ID column to the first column.
## Dropped 69 rows from the sample metadata because the sample ID is blank.
## Warning in extract_metadata(metadata, id_column = id_column, ...): There were
## NA values in the condition column, setting them to 'undefined'.
## Warning in extract_metadata(metadata, id_column = id_column, ...): There were
## NA values in the condition column, setting them to 'undefined'.
## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': error in evaluating the argument 'object' in selecting a method for function 'pData': error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': error in evaluating the argument 'expt' in selecting a method for function 'subset_expt': character string is not in a standard unambiguous format
visit_fact <- pData(lp_expt)[["visitnumber"]]## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'lp_expt' not found
batch_na <- is.na(visit_fact)## Error in eval(expr, envir, enclos): object 'visit_fact' not found
visit_fact[batch_na] <- "undefined"## Error: object 'visit_fact' not found
lp_expt <- set_expt_batches(lp_expt, fact = visit_fact)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'pData': object 'lp_expt' not found
save(list = "lp_expt", file = glue("rda/lp_expt_all_sanitized-v{ver}.rda"))## Error in save(list = "lp_expt", file = glue("rda/lp_expt_all_sanitized-v{ver}.rda")): object 'lp_expt' not found
data_structures <- c(data_structures, "lp_expt")The above block is similar in concept to the previous expressionset creation. It uses a different column and currently ignores the gene annotations. Given that many of the samples have essentially 0 reads, I set a cutoff of only 20 observed genes. Finally, I did a quick and dirty PCA plot of this peculiar data structure in the hopes of being able to ‘see’ the difference between what are assumed to be ‘real’ samples with a significant number of ‘real’ parasite reads vs. those samples which just have a couple of potentially spurious reads.
found_idx <- data_structures %in% ls()
if (sum(!found_idx) > 0) {
not_found <- data_structures[!found_idx]
warning("Some datastructures were not generated: ", toString(not_found), ".")
data_structures <- data_structures[found_idx]
}## Warning: Some datastructures were not generated: meta, hs_expt,
## hs_pd_demographics, tc_valid, demographics_filtered, tc_cure, tc_fail,
## tcv1_samples, tcv2_samples, tcv3_samples, tc_clinical, tc_monocytes,
## tcv1_monocytes, tcv2_monocytes, tcv3_monocytes, tc_eosinophils,
## tcv1_eosinophils, tcv2_eosinophils, tcv3_eosinophils, tc_clinical_nobiop,
## tc_biopsies, tc_neutrophils, tcv1_neutrophils, tcv2_neutrophils,
## tcv3_neutrophils, tc_sex, t_clinical, t_clinical_nobiop, t_biopsies,
## t_eosinophils, t_monocytes, t_neutrophils, tv1_samples, tv2_samples,
## tv3_samples, tv1_eosinophils, tv2_eosinophils, tv3_eosinophils, tv1_monocytes,
## tv2_monocytes, tv3_monocytes, tv1_neutrophils, tv2_neutrophils,
## tv3_neutrophils, c_clinical, c_clinical_nobiop, c_biopsies, c_eosinophils,
## c_monocytes, c_neutrophils, cv1_samples, cv2_samples, cv3_samples,
## cv1_eosinophils, cv2_eosinophils, cv3_eosinophils, cv1_monocytes,
## cv2_monocytes, cv3_monocytes, cv1_neutrophils, cv2_neutrophils,
## cv3_neutrophils, tc_visit, tc_v1vs, t_v1vs, t_visit, t_visitcf,
## t_visitcf_eosinophil, t_visitcf_monocyte, t_visitcf_neutrophil, c_visit,
## c_visitcf, c_visitcf_eosinophil, c_visitcf_monocyte, c_visitcf_neutrophil,
## external_cf, tmrc3_external, tmrc3_external_species, tc_etnia_expt,
## t_etnia_expt, lp_expt.
save(list = data_structures, file = glue("rda/tmrc3_data_structures-v{ver}.rda"))## Warning in gzfile(file, "wb"): cannot open compressed file
## 'rda/tmrc3_data_structures-v202411.rda', probable reason 'No such file or
## directory'
## Error in gzfile(file, "wb"): cannot open the connection
pander::pander(sessionInfo())R version 4.4.1 (2024-06-14)
Platform: x86_64-conda-linux-gnu
locale: C
attached base packages: stats4, stats, graphics, grDevices, utils, datasets, methods and base
other attached packages: org.Lpanamensis.MHOMCOL81L13.v68.eg.db(v.2024.09), AnnotationDbi(v.1.64.1), tidyr(v.1.3.1), hpgltools(v.1.0), Matrix(v.1.6-5), SummarizedExperiment(v.1.32.0), GenomicRanges(v.1.54.1), GenomeInfoDb(v.1.38.6), IRanges(v.2.36.0), S4Vectors(v.0.40.2), MatrixGenerics(v.1.14.0), matrixStats(v.1.2.0), Biobase(v.2.62.0), BiocGenerics(v.0.48.1), glue(v.1.7.0), forcats(v.1.0.0) and dplyr(v.1.1.4)
loaded via a namespace (and not attached): RColorBrewer(v.1.1-3), jsonlite(v.1.8.8), magrittr(v.2.0.3), GenomicFeatures(v.1.54.3), rmarkdown(v.2.25), BiocIO(v.1.12.0), fs(v.1.6.3), zlibbioc(v.1.48.0), vctrs(v.0.6.5), Rsamtools(v.2.18.0), memoise(v.2.0.1), RCurl(v.1.98-1.14), htmltools(v.0.5.7), S4Arrays(v.1.2.0), progress(v.1.2.3), curl(v.5.2.0), broom(v.1.0.5), SparseArray(v.1.2.4), sass(v.0.4.8), bslib(v.0.6.1), htmlwidgets(v.1.6.4), plyr(v.1.8.9), testthat(v.3.2.1), plotly(v.4.10.4), cachem(v.1.0.8), GenomicAlignments(v.1.38.2), mime(v.0.12), lifecycle(v.1.0.4), iterators(v.1.0.14), pkgconfig(v.2.0.3), R6(v.2.5.1), fastmap(v.1.1.1), GenomeInfoDbData(v.1.2.11), shiny(v.1.8.0), digest(v.0.6.34), colorspace(v.2.1-0), RSQLite(v.2.3.5), filelock(v.1.0.3), fansi(v.1.0.6), httr(v.1.4.7), abind(v.1.4-5), compiler(v.4.4.1), pander(v.0.6.5), bit64(v.4.0.5), withr(v.3.0.0), backports(v.1.4.1), BiocParallel(v.1.36.0), DBI(v.1.2.2), biomaRt(v.2.58.2), rappdirs(v.0.3.3), DelayedArray(v.0.28.0), rjson(v.0.2.21), HDO.db(v.0.99.1), tools(v.4.4.1), zip(v.2.3.1), httpuv(v.1.6.14), varhandle(v.2.0.6), restfulr(v.0.0.15), GOSemSim(v.2.28.1), promises(v.1.2.1), grid(v.4.4.1), reshape2(v.1.4.4), fgsea(v.1.28.0), generics(v.0.1.3), gtable(v.0.3.4), tzdb(v.0.4.0), data.table(v.1.15.0), hms(v.1.1.3), xml2(v.1.3.6), utf8(v.1.2.4), XVector(v.0.42.0), foreach(v.1.5.2), pillar(v.1.9.0), stringr(v.1.5.1), vroom(v.1.6.5), yulab.utils(v.0.1.7), later(v.1.3.2), splines(v.4.4.1), BiocFileCache(v.2.10.1), lattice(v.0.22-5), rtracklayer(v.1.62.0), bit(v.4.0.5), annotate(v.1.80.0), tidyselect(v.1.2.0), GO.db(v.3.18.0), Biostrings(v.2.70.2), knitr(v.1.45), xfun(v.0.42), brio(v.1.1.4), stringi(v.1.8.3), lazyeval(v.0.2.2), yaml(v.2.3.8), evaluate(v.0.23), codetools(v.0.2-19), tibble(v.3.2.1), qvalue(v.2.34.0), graph(v.1.80.0), cli(v.3.6.2), xtable(v.1.8-4), munsell(v.0.5.0), jquerylib(v.0.1.4), Rcpp(v.1.0.12), dbplyr(v.2.4.0), png(v.0.1-8), XML(v.3.99-0.16.1), parallel(v.4.4.1), ellipsis(v.0.3.2), readr(v.2.1.5), ggplot2(v.3.5.0), blob(v.1.2.4), prettyunits(v.1.2.0), DOSE(v.3.28.2), bitops(v.1.0-7), viridisLite(v.0.4.2), GSEABase(v.1.64.0), scales(v.1.3.0), openxlsx(v.4.2.5.2), purrr(v.1.0.2), crayon(v.1.5.2), rlang(v.1.1.3), cowplot(v.1.1.3), fastmatch(v.1.1-4), KEGGREST(v.1.42.0) and waldo(v.0.5.2)
message("This is hpgltools commit: ", get_git_commit())## If you wish to reproduce this exact build of hpgltools, invoke the following:
## > git clone http://github.com/abelew/hpgltools.git
## > git reset 08c5d4e0f4602762a9507c7b53068ac99f62c683
## This is hpgltools commit: Mon Nov 4 14:19:02 2024 -0500: 08c5d4e0f4602762a9507c7b53068ac99f62c683
message("Saving to ", savefile)## Saving to 01datasets.rda.xz
# tmp <- sm(saveme(filename = savefile))tmp <- loadme(filename = savefile)