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

Incosistent argument in the velocity analysis example #3

Open
subercui opened this issue Apr 5, 2020 · 7 comments
Open

Incosistent argument in the velocity analysis example #3

subercui opened this issue Apr 5, 2020 · 7 comments

Comments

@subercui
Copy link

subercui commented Apr 5, 2020

Hi, when using the usecase_rna_velocity

pwalk(design_datasets, function(id, seed, backbone) {
  if (!file.exists(exp$dataset_file(id))) {
    cat("## Generating ", id, "\n", sep = "")
    set.seed(seed)
    backbone <- dyngen::list_backbones()[[backbone]]()
    model <-
      initialise_model(
        id = id,
        num_tfs = 20,
        num_targets = 50,
        num_hks = 15,
        backbone = backbone,
        num_cells = 1000,
        simulation_params = simulation_default(
          compute_propensity_ratios = TRUE
        ),
        num_cores = 4,
        download_cache_dir = "~/.cache/dyngen",
        verbose = TRUE
      )
    generate_dataset(
      model,
      output_dir = exp$dataset_folder(id),
      make_plots = TRUE,
      store_propensity_ratios = TRUE
    )
  }

  gc()
})

I got an error: Error in initialise_model(id = id, num_tfs = 20, num_targets = 50, num_hks = 15, : unused argument (id = id)
Seems the interface is incosistent? Do you have any idea?

@rcannood
Copy link
Member

rcannood commented Apr 6, 2020

usecase_rna_velocity uses the devel version of dyngen. I'll merge the devel version of dyngen into master.
Could you reinstall dyngen and try again? :)

@subercui
Copy link
Author

subercui commented Apr 6, 2020

Thank you for the prompt update! It solves the argument inconsistency, but the dynplot_dimred is not found here

dynplot_dimred(dataset) + geom_cell_point() Error in dynplot_dimred(dataset) : could not find function "dynplot_dimred"
Does the dynplot2 need to update as well?

@rcannood
Copy link
Member

rcannood commented Apr 6, 2020

Ahh yes, you need the latest dynplot2. According to @zouter, this branch is still very much WIP, so let us know if you encounter any issues there.

Please run

devtools::install_github("dynverse/dynplot2@devel")

@subercui
Copy link
Author

subercui commented Apr 6, 2020

Encountering some weird error showing repo name 'scvelo'. I guess maybe I can try to install manually but here is the error message:

devtools::install_github("dynverse/dynplot2@devel")  
Downloading GitHub repo dynverse/dynplot2@devel
Error: Failed to install 'dynplot2' from GitHub:
  HTTP error 404.
  No commit found for the ref devel

  Did you spell the repo owner (`dynverse`) and repo name (`scvelo`) correctly?
  - If spelling is correct, check that you have the required permissions to access the repo.

@subercui
Copy link
Author

subercui commented Apr 6, 2020

Also, when running 2_velocity.R, this line scvelo::get_velocity raises error Error in loadNamespace(name) : there is no package called ‘scvelo’, although I can successfully import using reticulate::import("scvelo").

I think some misconfiguration related to scvelo.

@rcannood
Copy link
Member

rcannood commented Apr 6, 2020

Encountering some weird error showing repo name 'scvelo'. I guess maybe I can try to install manually but here is the error message:

I see you managed to get scvelo (the R package) installed manually. In the meantime, I also fixed the underlying problem.

Also, when running 2_velocity.R, this line scvelo::get_velocity raises error Error in loadNamespace(name) : there is no package called ‘scvelo’, although I can successfully import using reticulate::import("scvelo").

This is because by default, reticulate uses r-miniconda. There are two approaches to solving this:

1. Install scvelo in whatever environment reticulate is using

By running scvelo::install_scvelo() or reticulate::py_install(packages = "git+https://github.com/theislab/scvelo.git", pip = TRUE).

2. Specify which python to use

Either specify the conda environment you use (reticulate::use_condaenv("yourcondaenv")), or let reticulate know that you wish to use the default python (reticulate::use_python("/usr/bin/python3", required = TRUE)).

Do either of these approaches solve your problem? :)

@subercui
Copy link
Author

subercui commented Apr 8, 2020

Yes, the problem is solved. The dynplot2@devel is installed successfully and then the scvelo package works well.
Thanks again!

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