FilterMaf by ranges
0
0
Entering edit mode
Jeni • 0
@jeni-23673
Last seen 2 days ago
Spain

Hi!

I am trying to filter a MAF by removing its variants by coordinates. To do that, I have a dataframe with 3 columns (chr, start, end). My problem is that I can only use subsetMaf to do that, as filterMaf has no "ranges" option. By subsetting, I can only get those variants occuring in the regions of the data frame, while I am looking for the variants NOT occuring there.

I have tryed to subset the MAF in order to get those variants that I want to remove, and then I have used setdiffMaf to get those variants which are different between this set and the original one, but I am getting the following error.

maf2 <- subsetMaf(maf, ranges = mydf)
expectedmaf <- setdiffMAF(maf1, maf2, refAltMatch = F)

Error in :=(maf_slot, NULL) : Check that is.data.table(DT) == TRUE. Otherwise, := and :=(...) are defined for use in j, once only and in particular ways. See help(":=").

sessionInfo( )

R version 4.0.4 (2021-02-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=Spanish_Spain.1252  LC_CTYPE=Spanish_Spain.1252    LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C                  
[5] LC_TIME=Spanish_Spain.1252    

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

other attached packages:
[1] data.table_1.14.0 bedr_1.0.7        dplyr_1.0.4       ggplot2_3.3.5     maftools_2.6.05   xlsx_0.6.5       

loaded via a namespace (and not attached):
 [1] formatR_1.11         pillar_1.6.4         compiler_4.0.4       RColorBrewer_1.1-2   BiocManager_1.30.16  futile.logger_1.4.3  R.methodsS3_1.8.1   
 [8] R.utils_2.11.0       futile.options_1.0.1 tools_4.0.4          pkgload_1.2.3        testthat_3.0.2       lifecycle_1.0.1      tibble_3.0.6        
[15] gtable_0.3.0         lattice_0.20-41      pkgconfig_2.0.3      rlang_0.4.10         Matrix_1.3-2         DBI_1.1.1            parallel_4.0.4      
[22] yaml_2.2.1           VennDiagram_1.6.20   rJava_0.9-13         withr_2.4.2          desc_1.4.0           generics_0.1.1       xlsxjars_0.6.1      
[29] vctrs_0.3.8          rprojroot_2.0.2      grid_4.0.4           tidyselect_1.1.1     glue_1.4.2           R6_2.5.1             fansi_0.4.2         
[36] survival_3.2-7       lambda.r_1.2.4       purrr_0.3.4          magrittr_2.0.1       scales_1.1.1         ellipsis_0.3.2       splines_4.0.4       
[43] assertthat_0.2.1     colorspace_2.0-0     utf8_1.1.4           munsell_0.5.0        crayon_1.4.1         R.oo_1.24.0

Do you know how can I solve this? or if there is an easiest way to filter a maf by coordinates?

maftools • 47 views
ADD COMMENT

Login before adding your answer.

Traffic: 500 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