Closed
Description
Describe the issue
If you add a cnTable
to a maftools object in the read.maf() function, the resulting object will contain NAs in Start_Position
and End_Position
columns for genes that do not have any mutations, they are simply annotated as AMP or DEL in the @DaTa part of the maf object. this means when trying to subset maf based on a range you get an error. Is there a solution to avoid this by adding in the start and end of the gene?
Command
Please post your commands and the output (errors or any unexpected output)
my_maf <- read_maf(
"path_to_maf",
clincalData = df,
cnTable = CNV_df
)
subsetMaf(maf = my_maf, ranges = my_bed)
! NA values in data.table 'x' start column: 'Start_Position'. All rows with NA values in the range columns must be removed for foverlaps() to work.
Last error traceback:
I think it would be good to add functionality to the cnTable argument so you can pass chromosome, Start_Postion and End_postion in the cnTable to avoid this error.
Session info
Run sessionInfo()
and post the output below
R version 4.3.0 (2023-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.3 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0
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
time zone: Etc/UTC
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] maftools_2.18.0
loaded via a namespace (and not attached):
[1] vctrs_0.6.2 cli_3.6.1 knitr_1.43 rlang_1.1.1
[5] xfun_0.39 processx_3.8.1 targets_1.4.0 data.table_1.14.8
[9] glue_1.6.2 backports_1.4.1 ps_1.7.5 fansi_1.0.4
[13] grid_4.3.0 tibble_3.2.1 base64url_1.4 yaml_2.3.7
[17] lifecycle_1.0.3 DNAcopy_1.76.0 compiler_4.3.0 codetools_0.2-19
[21] igraph_1.6.0 RColorBrewer_1.1-3 pkgconfig_2.0.3 lattice_0.21-8
[25] digest_0.6.31 R6_2.5.1 tidyselect_1.2.0 utf8_1.2.3
[29] splines_4.3.0 pillar_1.9.0 callr_3.7.3 magrittr_2.0.3
[33] Matrix_1.5-4 tools_4.3.0 survival_3.5-5
Activity