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

Unused argument error when running example code #5

Open
vishalmshah opened this issue Oct 2, 2024 · 0 comments
Open

Unused argument error when running example code #5

vishalmshah opened this issue Oct 2, 2024 · 0 comments

Comments

@vishalmshah
Copy link

vishalmshah commented Oct 2, 2024

Hi! I have been attempting to run eskrate with your example data, but I am running into some issues. Most notably, when running the exact code from the readme, I get this error when running the estimateKinetics() function:

Error in estimateKinetics(observedData = observed.data, threadN = 2) : unused argument (observedData = observed.data)

In order to solve this, I have also edited two functions from your code. However, these functions output ridiculous transcription rates, so I am unsure if these are correct.

Here is the code that I am running (straight from the readme):

#devtools::install_github("rajewsky-lab/Eskrate")  

library(tibble)
library(dplyr)
library(magrittr)
library(tidyr)
library(ggplot2)
library(cowplot)
library(Rmpfr)
library(gam)
library(mgcv)
library(foreach)
library(doParallel)
library(Eskrate)

library(Seurat)
library(SeuratData)
library(SeuratDisk)

setwd('/projectnb/velocity/vishalms/')


### cell meta data
cells_info <- readRDS("/data/cells_info.rds")

### gene expression matrix
raw_labeled_mature <- readRDS("./Eskrate/data/raw_counts_labeled_mature.rds")
raw_unlabeled_mature <- readRDS("./Eskrate/data/raw_counts_unlabeled_mature.rds")
raw_labeled_precursor <- readRDS( "./Eskrate/data/raw_counts_labeled_precursor.rds")
raw_unlabeled_precursor <- readRDS("./Eskrate/data/raw_counts_unlabeled_precursor.rds")

observed.data <- 
  getInput(rawCountsLabeledMature = raw_labeled_mature,
           rawCountsUnlabeledMature = raw_unlabeled_mature,
           rawCountsLabeledPrecursor = raw_labeled_precursor,
           rawCountsUnlabeledPrecursor = raw_unlabeled_precursor,
           cells = cells_info,
           labelingTime = 15)

### select two genes (ZNF711, KIF14) for demo
observed.data %<>% 
  filter(gene %in% c("ZNF711", "KIF14")) %>%
  droplevels

data_rates <- 
  estimateKinetics(observedData = observed.data, 
                   threadN = 2)

data_predicted <- 
  getPredictions(dataRates = data_rates, 
                 threadN=2)

p1 <-
  plotMtotalAlphaGamma(df.prediction = predicted.data,   
                       gene.to.plot = "ZNF711",
                       color.alpha = "#D95F02",
                       color.gamma = "#1B9E77",
                       color.expression = "#666666",
                       show.phase.boundaries = FALSE,
                       line.size = 1,
                       font.size = 16)

p2 <-
  plotMtotalAlphaGamma(df.prediction = predicted.data,   
                       gene.to.plot = "KIF14",
                       color.alpha = "#D95F02",
                       color.gamma = "#1B9E77",
                       color.expression = "#666666",
                       show.phase.boundaries = FALSE,
                       line.size = 1,
                       font.size = 16)

plot_grid(p1, p2, ncol=2)

Here is my sessionInfo():

sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: AlmaLinux 8.10 (Cerulean Leopard)

Matrix products: default
BLAS:   /share/pkg.7/r/4.1.2/install/lib64/R/lib/libRblas.so
LAPACK: /share/pkg.7/r/4.1.2/install/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] parallel  splines   stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] SeuratDisk_0.0.0.9020 SeuratData_0.2.2      SeuratObject_4.0.4    Seurat_4.1.0          Eskrate_0.1.0        
 [6] doParallel_1.0.16     iterators_1.0.13      mgcv_1.8-38           nlme_3.1-155          gam_1.20             
[11] foreach_1.5.1         Rmpfr_0.8-7           gmp_0.6-2.1           cowplot_1.1.1         ggplot2_3.4.2        
[16] tidyr_1.3.0           magrittr_2.0.3        dplyr_1.1.2           tibble_3.2.1         

loaded via a namespace (and not attached):
 [1] Rtsne_0.16            colorspace_2.1-0      deldir_1.0-9          ellipsis_0.3.2        ggridges_0.5.3       
 [6] rstudioapi_0.13       spatstat.data_3.0-0   leiden_0.3.9          listenv_0.9.0         bit64_4.0.5          
[11] ggrepel_0.9.3         fansi_1.0.4           codetools_0.2-18      polyclip_1.10-0       jsonlite_1.8.5       
[16] ica_1.0-2             cluster_2.1.2         png_0.1-8             uwot_0.1.14           shiny_1.7.1          
[21] sctransform_0.3.3     spatstat.sparse_3.0-0 compiler_4.1.2        httr_1.4.6            Matrix_1.4-1         
[26] fastmap_1.1.1         lazyeval_0.2.2        cli_3.6.1             later_1.3.1           htmltools_0.5.5      
[31] tools_4.1.2           igraph_1.5.0          gtable_0.3.3          glue_1.6.2            RANN_2.6.1           
[36] reshape2_1.4.4        rappdirs_0.3.3        Rcpp_1.0.10           scattermore_0.7       vctrs_0.6.3          
[41] lmtest_0.9-39         stringr_1.5.0         globals_0.16.2        mime_0.12             miniUI_0.1.1.1       
[46] lifecycle_1.0.3       irlba_2.3.5.1         goftest_1.2-3         future_1.32.0         MASS_7.3-55          
[51] zoo_1.8-10            scales_1.2.1          spatstat.core_2.3-2   promises_1.2.0.1      spatstat.utils_3.0-1 
[56] RColorBrewer_1.1-3    reticulate_1.30       pbapply_1.5-0         gridExtra_2.3         rpart_4.1.16         
[61] stringi_1.7.12        rlang_1.1.1           pkgconfig_2.0.3       matrixStats_1.0.0     lattice_0.20-45      
[66] ROCR_1.0-11           purrr_1.0.1           tensor_1.5            patchwork_1.1.1       htmlwidgets_1.6.2    
[71] bit_4.0.4             tidyselect_1.2.0      parallelly_1.36.0     RcppAnnoy_0.0.20      plyr_1.8.8           
[76] R6_2.5.1              generics_0.1.3        DBI_1.1.2             pillar_1.9.0          withr_2.5.0          
[81] fitdistrplus_1.1-6    survival_3.2-13       abind_1.4-7           future.apply_1.11.0   hdf5r_1.3.5          
[86] crayon_1.4.2          KernSmooth_2.23-20    utf8_1.2.3            spatstat.geom_3.0-3   plotly_4.10.2        
[91] grid_4.1.2            data.table_1.14.8     digest_0.6.31         xtable_1.8-6          httpuv_1.6.5         
[96] munsell_0.5.0         viridisLite_0.4.2     Revelio_0.1.0 
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

1 participant