Question: Package SomaticCancerAlterations, import own .maf file?
0
5.9 years ago by
Guest User12k
Guest User12k wrote:
Hi, My name is Shila Ghazanfar and I am a PhD candidate at the University of Sydney. I came across the BioC package SomaticCancerAlterations and have found it a quite useful and elegant way of handling the TCGA somatic mutation data available within the R environment. I would like to ask if there is a capability within the package to import your own downloaded .maf file and subsequently use all the functions within the package? Reading through the package vignette as well as the User manual, this doesn't seem to be available, but I would like to know if indeed there is a way to do this? Kind regards, Shila -- output of sessionInfo(): > sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-w64-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252 [3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C [5] LC_TIME=English_Australia.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] SomaticCancerAlterations_0.99.20 loaded via a namespace (and not attached): [1] BiocGenerics_0.8.0 Biostrings_2.30.1 bitops_1.0-6 exomeCopy_1.8.0 [5] GenomicRanges_1.14.4 IRanges_1.20.6 parallel_3.0.2 Rsamtools_1.14.2 [9] stats4_3.0.2 stringr_0.6.2 tools_3.0.2 XVector_0.2.0 [13] zlibbioc_1.8.0 -- Sent via the guest posting facility at bioconductor.org.
• 1.8k views
modified 5.9 years ago by Julian Gehring1.3k • written 5.9 years ago by Guest User12k
Answer: Package SomaticCancerAlterations, import own .maf file?
2
5.9 years ago by
Julian Gehring1.3k
Julian Gehring1.3k wrote:
Hi Shila, The 'SomaticCancerAlterations' package has the functions for importing from a MAF file and converting to a 'GRanges' object. Since they are only used internally, they are not exported and thus not visible in the man pages. You can find them in 'R/import-functions.R', the most relevant functions are '.read_maf' and '.maf2gr'. Further, '.validate_maf' implements some basic checks for the consistency of the MAF file. You can call these functions with e.g. 'SomaticCancerAlterations:::.read_maf'. At the moment, they are only used internally for importing the TCGA data. If you (and also others) are interested, I can think about documenting and exporting them. The main reason why I did not do this so far is mainly that there is no strict specification of MAF files. The TCGA provides some, but even most MAF files from the TCGA project itself fail their own validation scheme. Writing a parser that can handle them all would take some more time. Best wishes Julian On 12/13/2013 09:37 AM, Shila Ghazanfar [guest] wrote: > > Hi, > > My name is Shila Ghazanfar and I am a PhD candidate at the University of Sydney. I came across the BioC package SomaticCancerAlterations and have found it a quite useful and elegant way of handling the TCGA somatic mutation data available within the R environment. > > I would like to ask if there is a capability within the package to import your own downloaded .maf file and subsequently use all the functions within the package? Reading through the package vignette as well as the User manual, this doesn't seem to be available, but I would like to know if indeed there is a way to do this? > > Kind regards, > Shila > > -- output of sessionInfo(): > >> sessionInfo() > R version 3.0.2 (2013-09-25) > Platform: x86_64-w64-mingw32/x64 (64-bit) > > locale: > [1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252 > [3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C > [5] LC_TIME=English_Australia.1252 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] SomaticCancerAlterations_0.99.20 > > loaded via a namespace (and not attached): > [1] BiocGenerics_0.8.0 Biostrings_2.30.1 bitops_1.0-6 exomeCopy_1.8.0 > [5] GenomicRanges_1.14.4 IRanges_1.20.6 parallel_3.0.2 Rsamtools_1.14.2 > [9] stats4_3.0.2 stringr_0.6.2 tools_3.0.2 XVector_0.2.0 > [13] zlibbioc_1.8.0 > > -- > Sent via the guest posting facility at bioconductor.org. > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >

Hi Julian,

I want to use SomaticSignatures on a maf file and I am dealing with the same issue. I loaded SomaticCancerAlterations and tried converting to a GRanges object, however I bumped into this error message:

