Skip to content

error when trying to print colData ... .show_DataFrame(object) #131

Description

@doliv071

I am getting the following error when trying to print my colData:

Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE,  : 
  row names contain missing values
11. stop("row names contain missing values")
10. (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE,
fix.empty.names = TRUE, stringsAsFactors = FALSE)
{
data.row.names <- if (check.rows && is.null(row.names)) ...
9. do.call(data.frame, c(x, alis))
8. as.data.frame.list(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors)
7. as.data.frame(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors)
6. data.frame(lapply(x, showAsCell), check.names = FALSE, row.names = NULL)
5. makeNakedCharacterMatrixForDisplay(x)
4. makeNakedCharacterMatrixForDisplay(x)
3. .show_DataFrame(object)
2. (new("standardGeneric", .Data = function (object)
standardGeneric("show"), generic = structure("show", package = "methods"),
package = "methods", group = list(), valueClass = character(0),
signature = structure("object", simpleOnly = TRUE), default = new("derivedDefaultMethod", ...
1. (new("standardGeneric", .Data = function (object)
standardGeneric("show"), generic = structure("show", package = "methods"),
package = "methods", group = list(), valueClass = character(0),
signature = structure("object", simpleOnly = TRUE), default = new("derivedDefaultMethod", ...

I traced it to a specific row in my data. but when I look at that row it has no issues with rownames.

> colData(patObject)[70151,]
DataFrame with 1 row and 28 columns
Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE,  : 
  row names contain missing values
>
> as.data.frame(colData(patObject)[70151,])
                            Sample            Barcode Patient_id Sex Age 
TGTGTTGAGCTGGTTA-1_sample8 sample8 TGTGTTGAGCTGGTTA-1         17   F  24   

However, I noticed there is an NA in the data (not shown above because I needed to omit columns). showing the first 13 columns is fine, but when I hit column 14, I get the error again. This column contains an NA and it is a factor.

> colData(patObject)[70151,1:14]
DataFrame with 1 row and 14 columns
Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE,  : 
  row names contain missing values
>
> colData(patObject)[70151,14]
<NA> 
<NA> 
25 Levels: Adipocytes APOD ABCA8hi Fibroblasts ... Venous-venular ECs

omitting this column allows it to print just fine.

Session Info:

> sessionInfo()
R version 4.5.0 (2025-04-11)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 24.04.4 LTS

Matrix products: default
BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0

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       

time zone: America/New_York
tzcode source: system (glibc)

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

other attached packages:
 [1] HSSRscripts_0.2.4           viridis_0.6.5               viridisLite_0.4.2          
 [4] stringr_1.6.0               SingleR_2.10.0              scry_1.20.0                
 [7] scran_1.36.0                scDblFinder_1.22.0          scattermore_1.2            
[10] scater_1.36.0               scuttle_1.18.0              scales_1.4.0               
[13] qs2_0.1.6                   presto_1.0.0                patchwork_1.3.2            
[16] limma_3.64.3                harmony_1.2.4               Rcpp_1.1.0                 
[19] ggplotify_0.1.3             ggplot2_3.5.2               DropletUtils_1.28.1        
[22] SingleCellExperiment_1.30.1 dplyr_1.1.4                 data.table_1.17.8          
[25] ComplexHeatmap_2.24.1       cellXY_0.99.0               celldex_1.18.0             
[28] SummarizedExperiment_1.38.1 Biobase_2.68.0              GenomicRanges_1.60.0       
[31] GenomeInfoDb_1.44.3         IRanges_2.42.0              S4Vectors_0.48.0           
[34] BiocGenerics_0.54.1         generics_0.1.4              MatrixGenerics_1.20.0      
[37] matrixStats_1.5.0           bluster_1.18.0              BiocParallel_1.42.2        

loaded via a namespace (and not attached):
  [1] igraph_2.2.1                graph_1.86.0                plotly_4.11.0              
  [4] Formula_1.2-5               devtools_2.4.6              zlibbioc_1.54.0            
  [7] tidyselect_1.2.1            bit_4.6.0                   doParallel_1.0.17          
 [10] spiralize_1.1.0             clue_0.3-66                 lattice_0.22-7             
 [13] rjson_0.2.23                blob_1.2.4                  S4Arrays_1.8.1             
 [16] caret_7.0-1                 dichromat_2.0-0.1           seqLogo_1.74.0             
 [19] png_0.1-8                   EnrichedHeatmap_1.38.0      cli_3.6.5                  
 [22] ProtGenerics_1.40.0         multtest_2.64.0             universalmotif_1.26.3      
 [25] BiocIO_1.18.0               chipenrich_2.32.0           pbmcapply_1.5.1            
 [28] purrr_1.2.0                 chromVAR_1.30.1             org.Mm.eg.db_3.21.0        
 [31] BiocNeighbors_2.2.0         uwot_0.2.4                  curl_7.0.0                 
 [34] mime_0.13                   evaluate_1.0.5              stringi_1.8.7              
 [37] org.Rn.eg.db_3.21.0         pROC_1.19.0.1               backports_1.5.0            
 [40] desc_1.4.3                  Exact_3.3                   XML_3.99-0.20              
 [43] lubridate_1.9.4             httpuv_1.6.16               AnnotationDbi_1.72.0       
 [46] magrittr_2.0.4              rappdirs_0.3.3              splines_4.5.0              
 [49] prodlim_2025.04.28          jpeg_0.1-11                 eulerr_7.0.4               
 [52] org.Hs.eg.db_3.21.0         DT_0.34.0                   rootSolve_1.8.2.4          
 [55] ggbeeswarm_0.7.3            sessioninfo_1.2.3           DBI_1.2.3                  
 [58] HDF5Array_1.36.0            withr_3.0.2                 class_7.3-23               
 [61] rprojroot_2.1.1             xgboost_3.1.2.1             RBGL_1.84.0                
 [64] formatR_1.14                rtracklayer_1.68.0          BiocManager_1.30.27        
 [67] htmlwidgets_1.6.4           fs_1.6.6                    biomaRt_2.64.0             
 [70] ggrepel_0.9.6               ggvenn_0.1.19               labeling_0.4.3             
 [73] SparseArray_1.8.1           cellranger_1.1.0            plyranges_1.28.0           
 [76] h5mread_1.0.1               lmom_3.2                    zoo_1.8-15                 
 [79] GGally_2.1.2                XVector_0.48.0              knitr_1.50                 
 [82] TFBSTools_1.46.0            UCSC.utils_1.4.0            RhpcBLASctl_0.23-42        
 [85] JASPAR2024_0.99.7           TFMPvalue_0.0.9             timechange_0.3.0           
 [88] foreach_1.5.2               annotatr_1.34.0             caTools_1.18.3             
 [91] timeDate_4051.111           rhdf5_2.52.1                pwalign_1.4.0              
 [94] quantreg_6.1                R.oo_1.27.1                 RSpectra_0.16-2            
 [97] irlba_2.3.5.1               ggrastr_1.0.2               regioneR_1.40.1            
[100] commonmark_2.0.0            DescTools_0.99.60           alabaster.schemas_1.8.0    
[103] gridGraphics_0.5-1          ellipsis_0.3.2              lazyeval_0.2.2             
[106] yaml_2.3.12                 survival_3.8-3              BiocVersion_3.21.1         
[109] crayon_1.5.3                RcppAnnoy_0.0.22            RColorBrewer_1.1-3         
[112] tidyr_1.3.1                 later_1.4.4                 ggridges_0.5.7             
[115] codetools_0.2-20            base64enc_0.1-3             GlobalOptions_0.1.3        
[118] KEGGREST_1.48.1             shape_1.4.6.1               estimability_1.5.1         
[121] Rsamtools_2.24.0            filelock_1.0.3              foreign_0.8-90             
[124] pkgconfig_2.0.3             xml2_1.5.1                  GenomicAlignments_1.44.0   
[127] BSgenome_1.76.0             alabaster.base_1.8.0        xtable_1.8-4               
[130] interp_1.1-6                chipenrich.data_2.32.0      plyr_1.8.9                 
[133] httr_1.4.7                  tools_4.5.0                 globals_0.18.0             
[136] hardhat_1.4.2               pkgbuild_1.4.8              beeswarm_0.4.0             
[139] htmlTable_2.4.3             broom_1.0.11                checkmate_2.3.3            
[142] nlme_3.1-168                futile.logger_1.4.3         lambda.r_1.2.4             
[145] dbplyr_2.5.1                ExperimentHub_2.16.1        MatrixModels_0.5-4         
[148] assertthat_0.2.1            ComplexUpset_1.3.3          digest_0.6.39              
[151] ChIPpeakAnno_3.42.0         Matrix_1.7-4                farver_2.1.2               
[154] tzdb_0.5.0                  AnnotationFilter_1.32.0     reshape2_1.4.5             
[157] ModelMetrics_1.2.2.2        yulab.utils_0.2.3           DirichletMultinomial_1.50.0
[160] rpart_4.1.24                fQuSAGE_0.0.1               glue_1.8.0                 
[163] cachem_1.1.0                VennDiagram_1.7.3           BiocFileCache_2.16.2       
[166] UpSetR_1.4.0                Hmisc_5.2-4                 Biostrings_2.76.0          
[169] classInt_0.4-11             mvtnorm_1.3-3               parallelly_1.46.0          
[172] org.Dr.eg.db_3.21.0         pkgload_1.4.1               statmod_1.5.1              
[175] ScaledMatrix_1.16.0         pbapply_1.7-4               httr2_1.2.2                
[178] dqrng_0.4.1                 gower_1.0.2                 gtools_3.9.5               
[181] bamsignals_1.40.0           readxl_1.4.5                alabaster.se_1.8.0         
[184] gridExtra_2.3               shiny_1.12.1                lava_1.8.2                 
[187] GenomeInfoDbData_1.2.14     org.Dm.eg.db_3.21.0         seqsetvis_1.28.0           
[190] R.utils_2.13.0              rhdf5filters_1.20.0         RCurl_1.98-1.17            
[193] memoise_2.0.1               rmarkdown_2.30              R.methodsS3_1.8.2          
[196] gld_2.6.8                   reshape_0.8.10              future_1.68.0              
[199] gypsum_1.4.0                stringfish_0.17.0           rstudioapi_0.17.1          
[202] msigdbr_25.1.1              cluster_2.1.8.1             hms_1.1.4                  
[205] cowplot_1.2.0               colorspace_2.1-2            rlang_1.1.6                
[208] DelayedMatrixStats_1.30.0   sparseMatrixStats_1.20.0    ipred_0.9-15               
[211] circlize_0.4.17             mgcv_1.9-4                  xfun_0.54                  
[214] ggseqlogo_0.2               alabaster.matrix_1.8.0      coda_0.19-4.1              
[217] e1071_1.7-16                TH.data_1.1-5               emmeans_2.0.0              
[220] remotes_2.5.0               recipes_1.3.1               iterators_1.0.14           
[223] abind_1.4-8                 tibble_3.3.0                motifmatchr_1.30.0         
[226] Rhdf5lib_1.30.0             readr_2.1.6                 futile.options_1.0.1       
[229] bitops_1.0-9                promises_1.5.0              InteractionSet_1.36.1      
[232] RSQLite_2.4.5               sandwich_3.1-1              fgsea_1.34.2               
[235] DelayedArray_0.34.1         proxy_0.4-28                compiler_4.5.0             
[238] forcats_1.0.1               colorRamps_2.3.4            alabaster.ranges_1.8.0     
[241] prettyunits_1.2.0           writexl_1.5.4               boot_1.3-32                
[244] beachmat_2.24.0             SparseM_1.84-2              listenv_0.10.0             
[247] edgeR_4.6.3                 roxygen2_7.3.3              AnnotationHub_3.16.1       
[250] BiocSingular_1.24.0         usethis_3.2.1               rms_8.1-0                  
[253] MASS_7.3-65                 progress_1.2.3              babelgene_22.9             
[256] R6_2.6.1                    fastmatch_1.1-6             fastmap_1.2.0              
[259] multcomp_1.4-29             vipor_0.4.7                 ensembldb_2.32.0           
[262] rsvd_1.0.5                  nnet_7.3-20                 gtable_0.3.6               
[265] KernSmooth_2.23-26          latticeExtra_0.6-31         miniUI_0.1.2               
[268] deldir_2.0-4                htmltools_0.5.9             RcppParallel_5.1.11-1      
[271] bit64_4.6.0-1               polspline_1.1.25            lifecycle_1.0.4            
[274] restfulr_0.0.16             vctrs_0.6.5                 haven_2.5.5                
[277] future.apply_1.20.1         pillar_1.11.1               GenomicFeatures_1.60.0     
[280] metapod_1.16.0              locfit_1.5-9.12             otel_0.2.0                 
[283] expm_1.0-0                  jsonlite_2.0.0              GetoptLong_1.1.0         

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions