Code Monkey home page Code Monkey logo

seurat.pipeline's People

Contributors

vertesy avatar

Stargazers

 avatar

Watchers

 avatar  avatar

seurat.pipeline's Issues

AddGOGeneList.manual() used, but now only part of Gruffi's source code

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)
}

Rename Genes Clarification

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)

Error in STRING.db.auto.cluster.annotation.R

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.