Plot Gallery¶
Use plots after QC or fine-mapping, not as a replacement for checking the run summary. The fastest habit is: read the table, plot the suspicious locus, then decide whether to rerun.
Quick Commands¶
Auto-Detection¶
If you omit --type, CREDTOOLS tries to infer the plot:
| Input | Auto type |
|---|---|
directory with pips.txt.gz |
locusplot |
directory without pips.txt.gz |
locus_qc |
file ending in qc.txt.gz or qc.txt |
summary |
file ending in compare_maf.txt.gz |
maf_corr |
When auto-detection fails, pass --type explicitly.
Available Plot Types¶
-
summaryInput:
qc.txt.gzShows lambda-s, MAF correlation, lambda-s outlier counts, and Dentist-S outlier counts in one figure.
-
locus_qcInput: a per-locus QC directory
Combines locus-level QC panels. Use this for the worst loci from the summary table.
-
locusplotInput: a fine-mapping locus directory with
pips.txt.gzShows p-values, LD-to-lead coloring, PIP-scaled points, and credible-set membership.
-
lambda_sInput:
qc.txt.gzBoxplot of
lambda_sby cohort. -
maf_corrInput:
qc.txt.gzorcompare_maf.txt.gzBarplot of MAF correlation by cohort.
-
lambda_s_outliersInput:
qc.txt.gzCount of kriging RSS outliers by cohort.
-
dentist_s_outliersInput:
qc.txt.gzCount of Dentist-S outliers by cohort.
-
locus_pvaluesInput:
expected_z.txt.gzP-value style view from z-scores, optionally with credible-set annotations when called through Python.
-
zscore_qqInput:
expected_z.txt.gzQQ plot for observed z-score behavior.
-
ld_decayInput:
ld_decay.txt.gzLD decay by distance.
-
ld_4th_momentInput:
ld_4th_moment.txt.gzPer-variant LD fourth-moment comparison.
-
snp_missingnessInput:
snp_missingness.txt.gzUpSet-style view of variant presence across cohorts.
Size and Format¶
Use --width, --height, and --dpi for reports:
credtools plot work/qc/qc.txt.gz \
--type summary \
--width 14 \
--height 10 \
--dpi 300 \
--output plots/qc_summary.pdf
The output extension controls the format. Common choices are .png, .pdf,
and .svg.
Locus Plot Requirements¶
locusplot reads pips.txt.gz and expects:
| Column pattern | Why it matters |
|---|---|
BP |
x-axis position |
PIP |
point size |
CRED |
credible-set outline |
columns ending with _P |
cohort-specific p-values |
matching columns ending with _R2 |
LD color scale |
If a locus plot fails with a missing _R2 column, the PIP table was not created
from a fully matched summary-statistics and LD input.
Suggested Review Set¶
For a large run, do not plot every locus at first. Plot:
- the locus with the highest
lambda_s, - the locus with the lowest
maf_corr, - the locus with the most Dentist-S outliers,
- two or three high-priority biological loci,
- one clean-looking locus as a baseline.