Question: about MAFTOOLS and MAF files
0
gravatar for Bogdan
2.5 years ago by
Bogdan570
Palo Alto, CA, USA
Bogdan570 wrote:

Dear all,

please could you advise on the following: I am using MAFTOOLS in order to convert an ANNOVAR file into a MAF file, for downstream analyses; however, I am getting the error message below --- any insights please about how to fix it ? thank you very much ;) !

ann.file<-read.delim("vcf.test.annovar",header=T)

ann.file$Tumor_Sample_Barcode <- "Sample_Test"
write.table(ann.file, file="ann_test.txt", row.names = FALSE, sep = "\t", quote = FALSE)

var.annovar.maf = annovarToMaf(annovar = "ann_test.txt",
                               Center = 'STANFORD', refBuild = 'hg38',
                               tsbCol = "Tumor_Sample_Barcode",table = 'refGene')

the code above works. However, when doing "getSampleSummary(var.annovar.maf)" it says :

Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘getSampleSummary’ for signature ‘"data.table"’
maftools genevisr • 1.3k views
ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by Bogdan570
Answer: about MAFTOOLS and MAF files
3
gravatar for anand_mt
2.5 years ago by
anand_mt80
anand_mt80 wrote:

Hi,

You need to return it as an MAF object. 

var.annovar.maf = annovarToMaf(annovar = "ann_test.txt",
                               Center = 'STANFORD', refBuild = 'hg38',
                               tsbCol = "Tumor_Sample_Barcode",table = 'refGene', MAFobj = TRUE)
ADD COMMENTlink written 2.5 years ago by anand_mt80
1

Thank you very much, Anand !

ADD REPLYlink written 2.5 years ago by Bogdan570
Answer: about MAFTOOLS and MAF files
0
gravatar for Bogdan
2.5 years ago by
Bogdan570
Palo Alto, CA, USA
Bogdan570 wrote:

Hi Anand, please may I ask you, why do the following 2 pieces of R code give different results :

-- piece 1 :

var.annovar.maf = annovarToMaf(annovar = "vcf.test.annovar_MANY.txt",
                               Center = 'STANFORD', refBuild = 'hg38',
                               tsbCol = "Tumor_Sample_Barcode",table = 'refGene', MAFobj = TRUE)

MAF <- var.annovar.maf

getSampleSummary(MAF)
getGeneSummary(MAF)
getFields(MAF)

plotmafSummary(maf = MAF, rmOutlier = TRUE, addStat = 'median', dashboard = TRUE)

-- piece 2 :

var.annovar.maf = annovarToMaf(annovar = "vcf.test.annovar_MANY.txt",
                               Center = 'STANFORD', refBuild = 'hg38',
                               tsbCol = "Tumor_Sample_Barcode",table = 'refGene')

MAF = read.maf(maf = var.annovar.maf, removeSilent = TRUE, useAll = FALSE)

getSampleSummary(MAF)
getGeneSummary(MAF)
getFields(MAF)

plotmafSummary(maf = MAF, rmOutlier = TRUE, addStat = 'median', dashboard = TRUE)

ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by Bogdan570

i have another question, and will open a new track ;)

ADD REPLYlink written 2.5 years ago by Bogdan570

I think I found the answer in the setting up the options : removeSilent = TRUE, useAll = FALSE

ADD REPLYlink written 2.5 years ago by Bogdan570

yes that is correct. Silent variants will be kept separately from main maf file unless you specify to use them. You can access them any time at `MAF@silent`

ADD REPLYlink written 2.5 years ago by anand_mt80
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 337 users visited in the last hour