Comments (3)
@Obtusah Package rliger has been massively updated. During the development cycle, it is just not expected that single-cell data would be presented in "data.frame" form due to the inefficiency in memory use. Single-cell data, especially RNAseq data, tends to be sparse, and is always recommended to be presented with "dgCMatrix" class, which is supported by package Matrix. A simple fix for you would be something like below:
for (i in seq_along(samples))
{
print(paste0("Reading sample", i))
fname <- fnames[i]
myCount <- fread(fname, header = TRUE)
# No need to do as.data.frame
# myCount = as.data.frame(myCount)
# genenames can still be extracted with this syntax
genenames <- myCount$Gene
rownames(myCount) <- genenames
print("Added gene names")
suff <- samples[[i]]
myCount <- myCount[, -1]
colnames(myCount) <- paste(suff, colnames(myCount), sep = "_")
print("Added colnames")
# Coerce the data.table into a matrix
# which can be then converted into "dgCMatrix" with `as(., "CsparseMatrix")`
mypanel4[[suff]] <- as(as.matrix(myCount), "CsparseMatrix")
print(myCount[1:5,1:5])
}
You might need to library(Matrix)
if R says it has issue understanding what "CsparseMatrix" is.
Given such a case, support for "data.frame" would be added back in the next release. Though we still strongly suggest considering using the memory efficient form of representation through out the workflow.
Meanwhile, from your source code I noticed that you defined quite a lot plotting functions where I can see a lot of data access using @
symbol. @
access to clusters
, tsne.coords
and etc. are no longer available now due to structural changes to the liger object. In the new version of rliger we provided accessor functions (getter and setter) for accessing all data you need. It is now generally not suggested to use @
symbol for accessing data because scripts can easily get broken if developers again need to do structural updates like we did. Please see resources below for ways to update them:
- Access cell metadata
- Access dimensionality reduction
- Other access can be seen on the same web page.
Please feel free to reach out if you need more help.
Yichen
from liger.
Thank you for detailed answer!
The error was solved with the code you gave. I am changing other deprecated methods too.
from liger.
this sounds like a matrix ABI issue-can you get a sessionInfo()?
from liger.
Related Issues (20)
- "shared factor neighborhood" not used anymore as described in the paper? HOT 3
- log transform data first? HOT 1
- Another request for help regarding SCTransform HOT 1
- Generate gene and promoter bed files
- Problems with scaleNotCenter() HOT 2
- Prepare for upcoming Seurat v5 release HOT 1
- Bug in Seurat's wrapper function HOT 1
- cran package archived HOT 6
- NaNs during `SelectGenes()` HOT 1
- Error on makeFeatureMatrix HOT 1
- How to improving similarity between snRNA-seq and snATAC-seq nuclei, by tuning parameters like 'k', 'lambda'? HOT 4
- Dataset specificity plot
- Issue with loading old liger object via convertOldLiger function HOT 3
- Error in `signal_stage()` HOT 4
- no slot name "defaultCluster" for this object of class "liger" HOT 1
- Query on building shared factor neighborhood graph HOT 2
- Error when performing the Wilcoxon test on the peak counts HOT 1
- Error in ImputeKNN
- How can I determine the similarity scores between clusters using Liger's UINMF? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liger.