invalid genotypes in cross

34 views
Skip to first unread message

Madi Shoken

unread,
May 15, 2024, 9:00:44 AM5/15/24
to R/qtl2 discussion
Hi, 

I get this error,
In check_cross2(output) : 443597 invalid genotypes in crossIn
How can i solve this error?
thanks, 
Madi

Karl Broman

unread,
May 15, 2024, 9:40:12 AM5/15/24
to R/qtl2 discussion
In your control file you should have lines like the following, which define the genotype codes:

genotypes: 
   AA: 1 
   AB: 2 
   BB: 3

The genotype data need to be all using these three codes (in this case, AA, AB, BB).

karl

Karl Broman

unread,
May 15, 2024, 11:07:49 AM5/15/24
to R/qtl2 discussion
The error means that there are 443,597 genotypes in your genotype data files that are not one of those genotype codes, and not one of the missing value codes (defined by na.strings).

karl

Madi Shoken

unread,
May 15, 2024, 11:13:58 AM5/15/24
to R/qtl2 discussion
Yes i know that, all my genotype data using these three codes (such as AA, AB, BB).
I even wrote down the genotype codes in my write_control_file.
ma_control_file_madi <- file.path("C:/Users/shoke/OneDrive/Документы", "madi.yaml")
write_control_file(ma_control_file_madi,
                   crosstype = "riself",
                   geno_file = "madi_geno.csv",
                   gmap_file = "madi_gmap.csv",
                   pheno_file = "madi_pheno.csv",
                   alleles = c("AA", "BB"),
                   geno_codes = c("AA" = 1, "AB" = 2, "BB" = 3),
                   na.strings = "NN",
                   sep = ",",
                   geno_transposed = T,
                   overwrite = TRUE)
but I still have this error.


среда, 15 мая 2024 г. в 18:40:12 UTC+5, Karl Broman:

Karl Broman

unread,
May 15, 2024, 11:25:58 AM5/15/24
to R/qtl2 discussion
Sorry; I was wrong. It doesn't have to do with the genotypes not matching the genotype codes, but rather that you have something like heterozygotes in recombinant inbred lines.

Could you say more about the nature of your data? What is the cross type?

karl

Madi Shoken

unread,
May 15, 2024, 11:41:32 AM5/15/24
to rqtl2...@googlegroups.com
The data comes from wheat F8 RILs obtained from cross of two parents and genotyped with 43K SNP markers.

We have four such mapping populations. Initially I did all QC (omitting clones, homozygous and distorted markers etc) for the four populations simultaneously (merged maps). Once high quality map obtained, now I want to conduct QTL analysis for each population separately. So I devided my QC-ed map to four. When read that map again faced this issue. What to understand how warning this warning message is.

ср, 15 мая 2024 г., 20:26 Karl Broman <kbr...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "R/qtl2 discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rqtl2-disc+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rqtl2-disc/cbd1890e-affd-42e6-8ed0-291bc045e2a9n%40googlegroups.com.

Madi Shoken

unread,
May 15, 2024, 11:47:34 AM5/15/24
to rqtl2...@googlegroups.com
Sorry there was a mistake, I excluded monomorphic markers and not homozygous.

Thanks,
Madi

ср, 15 мая 2024 г., 20:41 Madi Shoken <shoke7...@gmail.com>:

Madi Shoken

unread,
May 17, 2024, 2:37:45 AM5/17/24
to R/qtl2 discussion
Hi Karl,
Снимок экрана 2024-05-17 112349.png
ma_control_file_madi <- file.path("C:/Users/shoke/OneDrive/Документы", "madi.yaml")
write_control_file(ma_control_file_madi,
                   crosstype = "riself",
                   geno_file = "madi_geno.csv",
                   gmap_file = "madi_gmap.csv",
                   pheno_file = "madi_pheno.csv",
                   geno_codes = list(AA = 1, AB = 2, BB = 3),

                   alleles = c("AA","BB"),
                   na.strings= c("-", "NN"),
                   sep = ";",

                   geno_transposed = T,
                   overwrite = TRUE)
Tsel_map <- read_cross2("Tsel.yaml")
In check_cross2(output) : 443597 invalid genotypes in crossIn

Check my data and code, otherwise we still connot solve this warning.
Or can we ignore this warning? because my genotypes consist of AA, AB, BB.

Thanks,
Madi
среда, 15 мая 2024 г. в 20:25:58 UTC+5, Karl Broman:

Karl Broman

unread,
May 17, 2024, 6:48:50 AM5/17/24
to R/qtl2 discussion
You can ignore the warning. The heterozygote genotypes will be treated as missing.

To avoid the warning, you could change the geno_codes and na.strings in the control file:

    geno_codes=list(AA=1, BB=3),
    na.strings=c("-", "NN", "AB"),

karl
Reply all
Reply to author
Forward
0 new messages