Git Product home page Git Product logo

Comments (5)

hpages avatar hpages commented on July 24, 2024

Thanks Vince.

About 1):

Interestingly we have a similar situation with mcols() on Vector derivatives:

ir <- IRanges(1:3, 5)
mcols(ir) <- DataFrame(stuff=runif(3))
rownames(mcols(ir)) <- letters[1:3]
rownames(mcols(ir))
# NULL

This should be taken care of in SummarizedExperiment 1.17.2 (see commit 495ab00).

Note that when you did colnames(assay(se1)) <- letters[4:6] in your example above the colnames of the assay actually got modified. It's just that you didn't see them when you brought the assay back because by default assay() doesn't bring back the real colnames. You need to use withDimnames=FALSE for that:

> assay(se1, withDimnames=FALSE)
  d e f
A 1 3 5
B 2 4 6

About 2):

Having the colData() setter reorder the rows of the supplied DataFrame "might" sound like a nice feature but it breaks the general assumption that the getter will bring back the original DataFrame so I'm not convinced it's a good idea. Anyway if you want to pursue this please submit the proposal in a separate issue.

from summarizedexperiment.

LTLA avatar LTLA commented on July 24, 2024

The latest change broke some edge-case behavior:

library(SummarizedExperiment)
example(SummarizedExperiment) # create some SE's.

assay(se) <- assay(se) # OK.

empty <- se[,0]
assay(empty) <- assay(empty) # fail

from summarizedexperiment.

hpages avatar hpages commented on July 24, 2024

Thanks @LTLA (when following up on a closed issue, you should re-open)

from summarizedexperiment.

hpages avatar hpages commented on July 24, 2024

Should be addressed in SummarizedExperiment 1.17.3 (see commit 7ee31d4).

Please re-open or start a new issue if you run into other problems related with commit 495ab00 ("By default assays()/assay() setters reject inconsistent dimnames"). Thanks!

from summarizedexperiment.

LTLA avatar LTLA commented on July 24, 2024

Thanks @hpages. I don't have the authority to re-open issues on this repo, so yes, I should have started a new one.

from summarizedexperiment.

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.