Waterfall failing with custom file: Error in `colnames<-`(`*tmp*`, value = c("sample", "gene", "trv_type")) : attempt to set 'colnames' on an object with less than two dimensions
0
0
Entering edit mode
Jeni ▴ 10
@jeni-23673
Last seen 24 months ago
Spain

Hi!

I am trying to get a plot of genes mutated per sample with waterfall() function from GenVisR package.

These are the first rows of my data frame, including their colnames:

   chr     start       end      REF   ALT     sample        gene     variant_class
   18    752225      752225      A     T      patient_2A   geneA     missense_variant
   2   291000000   291000000     T     C      patient_3A   geneB     missense_variant
   1      38270       38270      C     A      patient_2B   geneD     missense_variant
   1   56729899     56729899     A     T      patient_2B   geneC     missense_variant
   1    6824432      6824432     C     T      patient_3B   geneA     missense_variant
   14  12833945     12833945     C     T      patient_3B   geneF     missense_variant

When running the command:

waterfall(allVariants_toPlot, fileType = 'Custom')

I get the following error:

Checking if input is properly formatted...
Detected "Custom" file_type flag, looking for correct column names...
 Error in `colnames<-`(`*tmp*`, value = c("sample", "gene", "trv_type")) : 
  attempt to set 'colnames' on an object with less than two dimensions

How can I solve this?

This is my sessionInfo

R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] GenVisR_1.20.0              maftools_2.4.12             xlsx_0.6.4.2                enrichR_2.1                 data.table_1.13.0          
 [6] eply_0.1.2                  magrittr_1.5                stringr_1.4.0               purrr_0.3.4                 dplyr_1.0.2                
[11] VariantAnnotation_1.34.0    Rsamtools_2.4.0             SummarizedExperiment_1.18.2 DelayedArray_0.14.1         matrixStats_0.57.0         
[16] Biobase_2.48.0              GenomicRanges_1.40.0        GenomeInfoDb_1.24.2         Biostrings_2.56.0           XVector_0.28.0             
[21] IRanges_2.22.2              S4Vectors_0.26.1            BiocGenerics_0.34.0        

loaded via a namespace (and not attached):
 [1] viridis_0.5.1            httr_1.4.2               viridisLite_0.3.0        bit64_4.0.5              splines_4.0.2            gtools_3.8.2            
 [7] assertthat_0.2.1         askpass_1.1              BiocManager_1.30.10      BiocFileCache_1.12.1     blob_1.2.1               xlsxjars_0.6.1          
[13] BSgenome_1.56.0          GenomeInfoDbData_1.2.3   progress_1.2.2           pillar_1.4.6             RSQLite_2.2.1            lattice_0.20-41         
[19] glue_1.4.2               digest_0.6.25            RColorBrewer_1.1-2       colorspace_1.4-1         plyr_1.8.6               FField_0.1.0            
[25] Matrix_1.2-18            XML_3.99-0.5             pkgconfig_2.0.3          biomaRt_2.44.1           zlibbioc_1.34.0          scales_1.1.1            
[31] BiocParallel_1.22.0      tibble_3.0.3             openssl_1.4.3            generics_0.0.2           ggplot2_3.3.2            ellipsis_0.3.1          
[37] GenomicFeatures_1.40.1   survival_3.2-7           crayon_1.3.4             memoise_1.1.0            tools_4.0.2              prettyunits_1.1.1       
[43] hms_0.5.3                lifecycle_0.2.0          munsell_0.5.0            AnnotationDbi_1.50.3     compiler_4.0.2           rlang_0.4.7             
[49] grid_4.0.2               RCurl_1.98-1.2           rstudioapi_0.11          rjson_0.2.20             rappdirs_0.3.1           bitops_1.0-6            
[55] gtable_0.3.0             DBI_1.1.0                curl_4.3                 R6_2.4.1                 gridExtra_2.3            GenomicAlignments_1.24.0
[61] rtracklayer_1.48.0       bit_4.0.4                rJava_0.9-13             stringi_1.5.3            Rcpp_1.0.5               vctrs_0.3.4             
[67] dbplyr_1.4.4             tidyselect_1.1.0
variants waterfall GenVisR • 1.2k views
ADD COMMENT
0
Entering edit mode

I'm having trouble reproducing this, what does str(allVariants_toPlot) say, is anything a list instead of a vector? Are you comfortable using R's debugging tools? I can tell you exactly where this is failing, but I cannot say why it is failing there without being able to reproduce this.

As a quick test can you run this through, brcaMAF is automatically loaded with GenVisR

tmp <- head(brcaMAF[,c("Tumor_Sample_Barcode", "Hugo_Symbol", "Variant_Classification")]) colnames(tmp) <- c("sample", "gene", "variant_class")

Note you also need to supply a variant_class_order param when filetype is Custom, you can just use unique(tmp$variant_class) for that for now

ADD REPLY

Login before adding your answer.

Traffic: 463 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6