I downloaded a new version of cellranger along with the various reference files provided by 10x for the VD(J) references etc. I got a bit distracted by the pipeline language implemented by 10x called ‘martian’. I have the feeling that it might prove a good thing to play with.
Here are the commands I ran to separate the samples and perform the alignments. There are 4 sample names and each was done with one run of the ‘normal’ GEX scRNASeq method and one of the (new to me) V(D)J library.
April kindly sent some information from 10x which shows that I should have used the multi pipline when preprocessing the data.
Intra-Muscular vs. Nasal
I wrote 4 separate configuration csv files using the templates I downloaded and following a little reading. It seemed to me that I should be able to process them all as a single csv file, but when I attempted that, cellranger did not react well. It also took a few tries before I got the various reference/library options correct.
Note that once cellranger successfully ran for the samples I moved them to the multi/ directory so that I can compare the outputs to when I simply did the ‘count’ operation.
The following invocations of cellranger all appear to work without any problems. Ideally I would like them to be done in a single run, though.
My attempts so far to use the csv configuration to concatenate multiple vdj libraries have not worked, so I chose to do it the stupid way, which is what I should have just done to begin with. Caveat, it works fine for the gex libraries to do it the way the documentation suggests.
cd preprocessing
for i in R1 R2; do
for j in Control Mock_Mex09 IM_Mex09 IN_Mex09; do
A_file=$(/bin/ls A_${j}_VDJ*_${i}_001.fastq.gz)
B_file=$(/bin/ls B_${j}_VDJ*_${i}_001.fastq.gz)
out_file="Concat_${j}_VDJ_${i}.fastq.gz"
cp_cmd="cp ${A_file} ${out_file}"
echo "Running: ${cp_cmd}."
eval $cp_cmd
cat_cmd="cat ${B_file} >> ${out_file}"
echo "Running: ${cat_cmd}."
eval $cat_cmd
done
donemodule add cellranger
cellranger multi --id control --csv sample_sheets/multi_config_try05_control.csv
cellranger multi --id mock --csv sample_sheets/multi_config_try05_mock.csv
cellranger multi --id m --csv sample_sheets/multi_config_try05_m.csv
cellranger multi --id n --csv sample_sheets/multi_config_try05_n.csv
mv control mock m n 01multi_combined/annotations <- load_biomart_annotations()$annotation## The biomart annotations file already exists, loading from it.
brief <- unique(annotations[, c("hgnc_symbol", "description")])prefix <- "multi"
# prefix <- "01multi_combined"Here is a snippet of code copy-pasted from:
which, if I read it correctly, will read in the vdj output and add it as a set of annotations to the seurat object. Note, I made some changes to it because I simply cannot help myself.
I think some variant of this function might be useful for the hpgltools if I think I will use it again…
add_clonotype <- function(seurat_obj, name="control", type="t", prefix=prefix) {
vdj_directory <- glue::glue("{prefix}/{name}/outs/per_sample_outs/{name}/vdj_t")
vdj_csv <- glue::glue("{vdj_directory}/filtered_contig_annotations.csv")
reference_csv <- glue::glue("{vdj_directory}/clonotypes.csv")
tcr <- readr::read_csv(vdj_csv, show_col_types = FALSE)
ref <- readr::read_csv(reference_csv, show_col_types = FALSE)
tcr_duplicate_barcode_idx <- duplicated(tcr[["barcode"]])
tcr_nodup <- tcr[!tcr_duplicate_barcode_idx, ]
both <- as.data.frame(merge(tcr_nodup, ref, by.x="raw_clonotype_id", by.y="clonotype_id"))
rownames(both) <- both[["barcode"]]
both[["barcode"]] <- NULL
new <- Seurat::AddMetaData(object=seurat_obj, metadata=both)
return(new)
}The following block is mostly a cut/paste of itself where I set the (over)simplified name of each sample. This then becomes the template for the path and parameters used to read the data, create a seurat object, and add the clonotype data from the vdj run.
name <- "control"
path <- glue::glue("{prefix}/{name}/outs/per_sample_outs/{name}/count/sample_filtered_feature_bc_matrix")
a_control <- Seurat::Read10X(path) %>%
CreateSeuratObject(project = name) %>%
add_clonotype(name = name)## Error in eval(parse(text = text, keep.source = FALSE), envir): promise already under evaluation: recursive default argument reference or earlier problems?
name <- "mock"
path <- glue::glue("{prefix}/{name}/outs/per_sample_outs/{name}/count/sample_filtered_feature_bc_matrix")
a_mock <- Seurat::Read10X(path) %>%
CreateSeuratObject(project = name) %>%
add_clonotype(name = name)## Error in eval(parse(text = text, keep.source = FALSE), envir): promise already under evaluation: recursive default argument reference or earlier problems?
name <- "m"
path <- glue::glue("{prefix}/{name}/outs/per_sample_outs/{name}/count/sample_filtered_feature_bc_matrix")
a_m <- Seurat::Read10X(path) %>%
CreateSeuratObject(project = name) %>%
add_clonotype(name = name)## Error in eval(parse(text = text, keep.source = FALSE), envir): promise already under evaluation: recursive default argument reference or earlier problems?
name <- "n"
path <- glue::glue("{prefix}/{name}/outs/per_sample_outs/{name}/count/sample_filtered_feature_bc_matrix")
a_n <- Seurat::Read10X(path) %>%
CreateSeuratObject(project = name) %>%
add_clonotype(name = name)## Error in eval(parse(text = text, keep.source = FALSE), envir): promise already under evaluation: recursive default argument reference or earlier problems?
For the moment I want to be able to play with the individual samples as well as the aggregate so that I can better understand the data. So I guess it works out that I didn’t figure out how to run all the samples at the same time via ‘cellranger multi’.
I am pretty sure Seurat’s merge() overload allows one to just do ‘merge(a,b,c,d,e…)’ but I am not using that.
all <- merge(a_control, a_mock) %>%
merge(a_m) %>%
merge(a_n)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'merge': error in evaluating the argument 'x' in selecting a method for function 'merge': error in evaluating the argument 'x' in selecting a method for function 'merge': object 'a_control' not found
control_clono <- !is.na(a_control[["raw_clonotype_id"]])## Error in eval(expr, envir, enclos): object 'a_control' not found
summary(control_clono)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': object 'control_clono' not found
mock_clono <- !is.na(a_mock[["raw_clonotype_id"]])## Error in eval(expr, envir, enclos): object 'a_mock' not found
summary(mock_clono)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': object 'mock_clono' not found
m_clono <- !is.na(a_m[["raw_clonotype_id"]])## Error in eval(expr, envir, enclos): object 'a_m' not found
summary(m_clono)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': object 'm_clono' not found
n_clono <- !is.na(a_n[["raw_clonotype_id"]])## Error in eval(expr, envir, enclos): object 'a_n' not found
summary(n_clono)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': object 'n_clono' not found
I want to take a couple minutes to add some annotations to the seurat object, notably I want to state the identity relationships with some sort of name.
Thus I will make a vector of the the sample IDs and for each one make a category of self/not-self. Note that Seurat comes with a function ‘FindConservedMarkers()’ or something like that which compares each self to all other samples, so this may be redundant; but it is kind of nice to be able to see the categories as a set of binary indexes.
cluster_letters <- as.factor(LETTERS[Idents(object=all)])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.factor': no applicable method for 'Idents' applied to an object of class "function"
names(cluster_letters) <- colnames(x=all)## Error in names(cluster_letters) <- colnames(x = all): object 'cluster_letters' not found
control_ids <- as.character(cluster_letters)## Error in eval(expr, envir, enclos): object 'cluster_letters' not found
mock_ids <- control## Error in eval(expr, envir, enclos): object 'control' not found
m_vaccine_ids <- control## Error in eval(expr, envir, enclos): object 'control' not found
n_vaccine_ids <- control## Error in eval(expr, envir, enclos): object 'control' not found
Now that I have 4 identical vectors, fill them with my chosen names for the samples and whether they do(nt) have that identity.
control_idx <- control == "A"## Error in eval(expr, envir, enclos): object 'control' not found
control[control_idx] <- "Control"## Error in control[control_idx] <- "Control": object 'control' not found
control[!control_idx] <- "Stimulated"## Error in control[!control_idx] <- "Stimulated": object 'control' not found
mock_idx <- mock == "B"## Error in eval(expr, envir, enclos): object 'mock' not found
mock[mock_idx] <- "Mock"## Error in mock[mock_idx] <- "Mock": object 'mock' not found
mock[!mock_idx] <- "Not mock"## Error in mock[!mock_idx] <- "Not mock": object 'mock' not found
m_vaccine_idx <- m_vaccine == "C"## Error in eval(expr, envir, enclos): object 'm_vaccine' not found
m_vaccine[m_vaccine_idx] <- "Muscular"## Error in m_vaccine[m_vaccine_idx] <- "Muscular": object 'm_vaccine' not found
m_vaccine[!m_vaccine_idx] <- "Not Muscular"## Error in m_vaccine[!m_vaccine_idx] <- "Not Muscular": object 'm_vaccine' not found
n_vaccine_idx <- n_vaccine == "D"## Error in eval(expr, envir, enclos): object 'n_vaccine' not found
n_vaccine[n_vaccine_idx] <- "Nasal"## Error in n_vaccine[n_vaccine_idx] <- "Nasal": object 'n_vaccine' not found
n_vaccine[!n_vaccine_idx] <- "Not Nasal"## Error in n_vaccine[!n_vaccine_idx] <- "Not Nasal": object 'n_vaccine' not found
Now add these categories to the sample metadata. I think this is a good place to consdier having a sample sheet from Dr. Park with whatever other random information might prove interesting about the samples.
all <- AddMetaData(
object=all,
metadata=cluster_letters,
col.name="cluster_letters")## Error in UseMethod(generic = "AddMetaData", object = object): no applicable method for 'AddMetaData' applied to an object of class "function"
all <- AddMetaData(
object=all,
metadata=control,
col.name="control")## Error in UseMethod(generic = "AddMetaData", object = object): no applicable method for 'AddMetaData' applied to an object of class "function"
all <- AddMetaData(
object=all,
metadata=mock,
col.name="mock")## Error in UseMethod(generic = "AddMetaData", object = object): no applicable method for 'AddMetaData' applied to an object of class "function"
all <- AddMetaData(
object=all,
metadata=m_vaccine,
col.name="muscular")## Error in UseMethod(generic = "AddMetaData", object = object): no applicable method for 'AddMetaData' applied to an object of class "function"
all <- AddMetaData(
object=all,
metadata=n_vaccine,
col.name="nasal")## Error in UseMethod(generic = "AddMetaData", object = object): no applicable method for 'AddMetaData' applied to an object of class "function"
Let us start filtering the data, leading off with a definition of the minimum number of RNAs, minimum amount of rRNA, and maximum mitochondrial. In addition, let us print how much of each are observed before filtering. Before we can print/filter these attributes, we must use the PercentageFeatureSet() to get the numbers…
min_num_rna <- 200
min_pct_ribo <- 5
max_pct_mito <- 20
all[["percent_mt"]] <- PercentageFeatureSet(all, pattern="^mt-")## Error in UseMethod(generic = "DefaultAssay", object = object): no applicable method for 'DefaultAssay' applied to an object of class "function"
all[["percent_ribo"]] <- PercentageFeatureSet(all, pattern="^Rp[sl]")## Error in UseMethod(generic = "DefaultAssay", object = object): no applicable method for 'DefaultAssay' applied to an object of class "function"
Show the state before filtering on a per-cell basis across all samples. Start with the number of cells
sample_summaries <- as_tibble(data.frame(
"id" = c("control", "mock", "muscular", "nasal"),
"start_cells" = c(
sum(all@meta.data[["orig.ident"]] == "control"),
sum(all@meta.data[["orig.ident"]] == "mock"),
sum(all@meta.data[["orig.ident"]] == "m"),
sum(all@meta.data[["orig.ident"]] == "n"))))## Error in as_tibble(data.frame(id = c("control", "mock", "muscular", "nasal"), : could not find function "as_tibble"
skim(all[["percent_mt"]])## Error in all[["percent_mt"]]: object of type 'builtin' is not subsettable
skim(all[["percent_ribo"]])## Error in all[["percent_ribo"]]: object of type 'builtin' is not subsettable
skim(all[["nFeature_RNA"]])## Error in all[["nFeature_RNA"]]: object of type 'builtin' is not subsettable
skim(all[["nCount_RNA"]])## Error in all[["nCount_RNA"]]: object of type 'builtin' is not subsettable
## Length and reads are for only those cells with clonotypes.
skim(all[["reads"]])## Error in all[["reads"]]: object of type 'builtin' is not subsettable
skim(all[["length"]])## Error in all[["length"]]: object of type 'builtin' is not subsettable
## How many cells have specific chains associated with them
sum(!is.na(all$chain))## Error in all$chain: object of type 'builtin' is not subsettable
And on a per-sample basis with (new to me) skimr, which provides a pretty summary of the category of interest. The way I wrote the following stanzas should also append new columns to my sample_summaries table comprised of the mean values for these elements.
add_summaries <- function(sample_summaries, meta,
new_column = "unknown", group_column = "orig.ident",
meta_query = "percent_mt", summary_query = "numeric.mean") {
sample_summaries[[new_column]] <- meta %>%
group_by(!!rlang::sym(group_column)) %>%
skim_tee(meta_query) %>%
skim(meta_query) %>%
dplyr::select(summary_query)
return(sample_summaries)
}sample_summaries <- sample_summaries %>%
add_summaries(all@meta.data, new_column = "start_rna", meta_query = "nFeature_RNA") %>%
add_summaries(all@meta.data, new_column = "nCount_RNA", meta_query = "nCount_RNA") %>%
add_summaries(all@meta.data, new_column = "start_mt", meta_query = "percent_mt") %>%
add_summaries(all@meta.data, new_column = "start_ribo", meta_query = "percent_ribo") %>%
add_summaries(all@meta.data, new_column = "start_clono", meta_query = "reads")## Error in group_by(., !!rlang::sym(group_column)): trying to get slot "meta.data" from an object of a basic class ("function") with no slots
sample_summaries## Error in eval(expr, envir, enclos): object 'sample_summaries' not found
Ok, that was fun; lets look at this information as a series of plots:
VlnPlot(all, features="nFeature_RNA", pt.size=0)## Error in UseMethod(generic = "DefaultAssay", object = object): no applicable method for 'DefaultAssay' applied to an object of class "function"
VlnPlot(all, features="percent_mt", pt.size=0)## Error in UseMethod(generic = "DefaultAssay", object = object): no applicable method for 'DefaultAssay' applied to an object of class "function"
VlnPlot(all, features="percent_ribo", pt.size=0)## Error in UseMethod(generic = "DefaultAssay", object = object): no applicable method for 'DefaultAssay' applied to an object of class "function"
VlnPlot(all, features="nCount_RNA", pt.size=0)## Error in UseMethod(generic = "DefaultAssay", object = object): no applicable method for 'DefaultAssay' applied to an object of class "function"
VlnPlot(all, features="reads", pt.size=0)## Error in UseMethod(generic = "DefaultAssay", object = object): no applicable method for 'DefaultAssay' applied to an object of class "function"
## I am curious about the length of the clonotype sequences.
VlnPlot(all, features="length", pt.size=0)## Error in UseMethod(generic = "DefaultAssay", object = object): no applicable method for 'DefaultAssay' applied to an object of class "function"
FeatureScatter(all, "percent_ribo", "percent_mt")## Error in UseMethod(generic = "Idents", object = object): no applicable method for 'Idents' applied to an object of class "function"
FeatureScatter(all, "nCount_RNA", "nFeature_RNA")## Error in UseMethod(generic = "Idents", object = object): no applicable method for 'Idents' applied to an object of class "function"
FeatureScatter(all, "nCount_RNA", "percent_ribo")## Error in UseMethod(generic = "Idents", object = object): no applicable method for 'Idents' applied to an object of class "function"
FeatureScatter(all, "nCount_RNA", "percent_mt")## Error in UseMethod(generic = "Idents", object = object): no applicable method for 'Idents' applied to an object of class "function"
sufficient_rna_observed <- WhichCells(all, expression = nFeature_RNA >= min_num_rna)## Error in UseMethod(generic = "WhichCells", object = object): no applicable method for 'WhichCells' applied to an object of class "function"
filt <- subset(all, cells = sufficient_rna_observed)## Error in subset.default(all, cells = sufficient_rna_observed): argument "subset" is missing, with no default
sample_summaries[["ncells_filtrna"]] <- c(
sum(filt@meta.data[["orig.ident"]] == "control"),
sum(filt@meta.data[["orig.ident"]] == "mock"),
sum(filt@meta.data[["orig.ident"]] == "m"),
sum(filt@meta.data[["orig.ident"]] == "n"))## Error in eval(expr, envir, enclos): object 'filt' not found
sample_summaries %>%
add_summaries(filt@meta.data, new_column = "filt1_rna", meta_query = "nFeature_RNA") %>%
add_summaries(filt@meta.data, new_column = "filt1_RNA", meta_query = "nCount_RNA") %>%
add_summaries(filt@meta.data, new_column = "filt1_mt", meta_query = "percent_mt") %>%
add_summaries(filt@meta.data, new_column = "filt1_ribo", meta_query = "percent_ribo") %>%
add_summaries(filt@meta.data, new_column = "filt1_clono", meta_query = "reads") ->
sample_summaries## Error in group_by(., !!rlang::sym(group_column)): object 'filt' not found
In the next I will check that the number of reads/rna across cells is sufficient, that filter does nothing currently, which I think is good.
## I think this filter does nothing in its current form.
sufficiently_observed_idx <- rowSums(filt) > 3## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'rowSums': object 'filt' not found
summary(sufficiently_observed_idx)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': object 'sufficiently_observed_idx' not found
dim(filt)## Error in eval(expr, envir, enclos): object 'filt' not found
filt <- subset(filt, features = rownames(filt)[sufficiently_observed_idx])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'subset': object 'filt' not found
dim(filt)## Error in eval(expr, envir, enclos): object 'filt' not found
## Keep cells with at least some ribosomal reads
## Note the Percent function above actually puts in a floating point
## number from 0-100, not (as I assumed from 0-1).
high_ribosomal <- WhichCells(filt, expression = percent_ribo >= min_pct_ribo)## Error in WhichCells(filt, expression = percent_ribo >= min_pct_ribo): object 'filt' not found
filt <- subset(filt, cells = high_ribosomal)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'subset': object 'filt' not found
sample_summaries[["ncells_filtribo"]] <- c(
sum(filt@meta.data[["orig.ident"]] == "control"),
sum(filt@meta.data[["orig.ident"]] == "mock"),
sum(filt@meta.data[["orig.ident"]] == "m"),
sum(filt@meta.data[["orig.ident"]] == "n"))## Error in eval(expr, envir, enclos): object 'filt' not found
sample_summaries %>%
add_summaries(filt@meta.data, new_column = "filt2_rna", meta_query = "nFeature_RNA") %>%
add_summaries(filt@meta.data, new_column = "filt2_RNA", meta_query = "nCount_RNA") %>%
add_summaries(filt@meta.data, new_column = "filt2_mt", meta_query = "percent_mt") %>%
add_summaries(filt@meta.data, new_column = "filt2_ribo", meta_query = "percent_ribo") %>%
add_summaries(filt@meta.data, new_column = "filt2_clono", meta_query = "reads") ->
sample_summaries## Error in group_by(., !!rlang::sym(group_column)): object 'filt' not found
Exclude cells with too much mitochondrial RNA
low_mitochondrial <- WhichCells(filt, expression = percent_mt <= max_pct_mito)## Error in WhichCells(filt, expression = percent_mt <= max_pct_mito): object 'filt' not found
filt <- subset(filt, cells = low_mitochondrial)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'subset': object 'filt' not found
dim(filt)## Error in eval(expr, envir, enclos): object 'filt' not found
sample_summaries[["ncells_filtmito"]] <- c(
sum(filt@meta.data[["orig.ident"]] == "control"),
sum(filt@meta.data[["orig.ident"]] == "mock"),
sum(filt@meta.data[["orig.ident"]] == "m"),
sum(filt@meta.data[["orig.ident"]] == "n"))## Error in eval(expr, envir, enclos): object 'filt' not found
sample_summaries %>%
add_summaries(filt@meta.data, new_column = "filt3_rna", meta_query = "nFeature_RNA") %>%
add_summaries(filt@meta.data, new_column = "filt3_RNA", meta_query = "nCount_RNA") %>%
add_summaries(filt@meta.data, new_column = "filt3_mt", meta_query = "percent_mt") %>%
add_summaries(filt@meta.data, new_column = "filt3_ribo", meta_query = "percent_ribo") %>%
add_summaries(filt@meta.data, new_column = "filt3_clono", meta_query = "reads") ->
sample_summaries## Error in group_by(., !!rlang::sym(group_column)): object 'filt' not found
as.matrix(sample_summaries)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.matrix': object 'sample_summaries' not found
all_norm <- NormalizeData(object=all) %>%
FindVariableFeatures() %>%
ScaleData() %>%
RunPCA() %>%
FindNeighbors() %>%
FindClusters() %>%
RunTSNE() %>%
RunUMAP(reduction = "pca", dims = 1:10)## Error in UseMethod(generic = "as.sparse", object = x): no applicable method for 'as.sparse' applied to an object of class "function"
DimPlot(object=all_norm, reduction="tsne")## Error in is.data.frame(x): object 'all_norm' not found
plotted <- DimPlot(all_norm, reduction="umap", group.by="cluster_letters", label=TRUE)## Error in is.data.frame(x): object 'all_norm' not found
plotted## Error in eval(expr, envir, enclos): object 'plotted' not found
filt_norm <- NormalizeData(object=filt) %>%
FindVariableFeatures() %>%
ScaleData() %>%
RunPCA() %>%
FindNeighbors() %>%
FindClusters() %>%
RunTSNE() %>%
RunUMAP(reduction = "pca", dims = 1:10)## Error in NormalizeData(object = filt): object 'filt' not found
DimPlot(object=filt_norm, reduction="tsne")## Error in is.data.frame(x): object 'filt_norm' not found
plotted <- DimPlot(filt_norm, reduction="umap", group.by="cluster_letters", label=TRUE)## Error in is.data.frame(x): object 'filt_norm' not found
plotted## Error in eval(expr, envir, enclos): object 'plotted' not found
filt_norm <- JackStraw(filt_norm, num.replicate=10)## Error in DefaultAssay(object = object): object 'filt_norm' not found
filt_norm <- ScoreJackStraw(filt_norm)## Error in ScoreJackStraw(filt_norm): object 'filt_norm' not found
JackStrawPlot(filt_norm)## Error in JS(object = object[[reduction]], slot = "empirical"): object 'filt_norm' not found
ElbowPlot(filt_norm)## Error in Stdev(object = object, reduction = reduction): object 'filt_norm' not found
## So I am thinking maybe 4-10?
wanted_dims <- 6
filt_norm <- FindNeighbors(filt_norm, dims=1:wanted_dims) %>%
FindClusters(resolution=0.5) %>%
StashIdent(save.name="res0p5_clusters")## Error in FindNeighbors(filt_norm, dims = 1:wanted_dims): object 'filt_norm' not found
RunUMAP(filt_norm, dims=1:9)## Error in RunUMAP(filt_norm, dims = 1:9): object 'filt_norm' not found
DimPlot(filt_norm, label=TRUE)## Error in is(x, "classRepresentation"): object 'filt_norm' not found
filt_norm <- FindClusters(filt_norm, resolution=0.1) %>%
FindNeighbors(k.param=6) %>%
StashIdent(save.name="res0p1_clusters")## Error in FindClusters(filt_norm, resolution = 0.1): object 'filt_norm' not found
RunUMAP(filt_norm, dims=1:9)## Error in RunUMAP(filt_norm, dims = 1:9): object 'filt_norm' not found
DimPlot(filt_norm, label=TRUE)## Error in is(x, "classRepresentation"): object 'filt_norm' not found
Add into the metadata a concatenation of the sample ID and the cluster ID
identity_vector <- filt_norm[["orig.ident"]][["orig.ident"]]## Error in eval(expr, envir, enclos): object 'filt_norm' not found
class(identity_vector)## Error in eval(expr, envir, enclos): object 'identity_vector' not found
cluster_vector <- as.character(filt_norm[["res0p1_clusters"]][["res0p1_clusters"]])## Error in eval(expr, envir, enclos): object 'filt_norm' not found
concatenated_vector <- paste0(identity_vector, "_", cluster_vector)## Error in paste0(identity_vector, "_", cluster_vector): object 'identity_vector' not found
filt_norm[["cluster_sample"]] <- concatenated_vector## Error in eval(expr, envir, enclos): object 'concatenated_vector' not found
var <- FindVariableFeatures(filt_norm)## Error in FindVariableFeatures(filt_norm): object 'filt_norm' not found
most_var <- head(VariableFeatures(var), 30)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'head': no applicable method for 'VariableFeatures' applied to an object of class "function"
variable_plot <- VariableFeaturePlot(var)## Error in UseMethod(generic = "HVFInfo", object = object): no applicable method for 'HVFInfo' applied to an object of class "function"
variable_plot <- LabelPoints(plot=variable_plot, points=most_var, repel=TRUE)## Error in lapply(X = X, FUN = FUN, ...): object 'variable_plot' not found
variable_plot## Error in eval(expr, envir, enclos): object 'variable_plot' not found
Question: Is it smart enough to use the raw data if I give FindAllMarkers the normalized data? For the moment I do not think I will risk it.
combined_markers <- FindAllMarkers(filt, only.pos=TRUE, logfc.threshold = 0.5)## Error in Idents(object = object): object 'filt' not found
head(combined_markers)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'head': object 'combined_markers' not found
brief <- unique(annotations[, c("hgnc_symbol", "description")])
combined <- as.data.frame(combined_markers)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': object 'combined_markers' not found
rownames(combined) <- toupper(rownames(combined))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'toupper': error in evaluating the argument 'x' in selecting a method for function 'rownames': object 'combined' not found
annotated_markers <- merge(combined, brief, by.x="row.names", by.y="hgnc_symbol",
all.x=TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'merge': object 'combined' not found
combined_markers <- FindAllMarkers(filt, only.pos=TRUE, logfc.threshold=0.5)## Error in Idents(object = object): object 'filt' not found
combined <- as.data.frame(combined_markers)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': object 'combined_markers' not found
rownames(combined) <- toupper(rownames(combined))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'toupper': error in evaluating the argument 'x' in selecting a method for function 'rownames': object 'combined' not found
annotated_markers <- merge(combined, brief, by.x="row.names", by.y="hgnc_symbol",
all.x=TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'merge': object 'combined' not found
head(annotated_markers)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'head': object 'annotated_markers' not found
Since I am not using the filt_norm data structure, I will need to pull the cluster information from the normalized copy…
clusters <- filt## Error in eval(expr, envir, enclos): object 'filt' not found
Idents(clusters) <- filt_norm[["res0p1_clusters"]]## Error in eval(expr, envir, enclos): object 'filt_norm' not found
cluster_markers <- FindAllMarkers(clusters, only.pos=TRUE, logfc.threshold=0.5)## Error in Idents(object = object): object 'clusters' not found
clusters <- as.data.frame(cluster_markers)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': object 'cluster_markers' not found
rownames(clusters) <- toupper(rownames(clusters))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'toupper': error in evaluating the argument 'x' in selecting a method for function 'rownames': object 'clusters' not found
annotated_clusters <- merge(clusters, brief, by.x="row.names", by.y="hgnc_symbol",
all.x=TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'merge': object 'clusters' not found
head(annotated_clusters)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'head': object 'annotated_clusters' not found
annotated_clusters %>%
group_by(cluster) %>%
dplyr::top_n(n=10, wt=avg_log2FC) %>%
as.data.frame()## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': object 'annotated_clusters' not found
sum(filt_norm[["res0p1_clusters"]] == "0")## Error in eval(expr, envir, enclos): object 'filt_norm' not found
sum(filt_norm[["res0p1_clusters"]] == "0" &
!is.na(filt_norm[["raw_clonotype_id"]]))## Error in eval(expr, envir, enclos): object 'filt_norm' not found
sum(filt_norm[["res0p1_clusters"]] == "1")## Error in eval(expr, envir, enclos): object 'filt_norm' not found
sum(filt_norm[["res0p1_clusters"]] == "1" &
!is.na(filt_norm[["raw_clonotype_id"]]))## Error in eval(expr, envir, enclos): object 'filt_norm' not found
sum(filt_norm[["res0p1_clusters"]] == "2")## Error in eval(expr, envir, enclos): object 'filt_norm' not found
sum(filt_norm[["res0p1_clusters"]] == "2" &
!is.na(filt_norm[["raw_clonotype_id"]]))## Error in eval(expr, envir, enclos): object 'filt_norm' not found
sum(filt_norm[["res0p1_clusters"]] == "3")## Error in eval(expr, envir, enclos): object 'filt_norm' not found
sum(filt_norm[["res0p1_clusters"]] == "3" &
!is.na(filt_norm[["raw_clonotype_id"]]))## Error in eval(expr, envir, enclos): object 'filt_norm' not found
sum(filt_norm[["res0p1_clusters"]] == "4")## Error in eval(expr, envir, enclos): object 'filt_norm' not found
sum(filt_norm[["res0p1_clusters"]] == "4" &
!is.na(filt_norm[["raw_clonotype_id"]]))## Error in eval(expr, envir, enclos): object 'filt_norm' not found
sum(filt_norm[["res0p1_clusters"]] == "5")## Error in eval(expr, envir, enclos): object 'filt_norm' not found
sum(filt_norm[["res0p1_clusters"]] == "5" &
!is.na(filt_norm[["raw_clonotype_id"]]))## Error in eval(expr, envir, enclos): object 'filt_norm' not found
sum(filt_norm[["res0p1_clusters"]] == "6")## Error in eval(expr, envir, enclos): object 'filt_norm' not found
sum(filt_norm[["res0p1_clusters"]] == "6" &
!is.na(filt_norm[["raw_clonotype_id"]]))## Error in eval(expr, envir, enclos): object 'filt_norm' not found
Clusters 0 and 5 have a great majority of the clonotypes. 0 has something like 90%, 5 has ~ 30%, the others ~ 10%
controln_0 <- FindMarkers(
filt, group.by="cluster_sample",
ident.1="control_0", ident.2="n_0") %>%
as.data.frame()## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': object 'filt' not found
head(controln_0)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'head': object 'controln_0' not found
rownames(controln_0) <- toupper(rownames(controln_0))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'toupper': error in evaluating the argument 'x' in selecting a method for function 'rownames': object 'controln_0' not found
controln_0 <- merge(controln_0, brief, by="row.names", by.y="hgnc_symbol",
all.x=TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'merge': object 'controln_0' not found
annotated_clusters %>%
group_by(cluster) %>%
dplyr::top_n(n=10, wt=avg_log2FC) %>%
as.data.frame()## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': object 'annotated_clusters' not found
mockvsn_0 <- FindMarkers(
filt_norm, group.by="cluster_sample",
ident.1="n_0", ident.2="mock_0") %>%
as.data.frame()## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': object 'filt_norm' not found
head(mockvsn_0)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'head': object 'mockvsn_0' not found
rownames(mockvsn_0) <- toupper(rownames(mockvsn_0))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'toupper': error in evaluating the argument 'x' in selecting a method for function 'rownames': object 'mockvsn_0' not found
mockvsn_0 <- merge(mockvsn_0, brief, by="row.names", by.y="hgnc_symbol",
all.x=TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'merge': object 'mockvsn_0' not found
mockvsm_0 <- FindMarkers(
filt_norm, group.by="cluster_sample",
ident.1="m_0", ident.2="mock_0") %>%
as.data.frame()## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': object 'filt_norm' not found
head(mockvsm_0)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'head': object 'mockvsm_0' not found
rownames(mockvsm_0) <- toupper(rownames(mockvsm_0))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'toupper': error in evaluating the argument 'x' in selecting a method for function 'rownames': object 'mockvsm_0' not found
mockvsm_0 <- merge(mockvsm_0, brief, by="row.names", by.y="hgnc_symbol",
all.x=TRUE)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'merge': object 'mockvsm_0' not found
head(mockvsm_0, n=30)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'head': object 'mockvsm_0' not found
This function makes no sense.
DefaultAssay(filt_norm) <- "RNA"## Error in DefaultAssay(filt_norm) <- "RNA": object 'filt_norm' not found
conserved_markers <- FindConservedMarkers(
filt_norm, ident.1=c(0, 1), ident.2=c(2,3,4),
grouping.var="sample", only.pos=TRUE,
verbose=TRUE)## Error in FetchData(object = object, vars = grouping.var): object 'filt_norm' not found
mock_vs_control <- FindMarkers(filt_norm, group.by = "orig.ident",
ident.1 = "mock",
ident.2 = "control")## Error in FindMarkers(filt_norm, group.by = "orig.ident", ident.1 = "mock", : object 'filt_norm' not found
head(mock_vs_control)## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'head': object 'mock_vs_control' not found
muscular_vs_mock <- FindMarkers(filt_norm, group.by = "orig.ident",
ident.1 = "m",
ident.2 = "mock")## Error in FindMarkers(filt_norm, group.by = "orig.ident", ident.1 = "m", : object 'filt_norm' not found
summary(muscular_vs_mock)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': object 'muscular_vs_mock' not found
nasal_vs_mock <- FindMarkers(filt, group.by = "orig.ident",
min.pct = 0.25, ident.1 = "n",
ident.2 = "mock")## Error in FindMarkers(filt, group.by = "orig.ident", min.pct = 0.25, ident.1 = "n", : object 'filt' not found
summary(nasal_vs_mock)## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': object 'nasal_vs_mock' not found
FeaturePlot(filt, features=c("Rgcc"),
split.by="orig.ident", max.cutoff=3, cols=c("darkgreen", "darkred"))## Error in is(x, "classRepresentation"): object 'filt' not found
This is a neat idea, I think we can repurpose it to immunology gene sets.
filt <- CellCycleScoring(
object = filt_norm,
g2m.features = cc.genes$g2m.genes,
s.features = cc.genes$s.genes)## Error in DefaultAssay(object = object): object 'filt_norm' not found
VlnPlot(filt, features = c("S.Score", "G2M.Score"),
group.by = "orig.ident",
ncol = 4, pt.size = 0)## Error in DefaultAssay(object = object): object 'filt' not found
Having written the following I realized I used an older version of my mSigDB reference… FIXME: Redo it with the 7.5+ data.
broad_types <- load_gmt_signatures(signatures = "reference/m8.all.v2022.1.Mm.symbols.gmt")
broad_list <- list()
for (i in names(broad_types)) {
broad_list[[i]] <- geneIds(broad_types[[i]])
}
wtf <- AddModuleScore(object = filt_norm, features = broad_list,
name = "m8")## Error in DefaultAssay(object = object): object 'filt_norm' not found
chosen <- c(3, 9, 11, 36, 43, 42, 14)
names(broad_types)[chosen]## [1] "DESCARTES_ORGANOGENESIS_HEPATOCYTES"
## [2] "DESCARTES_ORGANOGENESIS_WHITE_BLOOD_CELLS"
## [3] "DESCARTES_ORGANOGENESIS_EPITHELIAL_CELLS"
## [4] "DESCARTES_ORGANOGENESIS_NUETROPHILS"
## [5] "TABULA_MURIS_SENIS_BROWN_ADIPOSE_TISSUE_T_CELL_AGEING"
## [6] "TABULA_MURIS_SENIS_BROWN_ADIPOSE_TISSUE_B_CELL_AGEING"
## [7] "DESCARTES_ORGANOGENESIS_JAW_AND_TOOTH_PROGENITORS"
columns <- paste0("m8", chosen)
VlnPlot(wtf, features = columns,
group.by = "res0p1_clusters", same.y.lims = TRUE,
ncol = 4, pt.size = 0)## Error in DefaultAssay(object = object): object 'wtf' not found
chosen <- c(50, 51, 60, 61, 62, 65, 66)
names(broad_types)[chosen]## [1] "TABULA_MURIS_SENIS_BLADDER_LEUKOCYTE_AGEING"
## [2] "TABULA_MURIS_SENIS_BRAIN_MYELOID_MACROPHAGE_AGEING"
## [3] "TABULA_MURIS_SENIS_DIAPHRAGM_B_CELL_AGEING"
## [4] "TABULA_MURIS_SENIS_DIAPHRAGM_ENDOTHELIAL_CELL_AGEING"
## [5] "TABULA_MURIS_SENIS_DIAPHRAGM_MACROPHAGE_AGEING"
## [6] "TABULA_MURIS_SENIS_GONADAL_ADIPOSE_TISSUE_B_CELL_AGEING"
## [7] "TABULA_MURIS_SENIS_GONADAL_ADIPOSE_TISSUE_T_CELL_AGEING"
columns <- paste0("m8", chosen)
VlnPlot(wtf, features = columns,
group.by = "res0p1_clusters", same.y.lims = TRUE,
ncol = 4, pt.size = 0)## Error in DefaultAssay(object = object): object 'wtf' not found
chosen <- c(115, 118, 119, 120, 121, 125, 128)
names(broad_types)[chosen]## [1] "TABULA_MURIS_SENIS_LIVER_MATURE_NK_T_CELL_AGEING"
## [2] "TABULA_MURIS_SENIS_LUNG_CD4_POSITIVE_ALPHA_BETA_T_CELL_AGEING"
## [3] "TABULA_MURIS_SENIS_LUNG_CD8_POSITIVE_ALPHA_BETA_T_CELL_AGEING"
## [4] "TABULA_MURIS_SENIS_LUNG_NK_CELL_AGEING"
## [5] "TABULA_MURIS_SENIS_LUNG_T_CELL_AGEING"
## [6] "TABULA_MURIS_SENIS_LUNG_CLASSICAL_MONOCYTE_AGEING"
## [7] "TABULA_MURIS_SENIS_LUNG_INTERMEDIATE_MONOCYTE_AGEING"
columns <- paste0("m8", chosen)
VlnPlot(wtf, features = columns,
group.by = "res0p1_clusters", same.y.lims = TRUE,
ncol = 4, pt.size = 0)## Error in DefaultAssay(object = object): object 'wtf' not found
chosen <- c(212, 211, 210, 209)
names(broad_types)[chosen]## [1] "TABULA_MURIS_SENIS_TRACHEA_GRANULOCYTE_AGEING"
## [2] "TABULA_MURIS_SENIS_TRACHEA_FIBROBLAST_AGEING"
## [3] "TABULA_MURIS_SENIS_TRACHEA_ENDOTHELIAL_CELL_AGEING"
## [4] "TABULA_MURIS_SENIS_TRACHEA_BASAL_EPITHELIAL_CELL_OF_TRACHEOBRONCHIAL_TREE_AGEING"
columns <- paste0("m8", chosen)
VlnPlot(wtf, features = columns,
group.by = "res0p1_clusters", same.y.lims = TRUE,
ncol = 4, pt.size = 0)## Error in DefaultAssay(object = object): object 'wtf' not found
chosen <- c(176:182)
names(broad_types)[chosen]## [1] "TABULA_MURIS_SENIS_PANCREAS_PANCREATIC_DELTA_CELL_AGEING"
## [2] "TABULA_MURIS_SENIS_PANCREAS_PANCREATIC_POLYPEPTIDE_CELL_AGEING"
## [3] "TABULA_MURIS_SENIS_PANCREAS_PANCREATIC_ACINAR_CELL_AGEING"
## [4] "TABULA_MURIS_SENIS_PANCREAS_PANCREATIC_DUCTAL_CELL_AGEING"
## [5] "TABULA_MURIS_SENIS_PANCREAS_PANCREATIC_STELLATE_CELL_AGEING"
## [6] "TABULA_MURIS_SENIS_SUBCUTANEOUS_ADIPOSE_TISSUE_B_CELL_AGEING"
## [7] "TABULA_MURIS_SENIS_SUBCUTANEOUS_ADIPOSE_TISSUE_ENDOTHELIAL_CELL_AGEING"
columns <- paste0("m8", chosen)
VlnPlot(wtf, features = columns,
group.by = "res0p1_clusters", same.y.lims = TRUE,
ncol = 4, pt.size = 0)## Error in DefaultAssay(object = object): object 'wtf' not found
chosen <- c(42:47)
names(broad_types)[chosen]## [1] "TABULA_MURIS_SENIS_BROWN_ADIPOSE_TISSUE_B_CELL_AGEING"
## [2] "TABULA_MURIS_SENIS_BROWN_ADIPOSE_TISSUE_T_CELL_AGEING"
## [3] "TABULA_MURIS_SENIS_BROWN_ADIPOSE_TISSUE_ENDOTHELIAL_CELL_AGEING"
## [4] "TABULA_MURIS_SENIS_BROWN_ADIPOSE_TISSUE_MESENCHYMAL_STEM_CELL_OF_ADIPOSE_AGEING"
## [5] "TABULA_MURIS_SENIS_BROWN_ADIPOSE_TISSUE_MYELOID_CELL_AGEING"
## [6] "TABULA_MURIS_SENIS_BLADDER_BLADDER_CELL_AGEING"
columns <- paste0("m8", chosen)
VlnPlot(wtf, features = columns,
group.by = "res0p1_clusters", same.y.lims = TRUE,
ncol = 4, pt.size = 0)## Error in DefaultAssay(object = object): object 'wtf' not found
t_groups_idx <- grepl(pattern="_T_CELL", x=names(broad_types))
t_groups <- names(broad_types)[t_groups_idx]
t_nums <- which(t_groups_idx, broad_types)
columns <- paste0("m8", t_nums)
VlnPlot(wtf, features = columns,
group.by = "res0p1_clusters", same.y.lims = TRUE,
ncol = 4, pt.size = 0)## Error in DefaultAssay(object = object): object 'wtf' not found
t_groups## [1] "TABULA_MURIS_SENIS_BROWN_ADIPOSE_TISSUE_T_CELL_AGEING"
## [2] "TABULA_MURIS_SENIS_GONADAL_ADIPOSE_TISSUE_T_CELL_AGEING"
## [3] "TABULA_MURIS_SENIS_HEART_T_CELL_AGEING"
## [4] "TABULA_MURIS_SENIS_KIDNEY_T_CELL_AGEING"
## [5] "TABULA_MURIS_SENIS_LIMB_MUSCLE_T_CELL_AGEING"
## [6] "TABULA_MURIS_SENIS_LIVER_MATURE_NK_T_CELL_AGEING"
## [7] "TABULA_MURIS_SENIS_LUNG_CD4_POSITIVE_ALPHA_BETA_T_CELL_AGEING"
## [8] "TABULA_MURIS_SENIS_LUNG_CD8_POSITIVE_ALPHA_BETA_T_CELL_AGEING"
## [9] "TABULA_MURIS_SENIS_LUNG_T_CELL_AGEING"
## [10] "TABULA_MURIS_SENIS_LUNG_MATURE_NK_T_CELL_AGEING"
## [11] "TABULA_MURIS_SENIS_MESENTERIC_ADIPOSE_TISSUE_CD4_POSITIVE_ALPHA_BETA_T_CELL_AGEING"
## [12] "TABULA_MURIS_SENIS_MESENTERIC_ADIPOSE_TISSUE_CD8_POSITIVE_ALPHA_BETA_T_CELL_AGEING"
## [13] "TABULA_MURIS_SENIS_MAMMARY_GLAND_T_CELL_AGEING"
## [14] "TABULA_MURIS_SENIS_MARROW_CD4_POSITIVE_ALPHA_BETA_T_CELL_AGEING"
## [15] "TABULA_MURIS_SENIS_MARROW_MATURE_ALPHA_BETA_T_CELL_AGEING"
## [16] "TABULA_MURIS_SENIS_MARROW_NAIVE_T_CELL_AGEING"
## [17] "TABULA_MURIS_SENIS_SPLEEN_CD4_POSITIVE_ALPHA_BETA_T_CELL_AGEING"
## [18] "TABULA_MURIS_SENIS_SPLEEN_CD8_POSITIVE_ALPHA_BETA_T_CELL_AGEING"
## [19] "TABULA_MURIS_SENIS_SPLEEN_T_CELL_AGEING"
## [20] "TABULA_MURIS_SENIS_SPLEEN_MATURE_NK_T_CELL_AGEING"
## [21] "TABULA_MURIS_SENIS_THYMUS_IMMATURE_T_CELL_AGEING"
## [22] "TABULA_MURIS_SENIS_TRACHEA_T_CELL_AGEING"
t_groups_idx <- grepl(pattern="_EPITHELIAL_", x=names(broad_types))
t_groups <- names(broad_types)[t_groups_idx]
t_nums <- which(t_groups_idx, broad_types)
columns <- paste0("m8", t_nums)
VlnPlot(wtf, features = columns,
group.by = "res0p1_clusters", same.y.lims = TRUE,
ncol = 4, pt.size = 0)## Error in DefaultAssay(object = object): object 'wtf' not found
t_groups## [1] "DESCARTES_ORGANOGENESIS_EPITHELIAL_CELLS"
## [2] "TABULA_MURIS_SENIS_KIDNEY_EPITHELIAL_CELL_OF_PROXIMAL_TUBULE_AGEING"
## [3] "TABULA_MURIS_SENIS_KIDNEY_KIDNEY_COLLECTING_DUCT_EPITHELIAL_CELL_AGEING"
## [4] "TABULA_MURIS_SENIS_KIDNEY_KIDNEY_DISTAL_CONVOLUTED_TUBULE_EPITHELIAL_CELL_AGEING"
## [5] "TABULA_MURIS_SENIS_KIDNEY_KIDNEY_LOOP_OF_HENLE_ASCENDING_LIMB_EPITHELIAL_CELL_AGEING"
## [6] "TABULA_MURIS_SENIS_KIDNEY_KIDNEY_LOOP_OF_HENLE_THICK_ASCENDING_LIMB_EPITHELIAL_CELL_AGEING"
## [7] "TABULA_MURIS_SENIS_KIDNEY_KIDNEY_PROXIMAL_CONVOLUTED_TUBULE_EPITHELIAL_CELL_AGEING"
## [8] "TABULA_MURIS_SENIS_MAMMARY_GLAND_LUMINAL_EPITHELIAL_CELL_OF_MAMMARY_GLAND_AGEING"
## [9] "TABULA_MURIS_SENIS_SUBCUTANEOUS_ADIPOSE_TISSUE_EPITHELIAL_CELL_AGEING"
## [10] "TABULA_MURIS_SENIS_TRACHEA_BASAL_EPITHELIAL_CELL_OF_TRACHEOBRONCHIAL_TREE_AGEING"
t_groups_idx <- grepl(pattern="_ENDOTHELIAL_", x=names(broad_types))
t_groups <- names(broad_types)[t_groups_idx]
t_nums <- which(t_groups_idx, broad_types)
columns <- paste0("m8", t_nums)
VlnPlot(wtf, features = columns,
group.by = "res0p1_clusters", same.y.lims = TRUE,
ncol = 4, pt.size = 0)## Error in DefaultAssay(object = object): object 'wtf' not found
t_groups## [1] "DESCARTES_ORGANOGENESIS_ENDOTHELIAL_CELLS"
## [2] "TABULA_MURIS_SENIS_AORTA_AORTIC_ENDOTHELIAL_CELL_AGEING"
## [3] "TABULA_MURIS_SENIS_BROWN_ADIPOSE_TISSUE_ENDOTHELIAL_CELL_AGEING"
## [4] "TABULA_MURIS_SENIS_BLADDER_ENDOTHELIAL_CELL_AGEING"
## [5] "TABULA_MURIS_SENIS_BRAIN_NON_MYELOID_ENDOTHELIAL_CELL_AGEING"
## [6] "TABULA_MURIS_SENIS_DIAPHRAGM_ENDOTHELIAL_CELL_AGEING"
## [7] "TABULA_MURIS_SENIS_GONADAL_ADIPOSE_TISSUE_ENDOTHELIAL_CELL_AGEING"
## [8] "TABULA_MURIS_SENIS_HEART_ENDOTHELIAL_CELL_OF_CORONARY_ARTERY_AGEING"
## [9] "TABULA_MURIS_SENIS_HEART_AND_AORTA_ENDOTHELIAL_CELL_OF_CORONARY_ARTERY_AGEING"
## [10] "TABULA_MURIS_SENIS_LIMB_MUSCLE_ENDOTHELIAL_CELL_AGEING"
## [11] "TABULA_MURIS_SENIS_LIVER_ENDOTHELIAL_CELL_OF_HEPATIC_SINUSOID_AGEING"
## [12] "TABULA_MURIS_SENIS_LUNG_ENDOTHELIAL_CELL_OF_LYMPHATIC_VESSEL_AGEING"
## [13] "TABULA_MURIS_SENIS_LUNG_VEIN_ENDOTHELIAL_CELL_AGEING"
## [14] "TABULA_MURIS_SENIS_MESENTERIC_ADIPOSE_TISSUE_ENDOTHELIAL_CELL_AGEING"
## [15] "TABULA_MURIS_SENIS_MAMMARY_GLAND_ENDOTHELIAL_CELL_AGEING"
## [16] "TABULA_MURIS_SENIS_PANCREAS_ENDOTHELIAL_CELL_AGEING"
## [17] "TABULA_MURIS_SENIS_SUBCUTANEOUS_ADIPOSE_TISSUE_ENDOTHELIAL_CELL_AGEING"
## [18] "TABULA_MURIS_SENIS_TRACHEA_ENDOTHELIAL_CELL_AGEING"
pander::pander(sessionInfo())R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
locale: LC_CTYPE=en_US.UTF-8, LC_NUMERIC=C, LC_TIME=en_US.UTF-8, LC_COLLATE=en_US.UTF-8, LC_MONETARY=en_US.UTF-8, LC_MESSAGES=en_US.UTF-8, LC_PAPER=en_US.UTF-8, LC_NAME=C, LC_ADDRESS=C, LC_TELEPHONE=C, LC_MEASUREMENT=en_US.UTF-8 and LC_IDENTIFICATION=C
attached base packages: stats4, stats, graphics, grDevices, utils, datasets, methods and base
other attached packages: GSEABase(v.1.60.0), graph(v.1.76.0), annotate(v.1.76.0), XML(v.3.99-0.13), AnnotationDbi(v.1.60.0), skimr(v.2.1.5), purrr(v.1.0.0), ggplot2(v.3.4.0), SeuratObject(v.4.1.3), Seurat(v.4.3.0), hpgltools(v.1.0), testthat(v.3.1.6), reticulate(v.1.26), SummarizedExperiment(v.1.28.0), GenomicRanges(v.1.50.2), GenomeInfoDb(v.1.34.6), IRanges(v.2.32.0), S4Vectors(v.0.36.1), MatrixGenerics(v.1.10.0), matrixStats(v.0.63.0), Biobase(v.2.58.0) and BiocGenerics(v.0.44.0)
loaded via a namespace (and not attached): ica(v.1.0-3), ps(v.1.7.2), Rsamtools(v.2.14.0), foreach(v.1.5.2), lmtest(v.0.9-40), rprojroot(v.2.0.3), crayon(v.1.5.2), rbibutils(v.2.2.11), MASS(v.7.3-58.1), nlme(v.3.1-161), backports(v.1.4.1), sva(v.3.46.0), GOSemSim(v.2.24.0), rlang(v.1.0.6), XVector(v.0.38.0), HDO.db(v.0.99.1), ROCR(v.1.0-11), irlba(v.2.3.5.1), nloptr(v.2.0.3), callr(v.3.7.3), limma(v.3.54.0), filelock(v.1.0.2), BiocParallel(v.1.32.5), rjson(v.0.2.21), bit64(v.4.0.5), glue(v.1.6.2), sctransform(v.0.3.5), pbkrtest(v.0.5.1), parallel(v.4.2.0), processx(v.3.8.0), spatstat.sparse(v.3.0-0), DOSE(v.3.24.2), spatstat.geom(v.3.0-3), tidyselect(v.1.2.0), usethis(v.2.1.6), fitdistrplus(v.1.1-8), variancePartition(v.1.28.0), tidyr(v.1.2.1), zoo(v.1.8-11), qqconf(v.1.3.1), GenomicAlignments(v.1.34.0), xtable(v.1.8-4), magrittr(v.2.0.3), evaluate(v.0.19), Rdpack(v.2.4), cli(v.3.5.0), zlibbioc(v.1.44.0), sn(v.2.1.0), rstudioapi(v.0.14), miniUI(v.0.1.1.1), sp(v.1.5-1), bslib(v.0.4.2), mathjaxr(v.1.6-0), fastmatch(v.1.1-3), aod(v.1.3.2), treeio(v.1.22.0), shiny(v.1.7.4), xfun(v.0.36), multtest(v.2.54.0), pkgbuild(v.1.4.0), gson(v.0.0.9), cluster(v.2.1.4), caTools(v.1.18.2), tidygraph(v.1.2.2), KEGGREST(v.1.38.0), tibble(v.3.1.8), ggrepel(v.0.9.2), ape(v.5.6-2), listenv(v.0.9.0), Biostrings(v.2.66.0), png(v.0.1-8), future(v.1.30.0), withr(v.2.5.0), bitops(v.1.0-7), ggforce(v.0.4.1), plyr(v.1.8.8), pillar(v.1.8.1), gplots(v.3.1.3), cachem(v.1.0.6), GenomicFeatures(v.1.50.3), multcomp(v.1.4-20), fs(v.1.5.2), clusterProfiler(v.4.6.0), vctrs(v.0.5.1), ellipsis(v.0.3.2), generics(v.0.1.3), devtools(v.2.4.5), metap(v.1.8), tools(v.4.2.0), munsell(v.0.5.0), tweenr(v.2.0.2), fgsea(v.1.24.0), DelayedArray(v.0.24.0), fastmap(v.1.1.0), compiler(v.4.2.0), pkgload(v.1.3.2), abind(v.1.4-5), httpuv(v.1.6.7), rtracklayer(v.1.58.0), sessioninfo(v.1.2.2), plotly(v.4.10.1), GenomeInfoDbData(v.1.2.9), gridExtra(v.2.3), edgeR(v.3.40.1), lattice(v.0.20-45), deldir(v.1.0-6), mutoss(v.0.1-12), utf8(v.1.2.2), later(v.1.3.0), dplyr(v.1.0.10), BiocFileCache(v.2.6.0), jsonlite(v.1.8.4), scales(v.1.2.1), tidytree(v.0.4.2), pbapply(v.1.6-0), genefilter(v.1.80.2), lazyeval(v.0.2.2), promises(v.1.2.0.1), doParallel(v.1.0.17), goftest(v.1.2-3), spatstat.utils(v.3.0-1), sandwich(v.3.0-2), rmarkdown(v.2.19), cowplot(v.1.1.1), Rtsne(v.0.16), pander(v.0.6.5), downloader(v.0.4), uwot(v.0.1.14), igraph(v.1.3.5), plotrix(v.3.8-2), survival(v.3.4-0), numDeriv(v.2016.8-1.1), yaml(v.2.3.6), htmltools(v.0.5.4), memoise(v.2.0.1), profvis(v.0.3.7), BiocIO(v.1.8.0), locfit(v.1.5-9.7), graphlayouts(v.0.8.4), viridisLite(v.0.4.1), digest(v.0.6.31), assertthat(v.0.2.1), RhpcBLASctl(v.0.21-247.1), mime(v.0.12), rappdirs(v.0.3.3), repr(v.1.1.4), RSQLite(v.2.2.20), yulab.utils(v.0.0.6), future.apply(v.1.10.0), remotes(v.2.4.2), data.table(v.1.14.6), urlchecker(v.1.0.1), blob(v.1.2.3), splines(v.4.2.0), RCurl(v.1.98-1.9), broom(v.1.0.2), hms(v.1.1.2), colorspace(v.2.0-3), base64enc(v.0.1-3), mnormt(v.2.1.1), aplot(v.0.1.9), sass(v.0.4.4), Rcpp(v.1.0.9), RANN(v.2.6.1), mvtnorm(v.1.1-3), enrichplot(v.1.18.3), fansi(v.1.0.3), brio(v.1.1.3), parallelly(v.1.33.0), R6(v.2.5.1), grid(v.4.2.0), ggridges(v.0.5.4), lifecycle(v.1.0.3), TFisher(v.0.2.0), curl(v.4.3.3), minqa(v.1.2.5), leiden(v.0.4.3), jquerylib(v.0.1.4), PROPER(v.1.30.0), Matrix(v.1.5-3), qvalue(v.2.30.0), TH.data(v.1.1-1), desc(v.1.4.2), RcppAnnoy(v.0.0.20), RColorBrewer(v.1.1-3), iterators(v.1.0.14), spatstat.explore(v.3.0-5), stringr(v.1.5.0), htmlwidgets(v.1.6.0), polyclip(v.1.10-4), biomaRt(v.2.54.0), shadowtext(v.0.1.2), gridGraphics(v.0.5-1), mgcv(v.1.8-41), globals(v.0.16.2), patchwork(v.1.1.2), spatstat.random(v.3.0-1), progressr(v.0.12.0), codetools(v.0.2-18), GO.db(v.3.16.0), gtools(v.3.9.4), prettyunits(v.1.1.1), dbplyr(v.2.2.1), gtable(v.0.3.1), DBI(v.1.1.3), ggfun(v.0.0.9), tensor(v.1.5), httr(v.1.4.4), KernSmooth(v.2.23-20), stringi(v.1.7.8), progress(v.1.2.2), reshape2(v.1.4.4), farver(v.2.1.1), viridis(v.0.6.2), ggtree(v.3.6.2), xml2(v.1.3.3), boot(v.1.3-28.1), lme4(v.1.1-31), restfulr(v.0.0.15), ggplotify(v.0.1.0), scattermore(v.0.8), bit(v.4.0.5), scatterpie(v.0.1.8), spatstat.data(v.3.0-0), ggraph(v.2.1.0), pkgconfig(v.2.0.3) and knitr(v.1.41)
message(paste0("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 911e7d4beebdc73267ec4be631a305574289efd3
## This is hpgltools commit: Tue Jan 17 10:36:44 2023 -0500: 911e7d4beebdc73267ec4be631a305574289efd3
this_save <- paste0(gsub(pattern="\\.Rmd", replace="", x=rmd_file), "-v", ver, ".rda.xz")
##message(paste0("Saving to ", this_save))
##tmp <- sm(saveme(filename=this_save))