as.genotype.snp.data: Attempts to convert snp.data to "genotype"

Description Usage Arguments Value Author(s) See Also Examples

Description

A function to convert an object of snp.data-class to "genotype" data frame

Usage

1
2
	## S3 method for class 'snp.data'
as.genotype(x, ...)

Arguments

x

An object of snp.data-class

...

...

Value

A data-frame containing genotypes consumable by "genetics" library

Author(s)

Yurii Aulchenko

See Also

as.character.snp.data, as.double.snp.data, as.hsgeno

Examples

1
2
3
require(GenABEL.data)
data(srdta)
as.genotype(srdta@gtdata[1:5,1:10])

Example output

Loading required package: MASS
Loading required package: GenABEL.data
Loading required package: genetics
Loading required package: combinat

Attaching package: 'combinat'

The following object is masked from 'package:utils':

    combn

Loading required package: gdata
gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.

gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.

Attaching package: 'gdata'

The following object is masked from 'package:stats':

    nobs

The following object is masked from 'package:utils':

    object.size

The following object is masked from 'package:base':

    startsWith

Loading required package: gtools
Loading required package: mvtnorm


NOTE: THIS PACKAGE IS NOW OBSOLETE.



  The R-Genetics project has developed an set of enhanced genetics

  packages to replace 'genetics'. Please visit the project homepage

  at http://rgenetics.org for informtion.




Attaching package: 'genetics'

The following object is masked from 'package:GenABEL':

    as.genotype

The following objects are masked from 'package:base':

    %in%, as.factor, order

   rs10 rs18 rs29 rs65 rs73 rs114 rs128 rs130 rs143 rs150
p1  T/T  G/G  G/G  T/A  A/A   A/A   G/G   A/A   G/G   A/A
p2  T/T  G/G <NA> <NA>  A/A   A/A   G/G   G/G   T/T   C/C
p3  T/T  G/G <NA>  T/A  A/A   A/A   G/G   A/A   G/G   A/A
p4  T/T  G/G <NA> <NA>  A/A   A/A   G/G   G/G  <NA>   A/C
p5  T/T  G/A  G/G  T/T  A/A   A/A   G/G   G/G   G/G   A/A

GenABEL documentation built on May 30, 2017, 3:36 a.m.