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
done
module 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/
<- load_biomart_annotations()$annotation annotations
## The biomart annotations file already exists, loading from it.
<- unique(annotations[, c("hgnc_symbol", "description")]) brief
<- "multi"
prefix # 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…
<- function(seurat_obj, name="control", type="t", prefix=prefix) {
add_clonotype <- glue::glue("{prefix}/{name}/outs/per_sample_outs/{name}/vdj_t")
vdj_directory <- glue::glue("{vdj_directory}/filtered_contig_annotations.csv")
vdj_csv <- glue::glue("{vdj_directory}/clonotypes.csv")
reference_csv <- readr::read_csv(vdj_csv, show_col_types = FALSE)
tcr <- readr::read_csv(reference_csv, show_col_types = FALSE)
ref
<- duplicated(tcr[["barcode"]])
tcr_duplicate_barcode_idx <- tcr[!tcr_duplicate_barcode_idx, ]
tcr_nodup
<- as.data.frame(merge(tcr_nodup, ref, by.x="raw_clonotype_id", by.y="clonotype_id"))
both rownames(both) <- both[["barcode"]]
"barcode"]] <- NULL
both[[
<- Seurat::AddMetaData(object=seurat_obj, metadata=both)
new 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.
<- "control"
name <- glue::glue("{prefix}/{name}/outs/per_sample_outs/{name}/count/sample_filtered_feature_bc_matrix")
path <- Seurat::Read10X(path) %>%
a_control 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?
<- "mock"
name <- glue::glue("{prefix}/{name}/outs/per_sample_outs/{name}/count/sample_filtered_feature_bc_matrix")
path <- Seurat::Read10X(path) %>%
a_mock 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?
<- "m"
name <- glue::glue("{prefix}/{name}/outs/per_sample_outs/{name}/count/sample_filtered_feature_bc_matrix")
path <- Seurat::Read10X(path) %>%
a_m 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?
<- "n"
name <- glue::glue("{prefix}/{name}/outs/per_sample_outs/{name}/count/sample_filtered_feature_bc_matrix")
path <- Seurat::Read10X(path) %>%
a_n 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.
<- merge(a_control, a_mock) %>%
all 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
<- !is.na(a_control[["raw_clonotype_id"]]) control_clono
## 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
<- !is.na(a_mock[["raw_clonotype_id"]]) mock_clono
## 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
<- !is.na(a_m[["raw_clonotype_id"]]) m_clono
## 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
<- !is.na(a_n[["raw_clonotype_id"]]) n_clono
## 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.
<- as.factor(LETTERS[Idents(object=all)]) cluster_letters
## 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
<- as.character(cluster_letters) control_ids
## Error in eval(expr, envir, enclos): object 'cluster_letters' not found
<- control mock_ids
## Error in eval(expr, envir, enclos): object 'control' not found
<- control m_vaccine_ids
## Error in eval(expr, envir, enclos): object 'control' not found
<- control n_vaccine_ids
## 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 == "A" control_idx
## Error in eval(expr, envir, enclos): object 'control' not found
<- "Control" control[control_idx]
## Error in control[control_idx] <- "Control": object 'control' not found
!control_idx] <- "Stimulated" control[
## Error in control[!control_idx] <- "Stimulated": object 'control' not found
<- mock == "B" mock_idx
## Error in eval(expr, envir, enclos): object 'mock' not found
<- "Mock" mock[mock_idx]
## Error in mock[mock_idx] <- "Mock": object 'mock' not found
!mock_idx] <- "Not mock" mock[
## Error in mock[!mock_idx] <- "Not mock": object 'mock' not found
<- m_vaccine == "C" m_vaccine_idx
## Error in eval(expr, envir, enclos): object 'm_vaccine' not found
<- "Muscular" m_vaccine[m_vaccine_idx]
## Error in m_vaccine[m_vaccine_idx] <- "Muscular": object 'm_vaccine' not found
!m_vaccine_idx] <- "Not Muscular" m_vaccine[
## Error in m_vaccine[!m_vaccine_idx] <- "Not Muscular": object 'm_vaccine' not found
<- n_vaccine == "D" n_vaccine_idx
## Error in eval(expr, envir, enclos): object 'n_vaccine' not found
<- "Nasal" n_vaccine[n_vaccine_idx]
## Error in n_vaccine[n_vaccine_idx] <- "Nasal": object 'n_vaccine' not found
!n_vaccine_idx] <- "Not Nasal" n_vaccine[
## 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.
<- AddMetaData(
all 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"
<- AddMetaData(
all 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"
<- AddMetaData(
all 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"
<- AddMetaData(
all 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"
<- AddMetaData(
all 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…
<- 200
min_num_rna <- 5
min_pct_ribo <- 20
max_pct_mito
"percent_mt"]] <- PercentageFeatureSet(all, pattern="^mt-") all[[
## Error in UseMethod(generic = "DefaultAssay", object = object): no applicable method for 'DefaultAssay' applied to an object of class "function"
"percent_ribo"]] <- PercentageFeatureSet(all, pattern="^Rp[sl]") all[[
## 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
<- as_tibble(data.frame(
sample_summaries "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.
<- function(sample_summaries, meta,
add_summaries new_column = "unknown", group_column = "orig.ident",
meta_query = "percent_mt", summary_query = "numeric.mean") {
<- meta %>%
sample_summaries[[new_column]] group_by(!!rlang::sym(group_column)) %>%
skim_tee(meta_query) %>%
skim(meta_query) %>%
::select(summary_query)
dplyrreturn(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"
<- WhichCells(all, expression = nFeature_RNA >= min_num_rna) sufficient_rna_observed
## Error in UseMethod(generic = "WhichCells", object = object): no applicable method for 'WhichCells' applied to an object of class "function"
<- subset(all, cells = sufficient_rna_observed) filt
## Error in subset.default(all, cells = sufficient_rna_observed): argument "subset" is missing, with no default
"ncells_filtrna"]] <- c(
sample_summaries[[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.
<- rowSums(filt) > 3 sufficiently_observed_idx
## 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
<- subset(filt, features = rownames(filt)[sufficiently_observed_idx]) filt
## 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).
<- WhichCells(filt, expression = percent_ribo >= min_pct_ribo) high_ribosomal
## Error in WhichCells(filt, expression = percent_ribo >= min_pct_ribo): object 'filt' not found
<- subset(filt, cells = high_ribosomal) filt
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'subset': object 'filt' not found
"ncells_filtribo"]] <- c(
sample_summaries[[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
<- WhichCells(filt, expression = percent_mt <= max_pct_mito) low_mitochondrial
## Error in WhichCells(filt, expression = percent_mt <= max_pct_mito): object 'filt' not found
<- subset(filt, cells = low_mitochondrial) filt
## 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
"ncells_filtmito"]] <- c(
sample_summaries[[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
<- NormalizeData(object=all) %>%
all_norm 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
<- DimPlot(all_norm, reduction="umap", group.by="cluster_letters", label=TRUE) plotted
## Error in is.data.frame(x): object 'all_norm' not found
plotted
## Error in eval(expr, envir, enclos): object 'plotted' not found
<- NormalizeData(object=filt) %>%
filt_norm 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
<- DimPlot(filt_norm, reduction="umap", group.by="cluster_letters", label=TRUE) plotted
## Error in is.data.frame(x): object 'filt_norm' not found
plotted
## Error in eval(expr, envir, enclos): object 'plotted' not found
<- JackStraw(filt_norm, num.replicate=10) filt_norm
## Error in DefaultAssay(object = object): object 'filt_norm' not found
<- ScoreJackStraw(filt_norm) 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?
<- 6
wanted_dims
<- FindNeighbors(filt_norm, dims=1:wanted_dims) %>%
filt_norm 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
<- FindClusters(filt_norm, resolution=0.1) %>%
filt_norm 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
<- filt_norm[["orig.ident"]][["orig.ident"]] identity_vector
## 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
<- as.character(filt_norm[["res0p1_clusters"]][["res0p1_clusters"]]) cluster_vector
## Error in eval(expr, envir, enclos): object 'filt_norm' not found
<- paste0(identity_vector, "_", cluster_vector) concatenated_vector
## Error in paste0(identity_vector, "_", cluster_vector): object 'identity_vector' not found
"cluster_sample"]] <- concatenated_vector filt_norm[[
## Error in eval(expr, envir, enclos): object 'concatenated_vector' not found
<- FindVariableFeatures(filt_norm) var
## Error in FindVariableFeatures(filt_norm): object 'filt_norm' not found
<- head(VariableFeatures(var), 30) most_var
## 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"
<- VariableFeaturePlot(var) variable_plot
## Error in UseMethod(generic = "HVFInfo", object = object): no applicable method for 'HVFInfo' applied to an object of class "function"
<- LabelPoints(plot=variable_plot, points=most_var, repel=TRUE) variable_plot
## 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.
<- FindAllMarkers(filt, only.pos=TRUE, logfc.threshold = 0.5) combined_markers
## 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
<- unique(annotations[, c("hgnc_symbol", "description")])
brief <- as.data.frame(combined_markers) combined
## 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
<- merge(combined, brief, by.x="row.names", by.y="hgnc_symbol",
annotated_markers 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
<- FindAllMarkers(filt, only.pos=TRUE, logfc.threshold=0.5) combined_markers
## Error in Idents(object = object): object 'filt' not found
<- as.data.frame(combined_markers) combined
## 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
<- merge(combined, brief, by.x="row.names", by.y="hgnc_symbol",
annotated_markers 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…
<- filt clusters
## 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
<- FindAllMarkers(clusters, only.pos=TRUE, logfc.threshold=0.5) cluster_markers
## Error in Idents(object = object): object 'clusters' not found
<- as.data.frame(cluster_markers) clusters
## 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
<- merge(clusters, brief, by.x="row.names", by.y="hgnc_symbol",
annotated_clusters 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) %>%
::top_n(n=10, wt=avg_log2FC) %>%
dplyras.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%
<- FindMarkers(
controln_0 group.by="cluster_sample",
filt, 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
<- merge(controln_0, brief, by="row.names", by.y="hgnc_symbol",
controln_0 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) %>%
::top_n(n=10, wt=avg_log2FC) %>%
dplyras.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
<- FindMarkers(
mockvsn_0 group.by="cluster_sample",
filt_norm, 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
<- merge(mockvsn_0, brief, by="row.names", by.y="hgnc_symbol",
mockvsn_0 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
<- FindMarkers(
mockvsm_0 group.by="cluster_sample",
filt_norm, 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
<- merge(mockvsm_0, brief, by="row.names", by.y="hgnc_symbol",
mockvsm_0 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
<- FindConservedMarkers(
conserved_markers ident.1=c(0, 1), ident.2=c(2,3,4),
filt_norm, grouping.var="sample", only.pos=TRUE,
verbose=TRUE)
## Error in FetchData(object = object, vars = grouping.var): object 'filt_norm' not found
<- FindMarkers(filt_norm, group.by = "orig.ident",
mock_vs_control 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
<- FindMarkers(filt_norm, group.by = "orig.ident",
muscular_vs_mock 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
<- FindMarkers(filt, group.by = "orig.ident",
nasal_vs_mock 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.
<- CellCycleScoring(
filt 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.
<- load_gmt_signatures(signatures = "reference/m8.all.v2022.1.Mm.symbols.gmt")
broad_types <- list()
broad_list for (i in names(broad_types)) {
<- geneIds(broad_types[[i]])
broad_list[[i]]
}<- AddModuleScore(object = filt_norm, features = broad_list,
wtf name = "m8")
## Error in DefaultAssay(object = object): object 'filt_norm' not found
<- c(3, 9, 11, 36, 43, 42, 14)
chosen 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"
<- paste0("m8", chosen)
columns 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
<- c(50, 51, 60, 61, 62, 65, 66)
chosen 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"
<- paste0("m8", chosen)
columns 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
<- c(115, 118, 119, 120, 121, 125, 128)
chosen 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"
<- paste0("m8", chosen)
columns 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
<- c(212, 211, 210, 209)
chosen 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"
<- paste0("m8", chosen)
columns 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
<- c(176:182)
chosen 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"
<- paste0("m8", chosen)
columns 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
<- c(42:47)
chosen 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"
<- paste0("m8", chosen)
columns 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
<- grepl(pattern="_T_CELL", x=names(broad_types))
t_groups_idx <- names(broad_types)[t_groups_idx]
t_groups <- which(t_groups_idx, broad_types)
t_nums <- paste0("m8", t_nums)
columns 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"
<- grepl(pattern="_EPITHELIAL_", x=names(broad_types))
t_groups_idx <- names(broad_types)[t_groups_idx]
t_groups <- which(t_groups_idx, broad_types)
t_nums <- paste0("m8", t_nums)
columns 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"
<- grepl(pattern="_ENDOTHELIAL_", x=names(broad_types))
t_groups_idx <- names(broad_types)[t_groups_idx]
t_groups <- which(t_groups_idx, broad_types)
t_nums <- paste0("m8", t_nums)
columns 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(sessionInfo()) pander
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
<- paste0(gsub(pattern="\\.Rmd", replace="", x=rmd_file), "-v", ver, ".rda.xz")
this_save ##message(paste0("Saving to ", this_save))
##tmp <- sm(saveme(filename=this_save))