Karl: I am stumped as to why the below set of commands does not work (see below excerpted code. Your insights as to where I have a coding error precluding me from getting the expected result (conversion of two genotypes to missing) would be greatly appreciated.
> # LET'S FOLLOW-UP ON THE TWO F2 PLANTS THAT HAVE APPARENT DBL-XOs (Dt2 LOCUS)!
>
> print(toperr <- top.errorlod(iaxne17f2, cutoff=6))
chr id marker errorlod
1 18 330 Dt2 17.39794
2 18 507 Dt2 17.39794
>
> # Let's use Broman's R cmds to convert the Dt2 H calls in F2# 330 & 507 to NA.
> # But first, let's see how many F2 plants were genotyped for the Dt2 marker.
>
> ntyped(iaxne17f2, what="mar")
18_1791 18_1817 18_1821 18_1822 900-4 Dt2 920-2 920-3 940-1 950-2
674 680 54 47 4 680 3 4 4 4
960-2 970-1 18_1825 18_1831 18_1833 18_1838 18_1842
4 3 53 676 64 20 673
>
> # Broman's cmds will do the conversion, creating the object iaxne17f2.clean.
>
> iaxne17f2.clean <- iaxne17f2
> for(i in 1:nrow(toperr)) {
+ chr <- toperr$chr[i]
+ id <- toperr$id[i]
+ mar <- toperr$marker[i]
+ iaxne17f2.clean$geno[[chr]]$data[iaxne17f2$pheno$id==id, mar] <- NA
+ }
>
> # Let's check to see if the two Dt2 genotypes were un-genotyped!
>
> ntyped(iaxne17f2.clean, what="mar")
18_1791 18_1817 18_1821 18_1822 900-4 Dt2 920-2 920-3 940-1 950-2
674 680 54 47 4 680 3 4 4 4
960-2 970-1 18_1825 18_1831 18_1833 18_1838 18_1842
4 3 53 676 64 20 673
>
> # Let's redo the calc.errorlod cmd for the new object.
>
> iaxne17f2.clean <- calc.errorlod(iaxne17f2.clean, error.prob=0.0001)
> print(toperr <- top.errorlod(iaxne17f2.clean, cutoff=6))
chr id marker errorlod
1 18 330 Dt2 17.39794
2 18 507 Dt2 17.39794
>