Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running sc_mosim #6

Open
anu-bioinfo opened this issue Dec 6, 2024 · 1 comment
Open

Error running sc_mosim #6

anu-bioinfo opened this issue Dec 6, 2024 · 1 comment

Comments

@anu-bioinfo
Copy link

Hello carolinamonzo,
I am using your very helpful software to simulate scATAC-seq data.

My cells are in three phases G0(685 cells), G1(222 cells) and SG2M(91 cells).
I create the cell_types list the following way:

cell_types <- list('G0' = c(1:685),'G1' = c(686:908),'SG2M' = c(909:998))

And run the simulation as:

cre_n_sim<-MOSim::sc_mosim(omic_list,cellTypes=cell_types,associationList=cre_n_aso,numberReps=6)
The experimental design includes:
- 6 Biological replicates
- 1 Experimental groups
- Differentially expressed genes (Up/Down) per group
- 0.25 FC below which a gene is downregulated
- 4 FC above which a gene is upregulated
- 685 Number of cells per celltype
- Regulators (activator/repressor) per group
- 3 Gene co-expression patterns
Estimating parameters for experimental group 1
Error in .local(x, ...) : size factors should be positive

I have two questions:
1). By the output dialogue of the command it seems like the program is assuming that all the cell-types have the same number. Is it possible to run the simulation using different number of cells ?

2). How can I resolve the error ?

Thanks in advance for any help.

Best,

Anupam

@carolinamonzo
Copy link
Contributor

Hi @anu-bioinfo! Thanks a lot for using MOSim!

For the first question, MOSim is going to learn from all the cells you included, but will generate the same number of cells per celltype. Since in your case it's the largest number of your set, you can simply subset the final dataset so it fits with your preferred number of cells per celltype. At the moment MOSim doesn't simulate different number of cells per celltype. You have probably seen there's some code already in the codebase to implement this in the future. Hopefully it will be there for next version, but it's not ready yet.

For your second question, looks like when it's generating the expression profiles, it's struggling to separate the genes into groups. At the moment it's generating 3 co-expression patterns for 8000 genes. The easiest way of solving the error is modifying the number of clusters and the number of features to clusterize (sc_mosim(omic_list,cellTypes=cell_types,associationList=cre_n_aso,numberReps=6, feature_no = 3000, clusters = 3))

I hope this is helpful. Best,
Carolina.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants