Comments (4)
Original comment by Yaniv Lubling (Bitbucket: 557058:11761e0c-f009-41f9-a29c-6f6993e0539c, ).
Hi,
We do not support import of a SingleCellExpriment of Seurat objects. You can load several 10x datasets with the function mcell_import_multi_scmat_10x.
The dataset of origin of each cell is stored in the @cell_metadata slot of the mat object, together with any additional information you'll supply on the datasets in the dataset_table_fn parameter of mcell_import_multi_scmat_10x.
Yaniv
from metacell.
Original comment by Amos Tanay (Bitbucket: 557058:5a3503bb-91a6-4af0-972c-ab1d0c3bb50f, GitHub: amostanay).
If you are comfortable with R, then In principle it is also not hard to construct the metacell matrix object directly using:
mat=scm_new_matrix(my_matrix, my_metadata)
scdb_add_mat("new_mat", mat)
The matrix parameter should be a UMI table, and the metadata should be a data.frame with row for each cell, with mandatory columns: batch_set_id, amp_batch_id, seq_batch_id.
It is probably however better to go through the standard import and make sure all the metadata is well aligned. We will look into the possibility of adding more import features, including from Seurat objects.
Amos
from metacell.
Original comment by Michael Durante (Bitbucket: 5c3e72b636647b5b91027b5b, GitHub: mdurante1).
Thank you for providing this helpful information. I will try to both of these suggestion to import data to the proper metacell format. If I use the mcell_import_multi_scmat_10x function to import 10X data is it possible to subset the data based on given barcodes, clustering, or any other method? I am interested in looking at a subset of cells within my datasets. If not, I will attempt to use Amos' suggestion.
Thanks,
Michael
from metacell.
Original comment by Amos Tanay (Bitbucket: 557058:5a3503bb-91a6-4af0-972c-ab1d0c3bb50f, GitHub: amostanay).
Yes - subsetting a matrix object is easy using the scm_sub_mat command.
For example the following code generate a submatrix from all cells with metadata value "magic_field" at 2 or 6:
mat = scdb_mat("mymat")
metadata = mat@cell_metadata
mycells = rownames(metadata)[metadata$magic_field==2 | metadata$magic_field ==6 ]
mycells = intersect(mycells, colnames(mat@mat) #this is needed in case the matrix already ignored some of the cells, e.g. those with low UMI count
mat_to_use = scm_sub_mat(mat, cells=mycells)
scdb_add_mat("my_submat", mat_to_use)
This can be altered to facilitate any filtering of cells.
from metacell.
Related Issues (20)
- How to get the actual raw cells behind a metacell? HOT 3
- mc2d_force_knn fails if mc wasn't colorized beforehand HOT 1
- Is it possible to get knn index file from Metacell?
- linear pipeline collapse with Error due to undefined variable 'marks_fn' used to coloring mc
- Could we add the proteomic data into metacell
- code error in gstats.r HOT 1
- mcell_mc_export_tab->Source Code may need to be modified HOT 3
- mcell_add_gene_stat HOT 3
- install issue HOT 1
- comp mc graph using the graph RGdb_50_graphs and K 20 Error in confu/csize2 : non-conformable arrays
- Coudn't install metacell on windows HOT 1
- Can't download the tutorial data HOT 2
- Function to extract mat class with mc and mc2d HOT 1
- Question: Assign a metacell HOT 1
- mcell_mc_plot_marks creates incorrect annotation colorbar when using focus_mcs
- Log Transformation
- Batch
- install scdb, download test
- dysfunction and activation score
- mcell_mc_hierarchy while condition 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 metacell.