cole-trapnell-lab / cicero-release

https://cole-trapnell-lab.github.io/cicero-release/
MIT License
56 stars 14 forks source link

Plot_connections: Error in `$<-.data.frame`(`*tmp*`, "feature", value = character(0)) : replacement has 0 rows, data has 101 #39

Closed yzh2017 closed 4 years ago

yzh2017 commented 4 years ago

Hi, I was running the vignette provided on the Cicero website and encountered the following error when trying to plot the connections. Could you please help me figure out what the issue is? Thanks a lot!!

plot_connections(conns, "chr2", 9773451, 9848598,
                 gene_model = gene_anno, 
                 coaccess_cutoff = .25, 
                 connection_width = .5, 
                 collapseTranscripts = "longest" )

Error in $<-.data.frame(*tmp*, "feature", value = character(0)) : replacement has 0 rows, data has 101

Traceback:

5. stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), N, nrows), domain = NA)
4. `$<-.data.frame`(`*tmp*`, "feature", value = character(0))
3. `$<-`(`*tmp*`, "feature", value = character(0))
2. make_gene_model_track(gene_model, chr, collapseTranscripts, gene_model_color, gene_model_shape)
1. plot_connections(conns, "chr2", 9773451, 9848598, gene_model = gene_anno, coaccess_cutoff = 0.25, connection_width = 0.5, collapseTranscripts = "longest")

And here is my session info:


Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblas-r0.3.3.so

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

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

other attached packages:
 [1] cicero_1.3.3                Gviz_1.28.3                 monocle3_0.2.1.1           
 [4] SingleCellExperiment_1.6.0  SummarizedExperiment_1.14.1 DelayedArray_0.10.0        
 [7] BiocParallel_1.18.1         matrixStats_0.55.0          GenomicRanges_1.36.1       
[10] GenomeInfoDb_1.20.0         IRanges_2.18.3              S4Vectors_0.22.1           
[13] Biobase_2.44.0              BiocGenerics_0.30.0        

loaded via a namespace (and not attached):
 [1] ProtGenerics_1.16.0      bitops_1.0-6             bit64_0.9-7              RcppAnnoy_0.0.13        
 [5] RColorBrewer_1.1-2       progress_1.2.2           httr_1.4.1               tools_3.6.0             
 [9] backports_1.1.5          irlba_2.3.3              R6_2.4.0                 rpart_4.1-15            
[13] uwot_0.1.4               Hmisc_4.2-0              DBI_1.0.0                lazyeval_0.2.2          
[17] colorspace_1.4-1         nnet_7.3-12              tidyselect_0.2.5         gridExtra_2.3           
[21] prettyunits_1.0.2        curl_4.2                 bit_1.1-14               compiler_3.6.0          
[25] htmlTable_1.13.2         rtracklayer_1.44.4       labeling_0.3             scales_1.0.0            
[29] checkmate_1.9.4          stringr_1.4.0            digest_0.6.22            Rsamtools_2.0.3         
[33] foreign_0.8-72           XVector_0.24.0           dichromat_2.0-0          base64enc_0.1-3         
[37] pkgconfig_2.0.3          htmltools_0.4.0          ensembldb_2.8.1          BSgenome_1.52.0         
[41] htmlwidgets_1.5.1        rlang_0.4.0              VGAM_1.1-1               rstudioapi_0.10         
[45] RSQLite_2.1.2            FNN_1.1.3                acepack_1.4.1            dplyr_0.8.3             
[49] VariantAnnotation_1.30.1 RCurl_1.95-4.12          magrittr_1.5             GenomeInfoDbData_1.2.1  
[53] Formula_1.2-3            Matrix_1.2-17            Rcpp_1.0.2               munsell_0.5.0           
[57] viridis_0.5.1            yaml_2.2.0               stringi_1.4.3            zlibbioc_1.30.0         
[61] plyr_1.8.4               blob_1.2.0               crayon_1.3.4             lattice_0.20-38         
[65] Biostrings_2.52.0        splines_3.6.0            GenomicFeatures_1.36.4   hms_0.5.1               
[69] zeallot_0.1.0            knitr_1.25               pillar_1.4.2             codetools_0.2-16        
[73] reshape2_1.4.3           biomaRt_2.40.5           XML_3.98-1.20            glue_1.3.1              
[77] biovizBase_1.32.0        latticeExtra_0.6-28      RcppParallel_4.4.4       data.table_1.12.6       
[81] vctrs_0.2.0              gtable_0.3.0             purrr_0.3.3              assertthat_0.2.1        
[85] ggplot2_3.2.1            xfun_0.10                AnnotationFilter_1.8.0   RSpectra_0.15-0         
[89] glasso_1.11              survival_2.44-1.1        viridisLite_0.3.0        tibble_2.1.3            
[93] GenomicAlignments_1.20.1 AnnotationDbi_1.46.1     memoise_1.1.0            cluster_2.1.0      ```
hpliner commented 4 years ago

Thank you for your detailed report! Looks like this bug was introduced in my last update. It's now fixed in the current release (1.3.4.3 in monocle3 branch and 1.3.3 in master). Go ahead and reinstall and you should be good to go!