lollipopPlot2 and lollipopPlot parse protein variants differently
Describe the issue As an example:
- R1443* in BRCA1 is correctly plotted by lollipopPlot
- R1443* is discarded by
get_lp_datainvoked by lollipopPlot2
This also happens with HGVSp notation, e.g. p.Arg1443Ter.
A cursory look at the code seems to indicate that the regexes which parse the protein change are different in the two functions: lollipopPlot does not use get_lp_data at all.
Session info
R version 4.0.5 (2021-03-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.4
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale:
[1] it_IT.UTF-8/it_IT.UTF-8/it_IT.UTF-8/C/it_IT.UTF-8/it_IT.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] maftools_2.6.05
loaded via a namespace (and not attached):
[1] lattice_0.20-41 ps_1.6.0 fansi_0.4.2 crayon_1.4.1 utf8_1.2.1 grid_4.0.5 R6_2.5.0 lifecycle_1.0.0
[9] magrittr_2.0.1 pillar_1.6.0 cli_2.5.0 rlang_0.4.10 rstudioapi_0.13 data.table_1.14.0 Matrix_1.3-2 vctrs_0.3.7
[17] ellipsis_0.3.1 splines_4.0.5 RColorBrewer_1.1-2 tools_4.0.5 readr_1.4.0 glue_1.4.2 hms_1.0.0 survival_3.2-11
[25] compiler_4.0.5 pkgconfig_2.0.3 tibble_3.1.1
The reason is in https://github.com/PoisonAlien/maftools/blob/a62aa15ee561363615bf17d8d1fff3c9a7833d1e/R/get_lp_data.R#L28
If there's another column called AAChange, it is not replaced, and therefore the code gets confused and picks the wrong one, causing parsing errors.
Hi,
Thanks for going through the code. Does it work as expected if you change your column name (in the MAF) to other than AAChange?
Yes, it does.
This issue is stale because it has been open for 60 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.