Learn R Programming

onemap (version 0.1-1)

cr3pts: Call to the C routine for three-point analysis

Description

An interface between Rand the C routine that performs the three-point analysis. Given the type of segregation of the three markers, this function creates the corresponding vectors and matrices that are necessary to the C routine and makes a call to it.

Usage

cr3pts(mrk1, mrk2, mrk3, segr.type1, segr.type2, segr.type3)

Arguments

mrk1
a vector containing the genotypes of all individuals for the first marker.
mrk2
a vector containing the genotypes for the second marker.
mrk3
a vector containing the genotypes for the third marker.
segr.type1
the type of segregation of the first marker (mrk1).
segr.type2
the type of segregation of the second marker (mrk2).
segr.type3
the type of segregation of the third marker (mrk3).

Value

  • Returns a list with the following components:
  • theta12a vector with the maximum likelihood estimates (MLEs) of the recombination fraction between markers 1 and 2 (mrk1 and mrk2, respectively), under the 16 possible assignments.
  • theta23a vector with the MLEs of the recombination fraction between markers 2 and 3 (mrk2 and mrk3, respectively), under the 16 assignments.
  • theta13a vector with the MLEs of the recombination fraction between markers 1 and 3 (mrk1 and mrk3, respectively), under the 16 assignments.
  • likea vector with the likelihood of the data under each of the 16 assignments.
  • posteriora vector with the posterior probability of each of the 16 assignments.
  • LODa vector with the LOD Score for the 16 assignments - the base 10 logarithm of the ratio of the maximum likelihood and the likelihood under the null hypothesis of no linkage.

References

Wu, R., Ma, C.-X., Painter, I. and Zeng, Z.-B. (2002) Simultaneous maximum likelihood estimation of linkage and linkage phases in outcrossing species. Theoretical Population Biology 61: 349-363.

See Also

est.rf.3pts; for details concerning the types of segregation, see mrktype.

Examples

Run this code
data(example_out)
  
  # getting values
  marker1 <- example_out$geno[,1]
  marker2 <- example_out$geno[,2]
  marker3 <- example_out$geno[,14]
  segr.type1 <- example_out$segr.type[1]
  segr.type2 <- example_out$segr.type[2]
  segr.type3 <- example_out$segr.type[14]
  
  # three-point analysis
  cr3pts(marker1,marker2,marker3,segr.type1,segr.type2,segr.type3)

Run the code above in your browser using DataLab