PoisonAlien / maftools

Summarize, Analyze and Visualize MAF files from TCGA or in-house studies.
http://bioconductor.org/packages/release/bioc/html/maftools.html
MIT License
443 stars 218 forks source link

Different aa.lengths in lollipopPlot() and lollipopPlot2() #1019

Closed YarsnC closed 4 months ago

YarsnC commented 4 months ago

Issue

Hi, I was trying to draw a lollipop plot of CTNNB1 mutations. I noticed that using lollipopPlot(), it showed that there were 781 aa, which was consistent with the aa length in public databases. However, when using lollipopPlot2(), it showed that there were 784 aa.

I tried to run the example codes and found the same issue. lollipopPlot() showed 993 aa in FLT3 while lollipopPlot2() showed 996 aa. It seems that lollipopPlot2() presents aa length incorrectly.

FLT3_lollipopPlot

FLT3_lollipopPlot2

Command

primary.apl <- system.file("extdata", "APL_primary.maf.gz", package = "maftools")
relapse.apl <- system.file("extdata", "APL_relapse.maf.gz", package = "maftools")
primary.apl <- read.maf(maf = primary.apl)
relapse.apl <- read.maf(maf = relapse.apl)
lollipopPlot(primary.apl, AACol = 'amino_acid_change', gene = 'FLT3')
lollipopPlot(relapse.apl, AACol = 'amino_acid_change', gene = 'FLT3')
lollipopPlot2(m1 = primary.apl, m2 = relapse.apl, gene = "FLT3",AACol1 = "amino_acid_change", AACol2 = "amino_acid_change", m1_name = "Primary", m2_name = "Relapse")

Session info

I reinstalled maftools from github repository and ran the code on both Windows and CentOS. The issue remained the same.

Windows

R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22631)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8  LC_CTYPE=Chinese (Simplified)_China.utf8    LC_MONETARY=Chinese (Simplified)_China.utf8
[4] LC_NUMERIC=C                                LC_TIME=Chinese (Simplified)_China.utf8    

time zone: Asia/Shanghai
tzcode source: internal

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

other attached packages:
[1] maftools_2.18.1

loaded via a namespace (and not attached):
 [1] compiler_4.3.1     Matrix_1.6-5       DNAcopy_1.76.0     tools_4.3.1        RColorBrewer_1.1-3 survival_3.6-4     rstudioapi_0.16.0 
 [8] R.methodsS3_1.8.2  splines_4.3.1      grid_4.3.1         data.table_1.15.4  R.utils_2.12.3     R.oo_1.26.0        lattice_0.22-6    

CentOS 7

R version 4.2.2 (2022-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS:   /opt/software/R-4.2.2/lib64/R/lib/libRblas.so
LAPACK: /opt/software/R-4.2.2/lib64/R/lib/libRlapack.so

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

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

other attached packages:
[1] maftools_2.18.1

loaded via a namespace (and not attached):
 [1] compiler_4.2.2     Matrix_1.6-5       DNAcopy_1.72.3     RColorBrewer_1.1-3
 [5] survival_3.4-0     R.methodsS3_1.8.2  splines_4.2.2      grid_4.2.2
 [9] data.table_1.15.4  R.utils_2.12.3     R.oo_1.26.0        lattice_0.20-45
PoisonAlien commented 4 months ago

Hi, Sorry for the late reply. Thank you for the issue. I added 3 amino acid lengths to make the axis a bit cleaner in lollipopPlot2 It does not affect results in any sort - just the label at the end was offset by 3. I have corrected it and it should now be similar to that of lollipopPlot

YarsnC commented 4 months ago

Yes, the aa length in lollipopPlot2() is correct now. Thank you so much!