Closed mfcesur closed 2 years ago
Hi @mfcesur , thanks for getting in touch. Likely what's going on here is that your bcb
object was saved with a legacy version of bcbioRNASeq (i.e. the bioconda version bundled with bcbio-nextgen) and then loaded into an R session running a newer version of the package.
Try this first and see if it resolves your issue:
bcb <- updateObject(bcb)
raw_count <- counts(bcb, normalized = FALSE)
If not then I need to push a bug fix to the package to help resolve your issue. I'll also work on making this error message a bit more informative, about how to use updateObject
in practice.
Best, Mike
Also for reference, here's how to dive into the structure of the bcbioRNASeq
object a bit more, which can be helpful for debugging. Your object should look like this after calling updateObject
:
library(bcbioRNASeq)
data(bcb)
names(metadata(bcb))
## [1] "allSamples" "bcbioCommandsLog" "bcbioLog"
## [4] "call" "caller" "countsFromAbundance"
## [7] "dataVersions" "date" "ensemblRelease"
## [10] "fast" "genomeBuild" "gffFile"
## [13] "interestingGroups" "lanes" "level"
## [16] "organism" "packageVersion" "programVersions"
## [19] "projectDir" "runDate" "sampleDirs"
## [22] "sampleMetadataFile" "sessionInfo" "tx2gene"
## [25] "uploadDir" "wd" "yaml"
slotNames(bcb)
## [1] "rowRanges" "colData" "assays" "NAMES"
## [5] "elementMetadata" "metadata"
assayNames(bcb)
## [1] "counts" "aligned" "avgTxLength" "tpm" "normalized"
## [6] "vst" "fpkm"
Use of the updateObject function solved this issue. Thank you so much for your consideration.
Kind regards, Müberra
Dear Dr. Steinbaugh,
I would like to perform differential expression analysis via bcbioRNASeq package. Even if I installed this package according to the instructions in the code page (https://github.com/hbc/bcbioRNASeq), I got the following error for counts function:
"raw_count <- counts(bcb, normalized = FALSE) Error in validObject(object) : invalid class “bcbioRNASeq” object: Legacy metadata: 'template', 'rowRangesMetadata', 'utilsSessionInfo', 'devtoolsSessionInfo' If supported, 'updateObject' may help resolve these issues."
I would greatly appreciate if you could provide your comments or suggestions on the error. Note that I am using the last version of R.
Sincerely, Müberra