Giter VIP home page Giter VIP logo

Comments (13)

yanwu2014 avatar yanwu2014 commented on July 29, 2024

Ah sorry it should be GetAssayData instead of AssayData. Let me know if that works!

from swne.

hgb1111 avatar hgb1111 commented on July 29, 2024

It still did not work :/

`

AssayData(se.obj, slot = "counts") <- FilterData(GetAssayData(se.obj, slot = "counts"), min.samples.frac = 0.0025, min.nonzero.features = 200, trim = 0.0025)

#Error in AssayData(se.obj, slot = "counts") <- FilterData(GetAssayData(se.obj, :
could not find function "AssayData<-"

GetAssayData(se.obj, slot = "counts") <- FilterData(GetAssayData(se.obj, slot = "counts"), min.samples.frac = 0.0025, min.nonzero.features = 200, trim = 0.0025)

#Error in GetAssayData(se.obj, slot = "counts") <- FilterData(GetAssayData(se.obj, :
could not find function "GetAssayData<-"`

from swne.

yanwu2014 avatar yanwu2014 commented on July 29, 2024

Are you sure you have Seurat V3 installed? Also it should be:

SetAssayData(se.obj, slot = "counts") <- FilterData(GetAssayData(se.obj, slot = "counts"), min.samples.frac = 0.0025, min.nonzero.features = 200, trim = 0.0025)

from swne.

hgb1111 avatar hgb1111 commented on July 29, 2024
> SetAssayData(se.obj, slot = "counts") <- FilterData(GetAssayData(se.obj, slot = "counts"), min.samples.frac = 0.0025, min.nonzero.features = 200, trim = 0.0025)

#Error in SetAssayData(se.obj, slot = "counts") <- FilterData(GetAssayData(se.obj,  : 
  could not find function "SetAssayData<-"

> packageVersion("Seurat")
[1] ‘3.0.2’

I do not think you can use the AssayData() commands in the way you have described above.

from swne.

hgb1111 avatar hgb1111 commented on July 29, 2024

I have also tried running through the Gene Expression Quickstart with Seurat, but run into an error where the "RunSWNE" does not seem to be compatible with a seurat v3 object.

## Load object
load("/path/Ma_Vasc_6_res0.75.Robj")
obj <- Ma_Vasc_6_res0.75

## Extract clusters
clusters <- obj$seurat_clusters

## Select genes to embed
genes.embed <- c("Aplnr", "Apln", "Cryab", "Gata5", "Pi16")

## Run SWNE
swne.embedding <- RunSWNE(obj, k = 16, genes.embed = genes.embed)

Error in UseMethod("RunSWNE") : 
  no applicable method for 'RunSWNE' applied to an object of class "Seurat"

packageVersion("Seurat")
# ‘3.0.2’
packageVersion("swne")
# ‘0.2.21’

from swne.

yanwu2014 avatar yanwu2014 commented on July 29, 2024

Ahh sorry you're right. For the filtering it should be something more like:

counts <- FilterData(GetAssayData(se.obj, slot = "counts"), min.samples.frac = 0.0025, min.nonzero.features = 200, trim = 0.0025)
se.obj <- SetAssayData(se.obj, slot = "counts", new.data = counts)

from swne.

yanwu2014 avatar yanwu2014 commented on July 29, 2024

Oh so the latest version of swne should be 0.5.6. Can you try reinstalling it and see if RunSWNE works then?

from swne.

hgb1111 avatar hgb1111 commented on July 29, 2024

Certainly, is swne 0.5.6 only available for R version 3.6.1? I just tried installing on R 3.5.1 and R 3.5.3 and neither worked.

Thanks!

from swne.

yanwu2014 avatar yanwu2014 commented on July 29, 2024

Ah sorry yeah I built it on R3.6 so I think >= R3.6.1 is necessary for installation

from swne.

hgb1111 avatar hgb1111 commented on July 29, 2024

I updated to R version 3.6.1 (2019-07-05) -- "Action of the Toes" but am unfortunately still encountering the same error :/

install.packages("swne")
Warning in install.packages :
  package ‘swne’ is not available (for R version 3.6.1)

This does not appear to be a problem with other packages (Seurat, ggplot2)

from swne.

yanwu2014 avatar yanwu2014 commented on July 29, 2024

swne is not on CRAN so you can't use install.packages. You can install it with devtools using the instructions on this github page

from swne.

hgb1111 avatar hgb1111 commented on July 29, 2024

Ahh, that fixed the issue - my mistake for not seeing that earlier. I was able to work through swne with a seurat v3 object.

Thanks!

from swne.

yanwu2014 avatar yanwu2014 commented on July 29, 2024

Great! Let me know if you have any other issues!

from swne.

Related Issues (20)

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.