all.gr <- SomaticCancerAlterations:::.maf2gr("all.maf")
Error in maf$Chromosome :$ operator is invalid for atomic vectors

> sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] BiocInstaller_1.26.1 dplyr_0.7.4          tidyr_0.7.1

loaded via a namespace (and not attached):
[1] Rcpp_0.12.13                    exomeCopy_1.22.0
[3] XVector_0.16.0                  bindr_0.1
[5] magrittr_1.5                    zlibbioc_1.22.0
[7] GenomicRanges_1.28.6            BiocGenerics_0.22.0
[9] IRanges_2.10.3                  BiocParallel_1.10.1
[11] tidyselect_0.2.0                R6_2.2.2
[13] rlang_0.1.2                     stringr_1.2.0
[15] GenomeInfoDb_1.12.2             tools_3.4.2
[17] parallel_3.4.2                  assertthat_0.2.0
[19] tibble_1.3.4                    bindrcpp_0.2
[21] GenomeInfoDbData_0.99.0         purrr_0.2.3
[23] RColorBrewer_1.1-2              bitops_1.0-6
[25] S4Vectors_0.14.4                SomaticCancerAlterations_1.12.0
[27] RCurl_1.95-4.8                  glue_1.1.1
[29] stringi_1.1.5                   compiler_3.4.2
[31] Biostrings_2.44.2               Rsamtools_1.28.0
[33] stats4_3.4.2                    pkgconfig_2.0.1                

Thanks,

Romanos

Answer: Package SomaticCancerAlterations, import own .maf file?
0
5.9 years ago by
Julian Gehring1.3k
Julian Gehring1.3k wrote:
Hi Shila, The 'SomaticCancerAlterations' package has the functions for importing from a MAF file and converting to a 'GRanges' object. Since they are only used internally, they are not exported and thus not visible in the man pages. You can find them in 'R/import-functions.R', the most relevant functions are '.read_maf' and '.maf2gr'. Further, '.validate_maf' implements some basic checks for the consistency of the MAF file. You can call these functions with e.g. 'SomaticCancerAlterations:::.read_maf'. At the moment, they are only used internally for importing the TCGA data. If you (and also others) are interested, I can think about documenting and exporting them. The main reason why I did not do this so far is mainly that there is no strict specification of MAF files. The TCGA provides some, but even most MAF files from the TCGA project itself fail their own validation scheme. Writing a parser that can handle them all would take some more time. Best wishes Julian On 12/13/2013 09:37 AM, Shila Ghazanfar [guest] wrote: > > Hi, > > My name is Shila Ghazanfar and I am a PhD candidate at the University of Sydney. I came across the BioC package SomaticCancerAlterations and have found it a quite useful and elegant way of handling the TCGA somatic mutation data available within the R environment. > > I would like to ask if there is a capability within the package to import your own downloaded .maf file and subsequently use all the functions within the package? Reading through the package vignette as well as the User manual, this doesn't seem to be available, but I would like to know if indeed there is a way to do this? > > Kind regards, > Shila > > -- output of sessionInfo(): > >> sessionInfo() > R version 3.0.2 (2013-09-25) > Platform: x86_64-w64-mingw32/x64 (64-bit) > > locale: > [1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252 > [3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C > [5] LC_TIME=English_Australia.1252 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] SomaticCancerAlterations_0.99.20 > > loaded via a namespace (and not attached): > [1] BiocGenerics_0.8.0 Biostrings_2.30.1 bitops_1.0-6 exomeCopy_1.8.0 > [5] GenomicRanges_1.14.4 IRanges_1.20.6 parallel_3.0.2 Rsamtools_1.14.2 > [9] stats4_3.0.2 stringr_0.6.2 tools_3.0.2 XVector_0.2.0 > [13] zlibbioc_1.8.0 > > -- > Sent via the guest posting facility at bioconductor.org. > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >