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

can not read maf file in maftools #50

Closed distar closed 7 years ago

distar commented 7 years ago

I've some problems to read Maf Files (Mutation Annotation Format) in R as follows:

tmp.maf=read.maf(maf = "tmp.maf", removeSilent = TRUE, useAll = FALSE) reading maf.. Mutation_Status not found. Assuming all variants are Somatic and validated. Excluding 0 silent variants.

Creating oncomatrix (this might take a while).. Sorting.. Error in oncomat.copy[, colnames(mdf)] and the tmp.maf is:

Hugo_Symbol Entrez_Gene_Id NCBI_Build Chromosome Start_Position End_Position Variant_Classification Variant_Type Reference_Allele Tumor_Seq_Allele2 Protein_Change Gene dbSNP_RS Tumor_Sample_Barcode SAMD11 148398 GRCh37 1 865545 865545 Missense_Mutation SNP G A p.R28Q ENSG00000187634 rs201186828 XH0152 SAMD11 148398 GRCh37 1 865545 865545 Missense_Mutation SNP G A p.R28Q ENSG00000187634 rs201186828 XY0039 SAMD11 148398 GRCh37 1 865545 865545 Missense_Mutation SNP G A p.R28Q ENSG00000187634 rs201186828 XY0056 SAMD11 148398 GRCh37 1 865545 865545 Missense_Mutation SNP G A p.R28Q ENSG00000187634 rs201186828 XJ0007 SAMD11 148398 GRCh37 1 865545 865545 Missense_Mutation SNP G A p.R28Q ENSG00000187634 rs201186828 SS0012 SAMD11 148398 GRCh37 1 865545 865545 Missense_Mutation SNP G A p.R28Q ENSG00000187634 rs201186828 SS0177 SAMD11 148398 GRCh37 1 874762 874762 Missense_Mutation SNP C T p.R210C ENSG00000187634 rs139437968 PRB0454 NOC2L 26155 GRCh37 1 880502 880502 Missense_Mutation SNP C T p.R693Q ENSG00000188976 rs74047418 XY0033 NOC2L 26155 GRCh37 1 880922 880922 Missense_Mutation SNP C T p.D677N ENSG00000188976 rs187444884 CC_HS0268 NOC2L 26155 GRCh37 1 881784 881784 Missense_Mutation SNP C T p.V601M ENSG00000188976 rs199697037 CH0128

However, when I delete the "NOC2L" line, it works, very confusing!

Would u help? thanks!

Best, John

PoisonAlien commented 7 years ago

Hi,

Did you install maftools from Bioconductor ? Could you try installing it from GitHub and see if it works. Because its working fine on my system. Bug seems to be related to #49 regarding barcode names which I have fixed recently.

devtools::install_github(repo = "PoisonAlien/maftools")
distar commented 7 years ago

Yes, it works. Thanks!

distar commented 7 years ago

read.maf and other module works, however, still have a small problem as belows:

plotmafSummary(maf = test.maf, rmOutlier = TRUE, addStat = 'median', dashboard = TRUE, titvRaw = FALSE) Error in [.data.table(titv.counts, , 2:7, with = FALSE) : Item 2 of j is 3 which is outside the column number range [1,ncol=2]

PoisonAlien commented 7 years ago

Okay, I think I know whats going on. Factors are being dropped while casting the table for Ti/Tv events. I will fix it. btw, is this your complete maf file ? It seems to contain only two genes ! Note that you can't do much analysis when your input is this small, prolly most of the function would cause an error as they weren't expected to run on such small sample size.

PoisonAlien commented 7 years ago

Hi,

I have fixed it. Please install it again and let me know. Thanks for reporting.

distar commented 7 years ago

Really great for your work. Actually, I am doing huge data, I just use the few example to check whether the problem comes from the software or my side! Thanks!