Showing posts with label Visualization. Show all posts
Showing posts with label Visualization. Show all posts

May 11, 2024

R code to identify the FDR=0.05 equivalent P-value (for plotting purposes)

For Manhattan plots and other plots where you're plotting -log10(P-values) or untransformed P-values, you sometimes want to draw line to identify when FDR=0.05 is reached. But where do you draw the line? Below is R code that identifies the nearest P-value to FDR=0.05. You can then use variable FDR5.equiv.P to create a line on your Manhattan plot.

Code assumes you have a data frame with two columns, "Pval" and "FDR".

July 11, 2020

How to create publication quality images (high resolution images)

Journals typically request that images for publication be at 300 dpi resolution for photos (e.g. microscope images), 600 dpi for images, and 1200 dpi for line art. PowerPoint and Excel default settings don't meet these requirements. 

Use these tips to get high resolution images:

R programming lesson #2: merging pdf files

Use R package "pdftools" to merge separate pdf into one pdf file. You will never need to use sketchy websites or pay for software ...