katiasmirn / PERFect

3 stars 1 forks source link

An error about the condition has length > 1 #3

Open dangpf0 opened 2 years ago

dangpf0 commented 2 years ago

Hi.

There was an error about running a PERFect_sim function using the example data (mock2).

library(PERFect) data(mock2)

Counts data matrix

Counts <- data.frame(mock2$Counts) dim(Counts) # 240x46 [1] 240 46

Perform simultaenous filtering of the data

res_sim <- PERFect_sim(X=Counts)

Error in if (!(class(X) %in% c("matrix"))) { : the condition has length > 1

Looking forward to your reply

Thanks

OS details:
NAME=" Windows 10"
VERSION="8 (Core)"
16 threads, 64Gb total memory
ep142 commented 1 year ago

I am having exactly the same problem

mike-kratz commented 1 year ago

@ep142 @dangpf0 Try installing PERfect using the following code, this fixed the problem for me:

if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")

BiocManager::install("PERFect")

dangpf0 commented 1 year ago

@mike-kratz Thank you very much, this solved my problem.

alopgar commented 9 months ago

This is still happening to me. The solution provided with BiocManager is not working:

Warning message:
package ‘PERFect’ is not available for Bioconductor version '3.18'
ep142 commented 9 months ago

here it says PERFect is available in bioconductor 3.18. Sometimes is some strange combination of operating system and package versions that creates the issue https://bioconductor.org/packages/release/bioc/html/PERFect.html

jarrodscott commented 1 month ago

I couldn't get it installed either

Warning message:
package ‘PERFect’ is not available for Bioconductor version '3.20'

According to the Bioconductor page, PERFect "... is deprecated. It will probably be removed from Bioconductor." :(

jarrodscott commented 1 month ago

If anyone out there is still trying to use this package and cannot get it to work or get it installed, there is a fork here:

https://github.com/cxquy91/PERFect

I installed tested it against a dataset I processed a few years ago when the package was working and got the same number of OTUs.

Documentation here: https://bioconductor.posit.co/packages/3.16/bioc/manuals/PERFect/man/PERFect.pdf