carmonalab / UCell

Gene set scoring for single-cell data
GNU General Public License v3.0
135 stars 16 forks source link

Missing double colon (::) in function call? #8

Closed RuiyuRayWang closed 3 years ago

RuiyuRayWang commented 3 years ago

Hi,

Thanks for providing this nice and neat package! I'm trying to build a package which depends on UCell. I can successfully build and install my package, but when I run it, one of the functions that depends on UCell had an error: Error in GetAssayData(obj, slot, assay = assay) : could not find function "GetAssayData"

And to traceback the error I found: 3. calculate_Uscore(GetAssayData(obj, slot, assay = assay), features = features, maxRank = maxRank, chunk.size = chunk.size, w_neg = w_neg, ncores = ncores, ties.method = ties.method, force.gc = force.gc, storeRanks = storeRanks, name = name)

2. UCell::AddModuleScore_UCell(object, features = geneset) at main.R#28

which looks like a missing link to the Seurat package from AddModuleScore_UCell() function, supposedly at line #64. GetAssayData should be replaced by Seurat::GetAssayData

Could you check it out? Thanks!

Ray

mass-a commented 3 years ago

Hello Ray, thanks for reporting this. I guess it's because the latest versions of Seurat have moved some of the object-handling functions to the SeuratObject package. Do you see the same error if you require SeuratObject in your package? In any case we will try to solve these requirements from our side as well.

Cheers, -m

RuiyuRayWang commented 3 years ago

Hi, Massimo I tried with importing SeuratObject to my package but the error still persists. While you're fixing the issue, I'll see if there're other work arounds. Thanks!

RuiyuRayWang commented 3 years ago

Hi, @mass-a

I found this issue to be related to incomplete documentation in NAMESPACE file, where both Seurat and data.table need to be imported in order for it to work. I've fixed this on the dev branch in a pull request, see #9

Best, Ray

mass-a commented 3 years ago

Hello Ray, thanks a lot for providing this fix!

The dev version now includes your edits, they will go into master with the next release.

Cheers, -m