r3fang / SnapATAC

Analysis Pipeline for Single Cell ATAC-seq

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error" 'rBind' is defunct.

AndresLugoCas opened this issue · comments

Hi,

I am trying to reproduce the example of two datasets integrated but I am having a problem:

x.sp = Reduce(snapRbind, x.sp.list);
Error: 'rBind' is defunct.
Since R version 3.2.0, base's rbind() should work fine with S4 objects

I don't know how to solve it. Thank you

commented

I was able to solve this by downloading the source code, editing snapRbind (the only file that appears to use the Matrix::rBind function) replacing each instance of Matrix::rBind with rbind, then compiling the source code and installing as an R package. This appears to give the correct result.

commented

I came across the same error, but I couldn't call my own package as I was working in the cloud computing environment as suggested above. After searching on the stackoverflow, I found following solutions, hoping this would help others:

library(SnapATAC)
# download snap-utilities.R file, and replace each Matrix::rBind with rbind, 
# and then save it as new_snapRbind.r file
source('new_snapRbind.r') 
environment(new_snapRbind) = asNamespace('SnapATAC')
assignInNamespace("snapRbind", new_snapRbind, ns = "SnapATAC")

hi all, hope someone may be able to help me with this issue. I also ran into the 'rBind is defunct' error, and resolved it using murphchuyi's method above. However, now when I try to run snap = snapRbind(x.landmark.sp, x.query.sp), I get 'Error in newJaccard() : could not find function "newJaccard"'

Would greatly appreciate it if folks have any insight!

I also meet the same error: Error in newJaccard() : could not find function "newJaccard". I wonder if anyone had solved it?

I found that downloading some of the files and adding the code on the bottom (in this exact order) to the top of my R file worked to solve the issue with Error in new Jaccard as this makes those necessary function that snapBind calls available as a source:

( new_snapRbind.R is the snap-utilities.R file downloaded and I replaced all the Matrix::rBind with base::rbind, I left all the other files unchanged)

source("pathto/new_snapRbind.R")
source("pathto/jaccard-class.R")
source("pathto/dimReduct-class.R")
source("pathto/kgraph-class.R")