How to filter loci?

23 views
Skip to first unread message

Ian Bremen

unread,
Nov 16, 2021, 7:06:57 AM11/16/21
to R/qtl discussion
Dear Karl, 
I got no clue how to filter loci?. i wat to omit/filter those loci from my dataset which have missing data more than 5%, since the manual talks about filtering individuals NOT the loci.
Regards, 

Karl Broman

unread,
Nov 16, 2021, 11:19:11 AM11/16/21
to R/qtl discussion
You can use the function nmissing() to determine the number of missing genotypes at each marker.

   data(fake.f2)
   pmis <- nmissing(fake.f2, "mar") / nind(fake.f2)

You can then use drop.markers() to drop a set of markers, for example those with > 20% missing data.

  fake.f2.sub <- drop.markers(fake.f2, names(pmis)[pmis > 0.2])

karl
Reply all
Reply to author
Forward
0 new messages