plot_PxG number of genotype groups

12 views
Skip to first unread message

Jonathan Berlingeri

unread,
Jul 8, 2025, 7:05:22 PMJul 8
to R/qtl2 discussion

Hi,

I’m trying to understand how the genotype groups are defined in the plot_PxG() (phenotype-by-genotype) plot function.

  • Background: I’m analyzing an eight-parent MAGIC population. When I plot PxG, only five genotype groups appear.

  • Questions:

    1. How are these groups formed?

    2. Are they simply clusters of founders with identical allele combinations in the peak region, with the numeric labels assigned arbitrarily?

    3. Is there any advantage to using these groups instead of examining the individual founder-allele probabilities or the allele states at the peak marker?

I didn’t find a clear explanation in the package help pages. If there’s relevant documentation or literature you could point me to, I’d greatly appreciate it. I’ve attached the PxG plot for context; please let me know if any additional information would help.

Best regards,
Jonny

PxG.exe.PNG

Karl Broman

unread,
Jul 9, 2025, 9:38:01 AMJul 9
to R/qtl2 discussion
It uses whatever categories are in the input 'geno' argument. I count six in your figure. So likely there were no individuals with genotype '6' or '7'.
You could use table() with your genotypes to get the counts of the categories.

The input genotypes to plot_pxg()  are assumed to be a vector of categories. I typically use maxmarg() to get these inferred genotypes from the genotype probabilities.
And I'd typically use return_char=TRUE to get genotype labels as character strings rather than integers.

plot_pxg() doesn't do any kind of clustering or re-labeling.

karl

Jonathan Marc Berlingeri

unread,
Jul 9, 2025, 7:15:58 PMJul 9
to rqtl2...@googlegroups.com

Hi Karl,

Thank you for the quick reply. Apologies, I miscounted. You are correct about the six categories. I also now realize this question is more related to maxmarg(). I suspected that these categories (AA-HH) are representing the inferred founder genotypes so turned down the minprob setting in maxmarg() and was able to recover eight categories which is equal to the number of founders. I believe I understand now but just for total clarity I have two further questions:

 

Question 1: Am I correct in my suspicion that AA-HH represent the inferred genotypes of each founder at the peak region?

 

Question 2: Is the ordering AA-HH referencing the row order of the founders in the founder_geno file?

 

 

I only have three allele states at each marker which is likely the source of my confusion. Here is my updated PxG plot (with lower minprob), YAML, and snapshot of founder_geno for reference:

 

Update PxG with lower minprob:

YAML:

crosstype: riself8

geno: CP_MAGIC_progeny_SNP.csv

founder_geno: CP_MAGIC_founder_SNP.csv

pheno: day8_FT_DAP.csv

gmap: CP_MAGIC_geneticMap.csv

pmap: CP_MAGIC_physicalMap.csv

cross_info: CP_MAGIC_ped_info.csv

genotypes:

  AA: 1

  AB: 2

  BB: 3

na.strings:

- --

- NA

Snapshot of founder_geno:



Best,
Jonny

--
You received this message because you are subscribed to a topic in the Google Groups "R/qtl2 discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rqtl2-disc/7YFVqi_Nd6k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rqtl2-disc+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/rqtl2-disc/208de930-44e1-4ad5-a7cf-7cccaafa84fdn%40googlegroups.com.

Karl Broman

unread,
Jul 9, 2025, 10:33:00 PMJul 9
to R/qtl2 discussion
Yes, the AA-HH represent the inferred founder genotypes. calc_genoprob() uses the marker data to calculate probabilities for each possible founder genotype at each position in each MAGIC line. maxmarg() picks out the genotype with maximum probability.

The default in plot_pxg() is to sort the genotypes to have decreasing mean. Use sort=FALSE to have them in the order AA,BB,...,HH.

karl
Reply all
Reply to author
Forward
0 new messages