GithubHelp home page GithubHelp logo

scriabin's People

Contributors

ajwilk avatar federicomarini avatar kiter2520 avatar majorkazer 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

scriabin's Issues

Error in Dataset binning

Hi,

This toolkit is excellent! I try to re-run the code in "Scriabin's summarized interaction graph workflow".
But I met an error during binning dataset.
Here is output:

Setting optim_k.unique to 1.33
Binning with coarse cell types
Constructing neighbor graphs with reduction pca . . . 
Splitting object . . . 
Preparing integration . . . 
Generating anchorsets . . . 
Computing 2000 integration features
Scaling features for provided objects
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01s  
Finding all pairwise anchors
  |                                                  | 0 % ~calculating  Running CCA
Merging objects
Finding neighborhoods
Finding anchors
	Found 16208 anchors
Filtering anchors
	Retained 5126 anchors
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=02m 25s
Mapping anchor names . . . 
Generating anchor bins . . . 
Generating connectivity matrix . . . 
Optimizing number of bins . . . 
Error in if (check_completion(nbs_completion)) { : 
  the condition has length > 1

Could you help me to figure it out?

Hanwen

Common errors when running BinDatasets

Just like another unresolved issue, I have also encountered this problem, whether using the example data or my own data. Comments regarding this issue have been ongoing from 2022 until recently, and everyone has faced the exact same problem. Please forgive me for submitting another issue to gain the attention of the author's team. This is because I am really eager to use Scriabin in my own research!

ifnb <- BinDatasets(ifnb, split.by = "stim", dims = 1:30,coarse_cell_types = "coarse_ident", sigtest_cell_types = "seurat_annotations")

Setting optim_k.unique to 1.33
Binning with coarse cell types
Constructing neighbor graphs with reduction pca . . .
Splitting object . . .
Preparing integration . . .
Generating anchorsets . . .
Computing 2000 integration features
Scaling features for provided objects
Finding all pairwise anchors
Running CCA
Merging objects
Finding neighborhoods
Finding anchors
Found 16193 anchors
Filtering anchors
Retained 5133 anchors
Mapping anchor names . . .
Generating anchor bins . . .
Generating connectivity matrix . . .
Optimizing number of bins . . .
Error in if (check_completion(nbs_completion)) { :
the condition has length > 1

Issue with multi-condition analysis in interaction-programs.Rmd tutorial

Hi,

I encountered an issue while following the tutorial for interaction-programs.Rmd. Specifically, I encountered an error in the multi-condition part related to the comparative analysis using the stimulated/unstimulated PBMC dataset.

The error occurred with the following code snippet:

ifnb_ip <- FindAllInteractionPrograms(ifnb, group.by = "stim",   cell_types = "seurat_annotations", assay = "alra")

The error message received is as follows:

Error in `dplyr::sample_n()`:
! Can't compute indices.
ℹ In group 1: `var = CD14 Mono`.
Caused by error in `sample.int()`:
! invalid 'size' argument
Run `rlang::last_trace()` to see where the error occurred.
Warning message:
In size <= n || replace :
  'length(x) = 2215 > 1' in coercion to 'logical(1)'

Although an issue was opened and closed previously, a solution has not yet been found. Any assistance in resolving this error would be greatly appreciated. Thank you!

beginners question

Dear all,

maybe someone of the community can get me started:
I have installed the "scriabin" package, but do not seem to be able to run it. If I understand it correctly, there should be examples which can be run.
How do I have to proceed to use the vignettes or .rmd files.

I know this is a stupid question, but maybe someone can get me jumpstarted.

Thanks and best,
Matthias

Usable for mouse datasets?

Hello! This is a very exciting project, thank you for your hard work.
I wanted to ask you here since I wasn't able to find this information in the manuscript: is Scriabin usable with mouse scRNA-seq datasets?

Bizarre Results for Cell Co-culture Data Set

I have a data set which is cancer-fibroblast co-culture of patient derived cells. Many interactions have p-value of 0 in many samples.

> significance[1:20, c(1:7)]

         lr_pair  name OSCC_16-P_pval OSCC_16-M_pval OSCC_20-P_pval OSCC_24-P_pval OSCC_24-M_pval
1  ADAM17=NOTCH1  IP-1              0              0              0              0              0
2     ANXA1=EGFR  IP-1              0              0              0              0              0
3    DLL1=NOTCH1  IP-1              0              0              0              0              0
4    EFNA4=EPHA2  IP-1              0              0              0              0              0
5     EGFR=ERBB3  IP-1              0              0              0              0              0
6      EGFR=TGFA  IP-1              0              0              0              0              0
7    EPHA2=EFNA1  IP-1              0              0              0              0              0
8    ERBB2=ERBB3  IP-1              0              0              0              0              0
9     MDK=PTPRZ1  IP-1              0              0              0              0              0
10   NOTCH1=DLL1  IP-1              0              0              0              0              0
11    WNT3A=FZD5  IP-1              0              0              0              0              0
12  APP=TNFRSF21 IP-10              0              0              0              0              0
13     AREG=EGFR IP-10              0              0              0              0              0
14     BACE2=APP IP-10              0              0              0              0              0
15   BMP7=BMPR1B IP-10              0              0              0              0              0
16     CDH1=EGFR IP-10              0              0              0              0              0
17   DLL1=NOTCH1 IP-10              0              0              0              0              0
18   EFNA1=EPHA1 IP-10              0              0              0              0              0
19   IL20=IL20RB IP-10              0              0              0              0              0
20  IL20=IL22RA1 IP-10              0              0              0              0              0

Why is it so? Also, ERBB2 and ERBB3 are both receptors. Why are receptor-receptor pairs being analysed?

Installation error

Hi,

I'm trying to install scriabin (devtools::install_github("BlishLab/scriabin", ref = "main")) but I'm getting this error message:

> devtools::install_github("BlishLab/scriabin", ref = "main")
Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo BlishLab/scriabin@main
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All
2: CRAN packages only
3: None
4: DelayedMa... (1.16.0       -> 1.24.0      ) [CRAN]
5: Summarize... (1.24.0       -> 1.32.0      ) [CRAN]
6: reticulate   (38f49a79f... -> 5d0a9a522...) [GitHub]
7: genefilter   (1.76.0       -> 1.84.0      ) [CRAN]

Enter one or more numbers, or an empty line to skip updates:
── R CMD build ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/tmp/RtmpFnUDWB/remotes14799a6fd3a6e3/BlishLab-scriabin-adf1645/DESCRIPTION’ ...
─  preparing ‘scriabin’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
     NB: this package now depends on R (>= 3.5.0)
     WARNING: Added dependency on R >= 3.5.0 because serialized objects in
     serialize/load version 3 cannot be read in older versions of R.
     File(s) containing such objects:
       ‘scriabin/inst/lr_resources.rds’
─  building ‘scriabin_0.0.0.9000.tar.gz’

Installing package into ‘/home/nrubinstein/R’
(as ‘lib’ is unspecified)
* installing *source* package ‘scriabin’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Warning: multiple methods tables found for ‘acbind’
Warning: multiple methods tables found for ‘arbind’
Warning: replacing previous import ‘SingleCellExperiment::counts<-’ by ‘scater::counts<-’ when loading ‘CelliD’
Warning: replacing previous import ‘SingleCellExperiment::cpm’ by ‘scater::cpm’ when loading ‘CelliD’
Warning: replacing previous import ‘SingleCellExperiment::cpm<-’ by ‘scater::cpm<-’ when loading ‘CelliD’
Warning: replacing previous import ‘SingleCellExperiment::counts’ by ‘scater::counts’ when loading ‘CelliD’
Warning: replacing previous import ‘SingleCellExperiment::tpm’ by ‘scater::tpm’ when loading ‘CelliD’
Warning: replacing previous import ‘SingleCellExperiment::tpm<-’ by ‘scater::tpm<-’ when loading ‘CelliD’
Warning: replacing previous import ‘data.table::shift’ by ‘tictoc::shift’ when loading ‘CelliD’
Warning: replacing previous import ‘cowplot::get_legend’ by ‘ggpubr::get_legend’ when loading ‘scriabin’
Error: objects ‘rowSums’, ‘colSums’, ‘rowMeans’, ‘colMeans’ are not exported by 'namespace:BiocGenerics'
Execution halted
ERROR: lazy loading failed for package ‘scriabin’
* removing ‘/home/nrubinstein/R/scriabin’

Might there be calls to ‘rowSums’, ‘colSums’, ‘rowMeans’, ‘colMeans’ without the preceding Matrix reference?

Error in FindAllInteractionPrograms

Thank you for the exciting package!
I am trying to go through the interactions-programs vignette and am running into an error with the ifnb comparative analysis example.

When running the FindAllInteractionPrograms after the sctransform and ALRA steps:
ifnb_ip <- FindAllInteractionPrograms(ifnb, group.by = "stim", cell_types = "seurat_annotations", assay = "alra")
I am getting the following error:
Using database OmniPath

Iteratively generating interaction matrix
Will perform 5 iterations to approximate TOM
Error in dplyr::sample_n():
! Problem while computing indices.
ℹ The error occurred in group 1: var = CD14 Mono.
Caused by error in sample.int():
! invalid 'size' argument
Run rlang::last_error() to see where the error occurred.
Warning message:
In size <= n || replace :
'length(x) = 2215 > 1' in coercion to 'logical(1)'

traceback()

33: stop(fallback)
32: signal_abort(cnd, .file)
31: abort(bullets, call = error_call, parent = cnd)
30: h(simpleError(msg, call))
29: .handleSimpleError(function (cnd)
{
if (index && is_slice_call(error_call)) {
local_error_context(dots = dots, .index = index, mask = mask)
header <- cnd_bullet_header("evaluating")
}
else {
header <- "Problem while computing indices."
}
bullets <- c(header, i = cnd_bullet_cur_group_label())
abort(bullets, call = error_call, parent = cnd)
}, "invalid 'size' argument", base::quote(sample.int(n(), size,
replace = replace, prob = ~NULL)))
28: sample.int(n(), size, replace = replace, prob = ~NULL)
27: eval(quote({
size <- check_size(~prop, n(), replace = replace)
sample.int(n(), size, replace = replace, prob = ~NULL)
}), new.env())
26: eval(quote({
size <- check_size(~prop, n(), replace = replace)
sample.int(n(), size, replace = replace, prob = ~NULL)
}), new.env())
25: eval(expr, p)
24: eval(expr, p)
23: eval.parent(substitute(eval(quote(expr), envir)))
22: local({
size <- check_size(~prop, n(), replace = replace)
sample.int(n(), size, replace = replace, prob = ~NULL)
})
21: ~local({
size <- check_size(~prop, n(), replace = replace)
sample.int(n(), size, replace = replace, prob = ~NULL)
})
20: eval_bare(sym(paste0("..", i)), frame)
19: ...elt2(i)
18: impl(~local({
size <- check_size(~prop, n(), replace = replace)
sample.int(n(), size, replace = replace, prob = ~NULL)
}))
17: .Call(dplyr_mask_eval_all, quo, private)
16: mask$eval_all(quo(impl(!!!dots)))
15: withCallingHandlers(mask$eval_all(quo(impl(!!!dots))), error = function(cnd) {
if (index && is_slice_call(error_call)) {
local_error_context(dots = dots, .index = index, mask = mask)
header <- cnd_bullet_header("evaluating")
}
else {
header <- "Problem while computing indices."
}
bullets <- c(header, i = cnd_bullet_cur_group_label())
abort(bullets, call = error_call, parent = cnd)
})
14: slice_eval(mask, dots, error_call = error_call)
13: slice_rows(.data, ..., caller_env = caller_env(), error_call = current_env())
12: slice.data.frame(tbl, local({
size <- check_size(!!size, n(), replace = replace)
sample.int(n(), size, replace = replace, prob = !!weight)
}))
11: slice(tbl, local({
size <- check_size(!!size, n(), replace = replace)
sample.int(n(), size, replace = replace, prob = !!weight)
}))
10: sample_n.data.frame(., prop)
9: dplyr::sample_n(., prop)
8: pull(., cell)
7: sub_prop %>% group_by(var) %>% dplyr::mutate(prop = round(iterate.threshold *
n()/nrow(.))) %>% dplyr::mutate(prop = ifelse(prop < min.cell,
min.cell, prop)) %>% group_by(var) %>% dplyr::sample_n(prop) %>%
pull(cell)
6: FUN(X[[i]], ...)
5: lapply(seq_along(1:n.rep), function(z) {
if (!is.null(cell_types)) {
sub_prop <- ([email protected] %>% rownames_to_column("cell"))[,
c("cell", cell_types)]
colnames(sub_prop) <- c("cell", "var")
cells <- sub_prop %>% group_by(var) %>% dplyr::mutate(prop = round(iterate.threshold *
n()/nrow(.))) %>% dplyr::mutate(prop = ifelse(prop <
min.cell, min.cell, prop)) %>% group_by(var) %>%
dplyr::sample_n(prop) %>% pull(cell)
cell.exprs.sub <- as.data.frame(cell.exprs[, cells]) %>%
rownames_to_column(var = "gene")
}
else {
cell.exprs.sub <- as.data.frame(cell.exprs[, sample(colnames(cell.exprs),
iterate.threshold)]) %>% rownames_to_column(var = "gene")
}
cell.exprs.rec <- merge(recepts.df, cell.exprs.sub, by.x = "recepts",
by.y = "gene", all.x = T)
cell.exprs.rec <- cell.exprs.rec[order(cell.exprs.rec$id),
]
...
4: InteractionPrograms(object = x, return.mat = T, ...)
3: FUN(X[[i]], ...)
2: lapply(seu_split, function(x) {
InteractionPrograms(object = x, return.mat = T, ...)
})
1: FindAllInteractionPrograms(ifnb, group.by = "stim", cell_types = "seurat_annotations",
assay = "alra")

GSM7120389

Dear all,

Thank you for developing such an exciting tool.

We are attempting to replicate the analysis done using the data deposited here (GSM7120389). Hence, I kindly request a detailed explanation of the data pre-processing steps and how one should consider the different expression matrices, namely exon, intron, and spanning.

Thank you so much in advance and Best Regards,
James

FindAllInteractionPrograms Error: Error in `$<-.data.frame`(`*tmp*`, "id", value = 1:0) : replacement has 2 rows, data has 0

Hello,

While the vignette using the pancreas data worked fine for me, I'm having some issues using my own Seurat objects.

Specifically, when I run:

lung_IP <- FindAllInteractionPrograms(lung.combined,
                                      group.by = "CellTypes", assay = "alra")

I get the following error:

Using database OmniPath
Error in `$<-.data.frame`(`*tmp*`, "id", value = 1:0) : 
  replacement has 2 rows, data has 0

I tried this with both the 'alra' and 'integrated' assays. Is there some other manipulation of the seurat object that needs to be performed first?

Best,

Alex

group.by is Cell Type Column in Vignette

Note: we recommend using Scriabin's CCIM workflow to analyze pairs of that were actually capable of interacting in reality.
group.by: Meta.data column name defining samples into which object should be split.

Why does the vignette split the data set by cell type? Wouldn't it make more sense to split by sample identifier?

FindAllInteractionPrograms(panc_id, iterate.threshold = 300, group.by = "celltype", assay = "alra", sim_threshold = 0.4)

If the Seurat object is split by cell type rather than by sample, there will be no interactions between different cell types, no? Is the best way group.by = "orig.ident", cell_types = "celltype" because cell_types is passed into InteractionPrograms via ...?

Issue running interaction programs vignette

Hi, thank you for creating this tool! I am running into an error trying to run the "Discovery of co-varying interaction programs" vignette with the panc8 dataset. It runs okay up until the InteractionPrograms() step, and then it produces the following error:

`> #find interaction programs
> panc_ip <- InteractionPrograms(panc_id, iterate.threshold = 300, cell_types = "celltype", assay = "alra")
Using database OmniPath

Iteratively generating interaction matrix
Will perform 5 iterations to approximate TOM
Error in `dplyr::sample_n()`:
! Problem while computing indices.
ℹ The error occurred in group 1: var = "acinar".
Caused by error in `sample.int()`:
! invalid 'size' argument
Run `rlang::last_error()` to see where the error occurred.
Warning message:
In size <= n || replace :
  'length(x) = 1152 > 1' in coercion to 'logical(1)'

> rlang::last_error()
<error/rlang_error>
Error in `dplyr::sample_n()`:
! Problem while computing indices.
ℹ The error occurred in group 1: var = "acinar".
Caused by error in `sample.int()`:
! invalid 'size' argument
---
Backtrace:
  1. scriabin::InteractionPrograms(...)
 18. base::local(...)
 19. base::eval.parent(substitute(eval(quote(expr), envir)))
 20. base::eval(expr, p)
 21. base::eval(expr, p)
 22. base::eval(...)
 23. base::eval(...)
 24. base::sample.int(n(), size, replace = replace, prob = NULL)
Run `rlang::last_trace()` to see the full context.`

Please let me know if you have any ideas about how to resolve this!

Thanks so much,

Erica

Usage question

Hi and thanks for this great package.

I have more of a usage question.
I have data from lung, from two ages, 4 samples for each (hence many cells).
My goals are to find CCC programs between the various cell types and they change with age and I'm not sure what's the best scriabin usage for this purpose: do I analyze both age groups together? If so do I run FindAllInteractionPrograms where group.by refers to sample/celltype/age? Or do I analyze each age group separately and then somehow compare between them? If so do I run FindAllInteractionPrograms where group.by refers to sample/celltype? And how would I then compare between the two age groups?

Thanks a lot.

error in sum_ig

when I run the
sum_ig <- AssembleInteractionGraphs(ifnb, by = "prior", split.by = "stim")
| | 0 % ~calculating Using database OmniPath

Generating Interaction Matrix...
Correcting for sequencing depth . . .
Error: vector memory exhausted (limit reached?)
Error during wrapup: vector memory exhausted (limit reached?)
Error: no more error handlers available (recursive errors?); invoking 'abort' restart

how can I solve this error? thanks

asking for sessioninfo()

Firstly, thank you for developing this tool. However, due to differences in R package versions, I might not be able to fully replicate your results. Therefore, I would like to ask if you could provide me with the sessioninfo() when you ran the multi-dataset vignettes.

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.