maftools icon indicating copy to clipboard operation
maftools copied to clipboard

lollipopPlot2 and lollipopPlot parse protein variants differently

Open lbeltrame opened this issue 4 years ago • 3 comments

Describe the issue As an example:

  • R1443* in BRCA1 is correctly plotted by lollipopPlot
  • R1443* is discarded by get_lp_data invoked 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

lbeltrame avatar Sep 20 '21 07:09 lbeltrame

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.

lbeltrame avatar Sep 20 '21 08:09 lbeltrame

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?

PoisonAlien avatar Sep 20 '21 10:09 PoisonAlien

Yes, it does.

lbeltrame avatar Sep 20 '21 13:09 lbeltrame

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Aug 28 '23 01:08 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Sep 11 '23 02:09 github-actions[bot]