overviewPerIndividualQC
depicts results of
perIndividualQC
as intersection plots
(via upset
) and returns dataframes indicating
which QC checks individuals failed or passed.
overviewPerIndividualQC(results_perIndividualQC, interactive = FALSE)
results_perIndividualQC | [list] Output of |
---|---|
interactive | [logical] Should plots be shown interactively? When choosing this option, make sure you have X-forwarding/graphical interface available for interactive plotting. Alternatively, set interactive=FALSE and save the returned plot object (p_overview) via ggplot2::ggsave(p=p_overview, other_arguments) or pdf(outfile) print(p_overview) dev.off(). |
Named [list] with i) nr_fail_samples: total number of samples [integer] failing perIndividualQC, ii) fail_QC containing a [data.frame] with samples that failed QC steps (excluding ancestry) with IID, FID, all QC steps applied by perIndividualQC (max=4), with entries=0 if passing the QC and entries=1 if failing that particular QC and iii) fail_QC_and_ancestry containing a [data.frame] with samples that failed ancestry and QC checks with IID, FID, QC_fail and Ancestry_fail, with entries=0 if passing and entries=1 if failing that check, iii) p_overview, a ggplot2-object 'containing' a sub-paneled plot with the QC-plots.
indir <- system.file("extdata", package="plinkQC") qcdir <- tempdir() name <- "data" if (FALSE) { fail_individuals <- perIndividualQC(qcdir=qcdir, indir=indir, name=name, refSamplesFile=paste(qcdir, "/HapMap_ID2Pop.txt",sep=""), refColorsFile=paste(qcdir, "/HapMap_PopColors.txt", sep=""), prefixMergedDataset="data.HapMapIII", interactive=FALSE, verbose=FALSE, do.run_check_het_and_miss=FALSE, do.run_check_relatedness=FALSE, do.run_check_sex=FALSE, do.run_check_ancestry=FALSE) overview <- overviewPerIndividualQC(fail_individuals) }