gabrielodom / pathwayPCA

integrative pathway analysis with modern PCA methodology and gene selection
https://gabrielodom.github.io/pathwayPCA/
11 stars 2 forks source link

package failing in Bioc Devel build #83

Closed gabrielodom closed 2 years ago

gabrielodom commented 5 years ago

Email from Lori:

Dear Package Maintainer,

We would like to bring to your attention that your package is failing to build on our devel build machines:

http://bioconductor.org/checkResults/devel/bioc-LATEST/pathwayPCA

Would you mind taking a look at this? Don't hesitate to ask on the bioc-devel mailing list if you have any question or need help.

While the development branch is a place to develop new features and we expect packages to occasionally break, they should not remain broken for an extended period of time. If no action is taken over the next few weeks we will begin the deprecation process for your package. The package has been failing since at least 05/17/19. Thank you for your time and effort.

I will need to read through the documentation to identify the problem and push out a bug fix: http://bioconductor.org/developers/how-to/git/bug-fix-in-release-and-devel/

gabrielodom commented 5 years ago

I've tracked down the issue: In R 3.6, the "assays" slot of a RangedSummarizedExperiment has the following structure:

str(slot(airway, "assays"))
Reference class 'ShallowSimpleListAssays' [package "GenomicRanges"] with 1 field
  $ data: NULL
  and 12 methods.

In R 3.7 (devel), the "assays" slot of a RangedSummarizedExperiment has the following structure:

str(slot(airway, "assays"))
Reference class 'ShallowSimpleListAssays' [package "GenomicRanges"] with 1 field
  $ data:Formal class 'SimpleList' [package "IRanges"] with 4 slots
  .. ..@ listData       :List of 1
  .. .. ..$ counts: int [1:64102, 1:8] 679 0 467 260 60 0 3251 1433 519 394 ...
  .. ..@ elementType    : chr "ANY"
  .. ..@ elementMetadata: NULL
  .. ..@ metadata       : list()
  and 12 methods.

I understand that I'm not supposed to use "direct slot access", but it means that I don't have to depend on SummarizedExperiment and the litany of packages it depends on.

gabrielodom commented 5 years ago

In both cases, the field is named "data", so I will subset the "assays" slot with $data first.

gabrielodom commented 4 years ago

The build report passed.

gabrielodom commented 2 years ago

They changed something again, so we're going back to this solution. old code:

  assay_mat <- slot(
    slot(
      summExperiment,
      "assays"
    ),
    "data"
  )[[whichAssay]]

new code:

assay_mat <- slot(summExperiment, "assays")[["data"]][[whichAssay]]