Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibiliy with R4.0.0 #16

Open
mflamand opened this issue Apr 29, 2020 · 4 comments
Open

Compatibiliy with R4.0.0 #16

mflamand opened this issue Apr 29, 2020 · 4 comments

Comments

@mflamand
Copy link

Hello, I tried to repackage xtail v1.1.5 under the newly released R4.0.0 (windows10)
Unfortunately I running the main function xtails fails as such:

data("xtaildata")
mrna<-xtaildata$mrna
rpf` <- xtaildata$rpf
condition = c("control", "control", "treat", "treat")
test.results<- xtail(mrna, rpf, condition, bins=1000)

Error in assays<-(*tmp*, value = new("SimpleList", listData = list( : please use 'assay(x, withDimnames=FALSE)) <- value' or 'assays(x, withDimnames=FALSE)) <- value' when the dimnames on the supplied assay(s) are not identical to the dimnames on DESeqDataSet object 'x'

  1. stop(wmsg("please use 'assay(x, withDimnames=FALSE)) <- value' ", "or 'assays(x, withDimnames=FALSE)) <- value' when the ", what, " on the supplied assay(s) are not identical to ", "the ", what, " on ", class(x), " object 'x'"))
  1. assays<-(*tmp*, value = new("SimpleList", listData = list( counts = structure(c(825L, 1054L, 71L, 191L, 81L, 756L, 947L, 1158L, 152L, 746L, 1154L, 201L, 1337L, 1246L, 61L, 473L, 123L, 714L, 497L, 924L, 21L, 221L, 3544L, 402L, 938L, 178L, ...
  1. assays<-(*tmp*, value = new("SimpleList", listData = list( counts = structure(c(825L, 1054L, 71L, 191L, 81L, 756L, 947L, 1158L, 152L, 746L, 1154L, 201L, 1337L, 1246L, 61L, 473L, 123L, 714L, 497L, 924L, 21L, 221L, 3544L, 402L, 938L, 178L, ...
  1. .local(object, ..., value)
  1. dispersionMatrix<-(*tmp*, value = matrix(rep(dispersions(dataSet), ncol(dataSet)), ncol = ncol(dataSet), byrow = FALSE))
  1. dispersionMatrix<-(*tmp*, value = matrix(rep(dispersions(dataSet), ncol(dataSet)), ncol = ncol(dataSet), byrow = FALSE))
  1. estimateFun(mrna, condition, baseLevel, mrna_sizeFactor)
  1. xtail(mrna, rpf, condition, bins = 1000)

xtail still works on my system for R-3.6.3 so its not an urgent issue. I was wondering if you were planning to update the code to make compatible with version 4.x.x ? There were quite a few changes (such as the now default data.frame(stringsAsFactors = FALSE) )made so I am unsure were to start looking. If necessary I can also try under a different platform (RHEL or Fedora Linux) to see if the problem persist

Thanks for your help!

@xug15
Copy link

xug15 commented Apr 30, 2020

Hi, we develop a docker image that swaps xtail into R to solve this problem.
You can see the manual from this link https://hub.docker.com/r/yanglab/xtail .

@mflamand
Copy link
Author

Thank you for the reply. Although this probably works great, using a docker is not the best option for me.

If you are interested in fixing the R code for R4.0, or anyone else want's to use it directly, I manage to make it work by doing the following changes:

CoreFuns.R#57 and CoreFuns#58 : add withDimnames=FALSE within assays()
methods.R#19 : add withDimnames=FALSE within assays()

This worked by still gave warnings that DESeq2 converted strings to factors in the formula.:

changing xtail.R#48 with : condition=as.factor(condition) fixed those warnings.

The changes to factors are directly caused by the new data.frame behavior, but I am unsure why the SummarizedExperiment assay() behavior have changed.

In any case, running the sample data under R3.6.3 and 4.0.0 gave me the same number of log2FC and log2R

@Delayed-Gitification
Copy link

@mflamand your fix worked for me, thank you!

@FelixErnst
Copy link
Contributor

See #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants