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

Incompatible Tibble sizes when generating knockdown model #56

Open
YinoZ opened this issue Nov 15, 2023 · 0 comments · May be fixed by #57
Open

Incompatible Tibble sizes when generating knockdown model #56

YinoZ opened this issue Nov 15, 2023 · 0 comments · May be fixed by #57

Comments

@YinoZ
Copy link

YinoZ commented Nov 15, 2023

Hi,
Thank you for amazing works.
I'm encountering an issue while attempting to generate a knockdown model and would appreciate some help. I have successfully followed the tutorial to generate model_common. However, I am facing the following error when trying to generate model_ko:

Error in `tibble()`:
! Tibble columns must have compatible sizes.
• Size 500: Existing data.
• Size 100: Column at position 6.
ℹ Only values of size one are recycled.

I suspect the issue may arise from generating a more complex tf_network where I did not use the default nrow(backbone$module_info). Here is the code I used to generate model_common:

set.seed(42)

backbone <- backbone_bifurcating()

config <-
  initialise_model(
    backbone = backbone,
    num_cells = 5000,
    num_tfs = 100,
    num_targets = 500,
    num_hks = 100,
    verbose = FALSE,
    download_cache_dir = tools::R_user_dir("dyngen", "data"),
    simulation_params = simulation_default(
      total_time = 1000,
      census_interval = 2, 
      ssa_algorithm = ssa_etl(tau = 300/3600),
      experiment_params = simulation_type_wild_type(num_simulations = 100)
    )
  )

model_common <-
  config %>%
  generate_tf_network() %>%
  generate_feature_network() %>% 
  generate_kinetics() %>%
  generate_gold_standard()

Then, the code to generate model_ko is as follows:

plot_backbone_modulenet(model_common)
b3_genes <- model_common$feature_info %>% filter(module_id == "B3") %>% pull(feature_id)
model_ko <- model_common
model_ko$simulation_params$experiment_params <- simulation_type_knockdown(
  num_simulations = 100L,
  timepoint = 0.2, 
  genes = b3_genes,
  num_genes = length(b3_genes),
  multiplier = 0
)

I suspect the issue may be related to not using the default number of rows when generating tf_network. Is there a way to resolve this issue, or how should I correctly generate a more complex tf_network?

Thank you!

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

Successfully merging a pull request may close this issue.

1 participant