Giter VIP home page Giter VIP logo

Comments (8)

lpantano avatar lpantano commented on June 12, 2024

Hi,

thank you for reporting the error. It doesn't need to be a number, and it can have mare than one.

Can you check location is a factor in design?

Can you let me know the package version?

Thanks!

from degreport.

elcega avatar elcega commented on June 12, 2024

Version is 1.24.1

How do I check if location is a factor in design? Do you mean as if it exists?

This was run after:

dds <- DESeqDataSetFromMatrix(counts,
                                  colData = coldata,
                                  design=~location)
dds <- DESeq(dds)
vsd = vst(dds, blind=F)

from degreport.

lpantano avatar lpantano commented on June 12, 2024

I am referring to this line:

res <- degPatterns(ma, design, time = "location")

I am assuming design is a data.frame, where row.names matches the col.names of matrix. I assume location is a column in design. You can check if it is a factor doing:

design$location, if it is a factor it would tell you at the end, showing on you the levels. To convert to a factor:

design$location = as.factor(design$location)

You can always save the environment after you run degPattern and get the error into a file and share the file somehow.

save.image(file = "my_work_space.RData")

Cheers.

from degreport.

elcega avatar elcega commented on June 12, 2024

I have this error: Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'as.factor': object of type 'closure' is not subsettable

after running design$location = as.factor(design$location)

design$location
Error in design$location : object of type 'closure' is not subsettable

Check here: https://ln2.sync.com/dl/885678850/xtftv6j9-g6yymv9p-azjyhjcr-qdwdczjm

from degreport.

lpantano avatar lpantano commented on June 12, 2024

thank you,

with the enviroment you sent me I can do this:

res <- degPatterns(ma, metadata = colData(dds), time = "location", minc = 1)

design doesn't exists there, so you can get the metadata from the colData of the dds object. minc needs to be very low when you have few genes like 10. Ideally you want to run this when you have more than 50 genes or so.

Let me know if that line runs for you.

cheers

from degreport.

elcega avatar elcega commented on June 12, 2024

Yes, it actually worked! Fantastic, thanks I ran this:

ma <- assays(vsd)[[1]][1:100,]
res <- degPatterns(ma, metadata = colData(dds), time = "location", minc = 5)

I have more genes 1200 DEG of ~4000 but it does not let me run for bigger than that because I seem to have NAs?
Error in diana(d, diss = TRUE, stand = FALSE) : NA values in the dissimilarity matrix not allowed.

  • How can I remove the NAs from there,? I tried this but does not work
    ma[is.na(ma)] <- 0
  • is there a function where I can determine the number of groups I'd like? or it is automatic?

from degreport.

lpantano avatar lpantano commented on June 12, 2024

Can you try to directly create the matrix with the 1200 DEG and try the command. That error could be because there are genes not expressed and the standard deviation is 0. Normally with real DEG that won’t happen.

You would be able to select different cutoff. res will have benchmarking* figures that can help you see how different cutoff change the number of groups. Then you can user res$normalized and http://lpantano.github.io/DEGreport/reference/degPlotCluster.html to choose what to plot or even select genes for whatever you want to do next.

Let me know how it goes.

from degreport.

elcega avatar elcega commented on June 12, 2024

Yes, it worked with the matrix, thanks!

res <- degPatterns(dfDEG, metadata = colData(dds), time = "location", minc = 5)
degPlotCluster(res$normalized, "location") ```

from degreport.

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.