Question: Somatic mutations per gene
gravatar for zephyr_falcon
19 months ago by
New York, USA
zephyr_falcon80 wrote:


I have a vcf file (from Mutect2) - list of somatic mutations and their genomic locations & other info.

Does anyone know that there is a R package that can calculate the number of somatic mutations per gene?

For example, map the somatic mutations in the vcf file to any one gene based on their location and count how many mutations in each gene?

I can do it myself manually, but if there's a package that can do that, I can save time.


ADD COMMENTlink modified 12 months ago by ekwame60 • written 19 months ago by zephyr_falcon80

As far as counting, I don't know of any, but snpEff can annotate SNPs, mapping them to genes and qualifying them as "HIGH", "MEDIUM", or "LOW" severity. You can then filter for SNPs that are meaningful to your project.

From there you could load the data into R, convert the gene data into a factor, then run the summary command to count the instances of each gene.

ADD REPLYlink written 19 months ago by shawn.w.foley1.2k

Yes, I can annotate the mutations using VEP (, and then count them per gene on my own.

But I just wondered if there's a tool to do all of them automatically.

Thanks for your comment anyway.

ADD REPLYlink written 19 months ago by zephyr_falcon80
gravatar for ekwame
12 months ago by
ekwame60 wrote:

@zephyr_falcon maybe Maftools the R package could be useful (i could be wrong though);

Maftools accepts a standard .maf file as input but there is a way to convert vcf2maf;

ADD COMMENTlink written 12 months ago by ekwame60
Please log in to add an answer.


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