Comments (4)
Got it.
Just run imputation on the subset of rows that are non-zero and then set the appropriate rows of the larger matrix to the result of imputation on the subset.
For example, something like this:
# Make a matrix that has a row of all zeros
A <- matrix(1,nrow=10,ncol = 5)
A[2,] <- 0
print(A)
totalUMIPerCell <- rowSums(A)
toKeep <- which(totalUMIPerCell >0)
A_subset <- A[toKeep, ]
# Run imputation on A_subset. Here I'll just add the number 1, just for demo
A_subset <- A_subset + 1
A[toKeep, ] <- A_subset
print(A)
from alra.
Not sure I fully understand your question. Are you saying the normalize_data()
function is too slow for large datasets?
Or are you saying that after you run normalize_data()
and you want to merge the resulting matrix back into the original matrix, you do this via a loop that is very slow?
from alra.
Not sure I fully understand your question. Are you saying the
normalize_data()
function is too slow for large datasets?Or are you saying that after you run
normalize_data()
and you want to merge the resulting matrix back into the original matrix, you do this via a loop that is very slow?
What I mean is that, when normalizing with this function. every gene that has 0 count in every cell will be removed in if (any(totalUMIPerCell == 0))
condition
For example, I use data set that have 20,000 genes but only 3,000 genes express with at least one cell. after using provided normalized function, 17,000 genes will be removed.
I hope to know the way that efficiently merge imputation result of 3,000 genes back to original data. (20,000 genes with zero count)
from alra.
That's helpful, Thanks.
from alra.
Related Issues (20)
- Best Practice for imputing big data-sets HOT 1
- Can I use ALRA imputed matrix to perform the `Find Marker Gene` step ? HOT 2
- Tips for larger matrices? HOT 3
- During FindVariableFeatures after ALRA output, count slot is empty?
- Error in asMethod(object)
- GetAssayData(pbmc, slot = "counts") gives 0 x 0 matrix HOT 1
- Run ALRA in Seurat v4.1.0
- Imputation before other QC steps?
- ALRA and Seurat HOT 1
- Need to deal with R 4.2.0 HOT 5
- alraSeurat2 FUNCTION NOT FOUND!!!! HOT 3
- Final proportion of non-zero values is large. HOT 2
- Running ALRA with multiple samples HOT 10
- Differential expression HOT 5
- Input and Output HOT 3
- Imputing integrated data HOT 1
- Input data structure HOT 1
- big data set and K HOT 2
- Input format (genes as rows?) HOT 1
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 alra.