CC F1 CROSS - Founder effect plots look different

14 views
Skip to first unread message

Kareem Midlej

unread,
Aug 4, 2025, 5:23:52 AMAug 4
to R/qtl2 discussion
Dear Prof Broman,
Thank you for your support and efforts to help R/QTL2 users.
I would like to share my code and the founder effect plot with you. Unfortunately, I am not getting a plot similar to the one in the user guide or to what we obtained in our previous project.

pr <- calc_genoprob(OZ, error_prob=0.002)
apr <- genoprob_to_alleleprob(pr)
k <- calc_kinship(apr, "loco")
out <- scan1(apr, OZ$pheno[,"Mean_Colon_B_KO"], k)

coef_c2 <- scan1coef(apr[,"14"], OZ$pheno[,"Mean_Colon_B_KO"], k[["14"]])
pdf("Founder_Effect_Chr14_Mean_Colon_B_KO.pdf", width = 10, height = 10) # adjust size as needed
par(mar=c(4.1, 4.1, 0.6, 0.6))
plot_coefCC(coef_c2, OZ$gmap["14"], scan1_output=out, bgcolor="gray95", legend="bottomleft", cex.lab=1.5, cex.axis=1.5)
title("Founder Allele Effects and LOD Scores on Chromosome 14 (Mean_Colon_B_KO)", line = -1)
dev.off() 


Thank you in advance!

Best Regards,
Kareem
Founder_Effect_Chr14_Mean_Colon_B_KO.pdf

Karl Broman

unread,
Aug 4, 2025, 7:16:19 AMAug 4
to R/qtl2 discussion
The figure is dominated by extremely large values that are occurring in places where there is a problem with model fit.
It may be one or more of the genotype classes is missing in those positions.

Personally, I prefer to skip scan1coef(); I don't find it particularly informative, and it often suffers from these sorts of artifacts.
Instead, I would just focus on the estimated effects at the inferred QTL location.

But if you want to try to get a meaningful scan1coef figure, you can try using clean_genoprob().
By setting small genoprob values to be strictly 0, you may be able to avoid some of the wildly incorrect coefficient estimates.

karl
Reply all
Reply to author
Forward
0 new messages