Converting a marker genotype to an NA (missing) genotype

62 views
Skip to first unread message

James E Specht

unread,
Feb 25, 2012, 9:27:50 AM2/25/12
to rqtl...@googlegroups.com
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
>

Karl Broman

unread,
Feb 25, 2012, 9:38:30 AM2/25/12
to rqtl...@googlegroups.com
I can't tell.

karl

> --
> You received this message because you are subscribed to the Google Groups "R/qtl discussion" group.
> To post to this group, send email to rqtl...@googlegroups.com.
> To unsubscribe from this group, send email to rqtl-disc+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rqtl-disc?hl=en.

James E Specht

unread,
Mar 4, 2012, 2:55:29 PM3/4/12
to rqtl...@googlegroups.com
Karl:  I found the problem (silly one I made) and though R/qtl land should know what it was.  I had capitalized ID in the *.csv file and the below cmd references to ID were in lower case.  The cmd set worked when I changed iaxne17F2$pheno$id  TO  iaxne17F2$pheno$ID 
- Jim
To: rqtl...@googlegroups.com
From: Karl Broman <kbr...@gmail.com>
Sent by: rqtl...@googlegroups.com
Date: 02/25/2012 08:38AM
Subject: Re: [Rqtl-disc] Converting a marker genotype to an NA (missing) genotype
Reply all
Reply to author
Forward
0 new messages