maftools icon indicating copy to clipboard operation
maftools copied to clipboard

maftool package: No non-synonymous mutations found Check `vc_nonSyn`` argumet in `read.maf` for details

Open celluq opened this issue 2 years ago • 8 comments

I have download the SNV data from TCGA database. But this error was reported when a maf file was read by read.maf command. So what's the meaning of that? How to fix it? Thank you so much for your help.

捕获

celluq avatar Aug 01 '22 01:08 celluq

This typically means the input MAF data does not contain mutations that may have effects (on gene function). If you want to include all mutations, you should reset the vc_nonSyn option.

ShixiangWang avatar Aug 01 '22 01:08 ShixiangWang

Thank you so much for your help!

celluq avatar Aug 01 '22 02:08 celluq

Could I know how to reset the vc_nonSyn option? Thanks a lot.

zyffzi avatar Aug 01 '22 06:08 zyffzi

@zyffzi Run ?read.maf in R console. Change the option to what you want to analyze.

image

ShixiangWang avatar Aug 01 '22 06:08 ShixiangWang

Thank you very much! I find that I can often successfully read individual MAT files. 1 2

However, when I use the Apply function to read all the MAT files in the folder: 3 It displayed the same warning in the end:

4 Have you ever encountered such a situation before? How can I solve it? Thank you so much for your help.

zyffzi avatar Aug 01 '22 07:08 zyffzi

For tcga data, you can use TCGAbiolinks. A solution for your error is manually set the vc_nonSyn to all mutation types in the read.maf.

ShixiangWang avatar Aug 02 '22 02:08 ShixiangWang

Could you tell me how to set the vc_nonSyn to all mutation types?By vc_nonSyn = all/ture?

Yizhou-Y avatar Sep 22 '22 07:09 Yizhou-Y

library(maftools)

laml.maf = system.file("extdata", "tcga_laml.maf.gz", package = "maftools") #MAF file
laml.clin = system.file('extdata', 'tcga_laml_annot.tsv', package = 'maftools') #clinical data
laml = read.maf(maf = laml.maf, clinicalData = laml.clin, vc_nonSyn = c("Frame_Shift_Del", "Frame_Shift_Ins" ))

ShixiangWang avatar Sep 22 '22 07:09 ShixiangWang

Hi, I am encountering exactly the same problem (described at the top).

I am testing maftools for use with 1000+ samples downloaded from TCGA. I am importing them manually and treating them as they were non-TCGA files as I will be obtaining mafs from whole exome sequencing of a bunch of clinical samples.

This is my code:

library(maftools)

setwd("/my/directory/path/with/maf/files")

file_list <- as.list(list.files(pattern="*.maf"))
maf_list <- list()

for (i in file_list) {
  print(i)
  maf_list[[i]] <- read.maf(maf=`i`, vc_nonSyn = NULL)
}

The for loop for read.maf stops at sample number 114 of 1091 with the aforementioned error.

I have tried to replace vs_nonSyn = NULL with any and all of the options in the description of the parameter vs_nonSyn in ?read.maf. When I do that, it stops at either sample number 1, or at sample 114 again.

Could you please advice how to solve the issue?

Thank you so much!

matteocostacurta avatar Feb 07 '23 22:02 matteocostacurta

Why not bind all maf files first and then import it with maftools?

library(data.table)
library(maftools)

file_list <- list.files(pattern="*.maf")
maf_list = lapply(file_list, function(x) data.table::fread(x))
maf = rbindlist(maf_list)
mafObj = read.maf(maf)

ShixiangWang avatar Feb 08 '23 01:02 ShixiangWang

It works a treat, thank you!

Why not bind all maf files first and then import it with maftools?

library(data.table)
library(maftools)

file_list <- list.files(pattern="*.maf")
maf_list = lapply(file_list, function(x) data.table::fread(x))
maf = rbindlist(maf_list)
mafObj = read.maf(maf)

matteocostacurta avatar Feb 14 '23 21:02 matteocostacurta

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Aug 06 '23 02:08 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Aug 21 '23 01:08 github-actions[bot]