Code Monkey home page Code Monkey logo

Comments (4)

aviezerl avatar aviezerl commented on June 16, 2024

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.

aviezerl avatar aviezerl commented on June 16, 2024

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.

aviezerl avatar aviezerl commented on June 16, 2024

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.

aviezerl avatar aviezerl commented on June 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.