View source: R/make_plot_maf.R
make_plot_maf | R Documentation |
Make a plot comparing minor allele frequency between test dataset and reference studies.
make_plot_maf(
ref_dat = NULL,
ref_1000G = c("AFR", "AMR", "EAS", "EUR", "SAS", "ALL"),
target_dat = NULL,
eaf = "eaf",
snp_target = "rsid",
snp_reference = "SNP",
ref_dat_maf = "MAF",
target_dat_effect_allele = "effect_allele",
target_dat_other_allele = "other_allele",
ref_dat_minor_allele = "minor_allele",
ref_dat_major_allele = "major_allele",
trait = "trait",
target_dat_population = "population",
ref_dat_population = "population",
target_study = "study",
ref_study = "study",
Title = "Comparison of allele frequency between test dataset & reference study",
Ylab = "Allele frequency in test dataset",
Xlab = "MAF in reference study",
cowplot_title = "Allele frequency in test dataset vs 1000 genomes super populations",
return_dat = FALSE,
nocolour = FALSE,
legend = TRUE,
allele_frequency_conflict = 1,
publication_quality = FALSE
)
ref_dat |
user supplied reference dataset. data frame. optional |
ref_1000G |
if ref_dat is NULL, the user should indicate the 1000 genomes reference study of interest. options are: AFR, AMR, EAS, EUR, SAS or ALL. Default is to make plots for all super populations |
target_dat |
the test dataset of interest. Data frame. |
eaf |
name of the effect allele frequency column in target_dat |
snp_target |
rsid column in target_dat |
snp_reference |
rsid column in ref_dat |
ref_dat_maf |
name of the minor allele frequency column in the reference dataset. Only necessary if ref_dat is specified |
target_dat_effect_allele |
name of the effect allele column in target_dat |
target_dat_other_allele |
name of the non-effect allele column in target_dat |
ref_dat_minor_allele |
name of the minor allele column in the reference dataset. Only necessary if ref_dat is specified |
ref_dat_major_allele |
name of the major allele column in the reference dataset. Only necessary if ref_dat is specified |
trait |
name of the trait corresponding to target_dat |
target_dat_population |
population ancestry of target_dat |
ref_dat_population |
name of column describing population ancestry of reference dataset. Only necessary if ref_dat is specified |
target_study |
column in target_dat indicating name of target study |
ref_study |
column in reference study indicating name of reference study. Only necessary if ref_dat is specified |
Title |
plot title |
Ylab |
Y label |
Xlab |
X label |
cowplot_title |
title of overall plot |
return_dat |
if TRUE, the dataset used to generate the plot is returned to the user and no plot is made. |
nocolour |
if TRUE, allele frequency conflicts are illustrated using shapes rather than colours. |
legend |
include legend in plot. Default TRUE |
allele_frequency_conflict |
how to define allele frequency conflicts. 1= flag SNPs in the test dataset whose reported minor allele has frequency >0.5. 2= additionally flag SNPs with allele frequency differening by more than 10 points from allele frequency in the reference dataset. Default = 1 |
publication_quality |
produce a very high resolution image e.g. for publication purposes. Default FALSE |
plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.