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

x or y has vectors with zero standard deviation; consider setting use_nan = TRUE #44

Open
Pinolinoo opened this issue Aug 29, 2022 · 5 comments

Comments

@Pinolinoo
Copy link

Why do I get this error message when running generate_gold_standart?

@rcannood
Copy link
Member

Can you provide me with a small reproducible example? Which version of dyngen is this ?

@Pinolinoo
Copy link
Author

Thank you very much for replying!
It's version 1.0.3

I ran this script:

`set.seed(1)

backbone <- backbone_bifurcating()
config <-
initialise_model(
backbone = backbone,
num_tfs = nrow(backbone$module_info),
num_targets = 500,
num_hks = 500,
verbose = FALSE
)

model <- generate_tf_network(config)
plot_feature_network(model, show_targets = FALSE)
model <- generate_feature_network(model)
plot_feature_network(model)
model <- generate_kinetics(model)
model <- generate_gold_standard(model)

model <- generate_cells(model)
plot_simulations(model)

write_rds(model, "mode_circle.rds", compress = "gz")
`

@rcannood
Copy link
Member

Can you update to 1.0.4 ? It was caused by an update to an underlying package.

@Pinolinoo
Copy link
Author

Ok so I updated to 1.0.4 and now when I run the same script it gives me the error:

Error in x$.self$finalize() : attempt to apply non-function Error in x$.self$finalize() : attempt to apply non-function Error in x$.self$finalize() : attempt to apply non-function Error in (function (x) : attempt to apply non-function

After running generate_gold_standart()

However if I run the function again afterwards it doesn't give me an error!

@Pinolinoo
Copy link
Author

Pinolinoo commented Sep 5, 2022

Also when continuing then and wanting to export the data I get the following errors:

when trying with seurat as in:

library(Seurat) seurat <- as_seurat(model) write_rds(seurat, "dataset_seurat.rds")

I get
Error in UseMethod("mutate") : no applicable method for 'mutate' applied to an object of class "NULL"

also with anndata:
library(anndata) ad <- as_anndata(model) ad$write_h5ad("dataset.h5ad")

I get

ad <- as_anndata(model) Error in as(log2(counts + 1), "dgCMatrix") : no method or default for coercing "numeric" to "dgCMatrix"

I suppose there is still something going wrong during the simulation!

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