Giter Site home page Giter Site logo

arc85 / celltalker Goto Github PK

View Code? Open in Web Editor NEW
43.0 43.0 18.0 11.35 MB

Inference of cell-cell communication from single-cell RNAseq data

Home Page: https://arc85.github.io/celltalker/

License: Other

R 100.00%
ligands receptors single-cell transcriptomics

celltalker's People

Contributors

arc85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

celltalker's Issues

celltalk function notfound

Hello arc85! I have installed celltalker v0.0.3.9000, and library celltalker, when run
hca_bm_interactions <- celltalk(input_object=hca_bm,
metadata_grouping="cell_types",
ligand_receptor_pairs=ramilowski_pairs,
number_cells_required=100,
min_expression=1000,
max_expression=20000,
scramble_times=10)
It shows Error in celltalk(input_object = seu, metadata_grouping = "cell_types", :
could not find function "celltalk". Is there anything wrong with this code? Or the celltalker version?

cols required

Hi,

Thanks for building the tool and putting together such a detailed vignette. I am having some trouble at this step in the analysis:
put.int <- putative_interactions(ligand.receptor.tibble=consistent.lig.recs,clusters=defined.clusters,groups=defined.groups,freq.group.in.cluster=0.05,ligands.and.receptors=interact.for)

I then get the error:
cols is now required.
Please use cols = c(lig.rec.exp)``cols is now required.
Please use cols = c(lig.rec.exp)

I see that you fixed this issue for the function "unique_interactions", would there be a similar fix for the function "putative_interactions"?

Thank you,

Julia

Run celltalker with no replicate data

Hi, Thanks for devloping celltalker!! I am a newer to use celltalker to find out the ligand and receptor in neuron cell type.
But I don't have replicates and consistent.lig.recs seems to have nothing.
Code is pasted in below, could you please help me figure out the problem? Thanks a lot for your helping, I am just wondering how to run celltalker with no replicate data.

Also, I am wondering how to understand the parameter of cells.reqd=10,freq.pos.reqd=0.5 in create_lig_rec_tib function.

defined.clusters <- [email protected]$small_celltype
names(defined.clusters)<-colnames(ser.obj)
defined.groups <- [email protected]$orig.ident
names(defined.groups)<-colnames(ser.obj)
defined.replicates <-  [email protected]$orig.ident
names(defined.replicates)<-colnames(ser.obj)

reshaped.matrices <- reshape_matrices(count.matrix=expr.mat,
                                      clusters=defined.clusters,
                                      groups=defined.groups,
                                      replicates=defined.replicates,
                                      ligands.and.receptors=interact.for)

#Check out the hierarchy of the tibble
reshaped.matrices
unnest(reshaped.matrices,cols="samples")
names(pull(unnest(reshaped.matrices,cols="samples"))[[1]])

consistent.lig.recs <- create_lig_rec_tib(exp.tib=reshaped.matrices,
                                          clusters=defined.clusters,
                                          groups=defined.groups,
                                          replicates=defined.replicates,
                                          cells.reqd=10,
                                          freq.pos.reqd=0.5,
                                          ligands.and.receptors=interact.for)

This is the cellnumber
GABA1 GABA2 GABA3 GABA4 GABA5 GABA6 Glu1 Glu2 Glu3
WT 43 47 83 161 29 93 39 93 59
ob/ob 4 6 19 25 17 2 10 10 17

I am wondering whether the cellnumber will affect the results or not.

Thanks a lot for your help.

compare_group_interactions

Excuse me, can you put an example of 'compare_group_interactions' function? The parameters are not clear. Thank you

An error when reshaping the matrix

Hi,
I've got an error here. The dataset was from a single tissue and there was only one sample. So I assign a same chr to all Sampl_type and Sample_ID. Then did the following:

defined.clusters <- [email protected]$ClusterNames_1
defined.groups <- [email protected]$Sample_type
defined.replicates <- [email protected]$Sample_ID

And here's the error when trying to reshape the matrix:

> reshaped.matrices <- reshape_matrices(count.matrix=expr.mat,clusters=defined.clusters,groups=defined.groups,replicates=defined.replicates,ligands.and.receptors=interact.for)
Error in x[[jj]][iseq] <- vjj : replacement has length zero

Coud you please suggest a solution?
Besides, is it possible to work in a single samples instead of across different tissues?
Thanks!

Highlight Unique among Common

Hi,
I read your paper published in Immunity.
I wondered how did you draw the circos_plot highlighting unique lines among common lines (as shown in Figure 6)
Thanks for your help!

Xiaofei

Error in receptor_mean_dataframe[rec.use, ] : subscript out of bounds

Hello, team celltalker!

Thank you for developing this wonderful R package.

I ran the code according to your tutorial.

And I got the following error message:

Error in receptor_mean_dataframe[rec.use, ] : subscript out of bounds

I tried searching for an answer on Google, but it didn't solve my problem.
I hope to get your reply.Thank you very much.

I've seen other people have similar problems before, but that issues has been closed.

Attach some sample information.I hope it helps.Thanks again to your team.

Rotate Label in circos_plot

Thank you for this perfect package.
I am wondering if there is a way to rotate the label(like 90 degree) in circos_plot.
Thanks!
Xiaofei

Error in 'compare_group_interactions'

Hi celltalkerTeam
When I tried to run 'compare_group_interactions()', it returns:

Error:
The 'validate' argument of 'as_tibble()' was deprecated in tibble 2.0.0 and is now defunct.
Please use the '.name_repair' argument instead.

Is there anyway for me to solve it?
Any help is appreciated.

celltalk function not found

while using reshape_matrices()
got: could not find function "reshape_matrices"
Does my celltalker version wrong?

Using SCT as the assay

Hello! I attempted to run CellTalker on an integrated object and encountered an error, which I resolved. I'll say what my problem was at the bottom for posterity, in case anyone else runs into the issue.

While troubleshooting I noticed that CellTalker defaults to using the RNA assay, with no option to change which assay to use. My normalized/scaled data is in the SCT assay, and my RNA assay is still raw counts. Is there any existing way to specify that I want to use the SCT assay, or do I need to scale/center the RNA assay to work with this method?

<error/ You can run 'object <- JoinLayers(object = object, layers = layer)'.>
Error in GetAssayData():
! GetAssayData doesn't work for multiple layers in v5 assay.

Backtrace:

  1. └─celltalker::celltalk(...)
  2. └─celltalker:::create_expression_matrices(...)
  3. ├─Seurat::GetAssayData(input_filtered, slot = "counts", assay = "RNA")
    
  4. └─SeuratObject:::GetAssayData.Seurat(...)
    
  5.   ├─SeuratObject::GetAssayData(object = object[[assay]], layer = layer)
    
  6.   └─SeuratObject:::GetAssayData.StdAssay(object = object[[assay]], layer = layer)
    
  7.     └─rlang::abort(...)
    

To fix the original issue, I couldn't figure out how to join my SCT assay layers (JoinLayers does not like working with SCT assay objects), until I realized I forgot to join the RNA layers after the initial integration. I changed the default assay back to RNA (which contained my raw counts), joined the RNA assay layers, then re-ran SCTransform. Thank you for the built-in JoinLayers suggestion. I absolutely would not have figure out where to start troubleshooting otherwise.

question for output the interactions

Hi,

Thanks for building the tool and putting together such a detailed vignette.  I had run the code as introduced in your workflow and got the cell-cell interaction plots. Then how can I got the a dataframe that included the detailed information of cell-cell interaction so that I can output the results as a table?

Thank you,
MMrian

Celltalker for different Ligand-Receptor interaction DB

Hi,
I have mouse data and therefore tested if its possible to run Celltalker using a different database than the ramilowki DB.

A nice overview of available interaction DBs are here: https://github.com/LewisLabUCSD/Ligand-Receptor-Pairs

putative_interactions runs only if you change ramilowski$pair to ligands.and.receptor$pair.

It would be very helpful if you could also add other DBs to Celltalker, allowing the user to choose between mouse and human DBs.

Otherwise its a really cool tool. Thanks!

Error in x[z, ] : subscript out of bounds

Hello, team celltalker!

Thank you for developing this wonderful R package.

I have data from 20 single cell samples that have been processed by seurat. I ran the code according to your tutorial, and it worked fine until I got to this point.

consistent.lig.recs <- create_lig_rec_tib(exp.tib=reshaped.matrices, clusters=defined.clusters, groups=defined.groups, replicates=defined.replicates, cells.reqd=10, freq.pos.reqd=0.2, ligands.and.receptors=interact.for)

And I got the following error message:

Error in x[z, ] : subscript out of bounds.

I tried searching for an answer on Google, but it didn't solve my problem.
I hope to get your reply.Thank you very much。

Attach some sample information.I hope it helps.Thanks again to your team.

A tibble: 20 x 3

group sample expr.matrices

1 OM CAT6 <named list [4]>
2 OM NPDR1 <named list [4]>
3 OM PCV3 <named list [4]>
4 OM PCV5 <named list [4]>
5 OM WAMD1 <named list [4]>
6 OW CAT1 <named list [4]>
7 OW CAT3 <named list [3]>
8 OW CAT7 <named list [3]>
9 OW DME2 <named list [4]>
10 OW PCV1 <named list [4]>
11 YM HH4 <named list [4]>
12 YM HH5 <named list [4]>
13 YM UN3 <named list [4]>
14 YM UN5 <named list [4]>
15 YM UN6 <named list [4]>
16 YW HH3 <named list [4]>
17 YW HH6 <named list [4]>
18 YW HH7 <named list [4]>
19 YW HH8 <named list [4]>
20 YW UN4 <named list [4]>

Help figuring out what part of my object is throwing the subscript out of bounds error

Hello again. When running the initial celltalk function, I encounter the following error: .subscript.2ary(x, i, j, drop = TRUE) : subscript out of bounds. I've included the traceback below. This error occurs whether the scaled/normalized RNA assay is structures as a V5 or V3/4 Seurat assay. Has anyone else encountered this, and what did you do to fix it? Looking at the traceback, I can't figure out what to start troubleshooting.

celltalk(input_object=Integrated_DF,
metadata_grouping="CellTypes_Assigned",
ligand_receptor_pairs=ramilowski_pairs,
number_cells_required=100,
min_expression=1000,
max_expression=20000,
scramble_times=10)

Error in .subscript.2ary(x, i, j, drop = TRUE) : subscript out of bounds

traceback()
13: stop("subscript out of bounds")
12: .subscript.2ary(x, i, j, drop = TRUE)
11: methods::slot(object = object, name = layer)[features, cells]
10: methods::slot(object = object, name = layer)[features, cells]
9: LayerData.Assay(object = object, layer = layer)
8: LayerData(object = object, layer = layer)
7: .CalcN.Assay(object = x[[assay]])
6: CalcN(object = x[[assay]])
5: subset.Seurat(x = x, features = i, cells = j, ...)
4: [.Seurat(input_filtered, names(ligs.keep), )
3: input_filtered[names(ligs.keep), ]
2: create_expression_matrices(input_object, metadata_grouping, ligand_receptor_pairs,
number_cells_required, min_expression, max_expression)
1: celltalk(input_object = Integrated_DF, metadata_grouping = "CellTypes_Assigned",
ligand_receptor_pairs = ramilowski_pairs, number_cells_required = 10,
min_expression = 1000, max_expression = 20000, scramble_times = 10)

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.