vertesy / seurat.pipeline Goto Github PK
View Code? Open in Web Editor NEWSeurat Pipeline using the Seurat.utils package
License: GNU General Public License v3.0
Seurat Pipeline using the Seurat.utils package
License: GNU General Public License v3.0
if (TRUE) source('~/GitHub/Packages/Seurat.pipeline/elements/Gene.expression.gene.lists.R')
source('~/GitHub/Projects/AUT/GeneLists.AUT.R')
@misc
Description
AddGOGeneList.manual()
missing in if (TRUE) source('~/GitHub/Packages/Seurat.pipeline/elements/Differential.gene.expression.Loop.R'); create_set_Original_OutDir()
AddGOGeneList.manual <- function(obj = combined.obj, GO = 'GO:0034976' # Add GO terms via Biomart package
, genes = c("A0A140VKG3", "ARX", "CNTN2", "DRD1", "DRD2", "FEZF2", "LHX6")) {
genes <- IntersectWithExpressed(obj = obj, genes = genes)
if (is.null(obj@misc$GO)) obj@misc$GO <- list()
obj@misc$GO[[make.names(GO)]] <- genes
iprint("Genes in", GO, "are saved under obj@misc$GO$", make.names(GO))
if (web.open) system(paste0("open https://www.ebi.ac.uk/QuickGO/search/", GO))
return(obj)
}
Both aim at the same goal, neither are complete.
Iteration index i
missing in add.meta.fraction(..., obj = ls.Seurat[[1]])
.
Visualization by RStudio / Seurat
Link to What do you find in the single-cell analysis folder?
Step | Command | Description |
---|---|---|
1 | install.packages() |
install packages |
2 | require() |
load package |
3 | readRDS() |
load Seurat object (sc data) |
4 | recall.all.genes() |
create list of genes (all.genes |
5 | all.genes$SATB2 |
search for genes |
6 | qUMAP() |
plot gene |
7 | clUMAP() |
plot cluster |
For the RenameGenes function in Seurat utils, how exactly does one manipulate the code to replace the dimnames with a new set of genes? I have a csv file containing the new names for all 28,444 genes in the original Seurat object, and would like to replace them with those names. In other words, what exactly does one change for "ls.Seurat" and "HGNC.updated.genes$Suggested.Symbol"? Thanks so much!
RenameGenesSeurat <- function(obj = ls.Seurat[[i]], newnames = HGNC.updated[[i]]$Suggested.Symbol) { # Replace gene names in different slots of a Seurat object. Run this before integration. Run this before integration. It only changes obj@assays$RNA@counts, @DaTa and @scale.data.
print("Run this before integration. It only changes obj@assays$RNA@counts, @DaTa and @scale.data.")
RNA <- obj@assays$RNA
if (nrow(RNA) == length(newnames)) {
if (length(RNA@counts)) RNA@counts@Dimnames[[1]] <- newnames
if (length(RNA@data)) RNA@data@Dimnames[[1]] <- newnames
if (length(RNA@scale.data)) RNA@scale.data@Dimnames[[1]] <- newnames
} else {"Unequal gene sets: nrow(RNA) != nrow(newnames)"}
obj@assays$RNA <- RNA
return(obj)
}
##RenameGenesSeurat(obj = SeuratObj, newnames = HGNC.updated.genes$Suggested.Symbol)
Description
A var seems like a df instead of a vector
if (TRUE) source("~/GitHub/Packages/Seurat.pipeline/elements/STRING.db.auto.cluster.annotation.R"); create_set_Original_OutDir()
error in
clnames.GO[cl.char] <-
if (nrow(enrichmentGO)) {
enrichmentGO$description[specific.GO.terms][1]
} else {ppp('No Enrichment', i)} # if
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.