kaustubhad / fastman

An R package for fast and efficient visualizing of GWAS results using Q-Q and Manhattan plots directly from PLINK output files.
GNU General Public License v3.0
36 stars 8 forks source link

Is it possible to annotate picks with gene names? #3

Open skanoni opened 2 years ago

skanoni commented 2 years ago

Hi, I would like to annotate my top hits with gene names rather than SNP IDs. Is it possible within the fastman package if I already have the gene name column in my results?

kaustubhad commented 2 years ago

Hi, yes, you can certainly do that. If you have gene names in a column called genename, please pass this in the function as an additional option, snp = "genename".

The package also contains a function called gene_annotate which is not documented yet, but it can work with Plink-style gene lists to annotate gene names, in case you don't have gene names already. It uses the SNP locations (CHR and BP) to annotate gene names, and allows for a buffer on either side. The Plink gene lists (4 columns) are available here: https://www.cog-genomics.org/plink/1.9/resources#genelist