X.snp.matrix-class: Class "X.snp.matrix"

Description Objects from the Class Slots Extends Methods Author(s) References See Also Examples

Description

This class extends the snp.matrix-class to deal with SNPs on the X chromosome.

Objects from the Class

Objects can be created by calls of the form new("X.snp.matrix", x, Female). Such objects have an additional slot to objects of class "snp.matrix" consisting of a logical array of the same length as the number of rows. This array indicates whether the sample corresponding to that row came from a female (TRUE) or a male (FALSE).

Slots

.Data:

Object of class "matrix" and storage mode "raw"

Female:

Object of class "logical" indicating sex of samples

Extends

Class "snp.matrix", directly, with explicit coerce. Class "matrix", by class "snp.matrix". Class "structure", by class "snp.matrix". Class "array", by class "snp.matrix". Class "vector", by class "snp.matrix", with explicit coerce. Class "vector", by class "snp.matrix", with explicit coerce.

Methods

[]

signature(x = "X.snp.matrix"): subset operations. Currently rather slow owing to excessive copying

[<-

signature(x = "X.snp.matrix"): subset assignment operation to replace part of an object

coerce

signature(from = "X.snp.matrix", to = "character"): map to codes 0, 1, 2, or NA

coerce

signature(from = "snp.matrix", to = "X.snp.matrix"): maps a snp.matrix to an X.snp.matrix. Sex is inferred from the genotype data since males should not be heterozygous at any locus. After inferring sex, heterozygous calls for males are set to NA

show

signature(object = "X.snp.matrix"): map to codes "A/A", "A/B", "B/B", "A/Y", "B/Y" or ""

summary

signature(object = "X.snp.matrix"): calculate call rates, allele frequencies, genotype frequencies, and chi-square tests for Hardy-Weinberg equilibrium. Genotype frequencies are calculated for males and females separately and Hardy-Weinberg equilibrium tests use only the female data. Allele frequencies are calculated using data from both males and females. Results are returned as a dataframe with column names Calls, Call.rate, MAF, P.AA, P.AB, P.BB, P.AY, P.BY, and z.HWE

Author(s)

David Clayton david.clayton@cimr.cam.ac.uk

References

http://www-gene.cimr.cam.ac.uk/clayton

See Also

X.snp-class, snp.matrix-class, snp-class

Examples

1
2

Example output

Loading required package: survival
Warning message:
In methods:::bind_activation(TRUE) :
  methods:::bind_activation(TRUE) is deprecated;
 you should rather provide methods for cbind2() / rbind2()
     Calls         Call.rate           MAF                P.AA        
 Min.   :  0.0   Min.   :0.0000   Min.   :0.000000   Min.   :0.00000  
 1st Qu.:264.0   1st Qu.:0.6600   1st Qu.:0.007812   1st Qu.:0.03226  
 Median :389.0   Median :0.9725   Median :0.113990   Median :0.30811  
 Mean   :333.8   Mean   :0.8345   Mean   :0.174095   Mean   :0.42316  
 3rd Qu.:397.0   3rd Qu.:0.9925   3rd Qu.:0.313218   3rd Qu.:0.83607  
 Max.   :400.0   Max.   :1.0000   Max.   :0.496552   Max.   :1.00000  
                                  NA's   :2          NA's   :2        
      P.AB              P.BB               P.AY             P.BY        
 Min.   :0.00000   Min.   :0.000000   Min.   :0.0000   Min.   :0.00000  
 1st Qu.:0.01081   1st Qu.:0.005405   1st Qu.:0.1619   1st Qu.:0.07729  
 Median :0.18852   Median :0.195652   Median :0.5461   Median :0.45390  
 Mean   :0.23098   Mean   :0.345855   Mean   :0.5430   Mean   :0.45699  
 3rd Qu.:0.43784   3rd Qu.:0.655462   3rd Qu.:0.9227   3rd Qu.:0.83810  
 Max.   :0.72283   Max.   :1.000000   Max.   :1.0000   Max.   :1.00000  
 NA's   :2         NA's   :2          NA's   :2        NA's   :2        
     z.HWE           Calls.female  
 Min.   :-3.60226   Min.   :  0.0  
 1st Qu.:-0.55347   1st Qu.:122.0  
 Median : 0.13749   Median :184.0  
 Mean   : 0.06628   Mean   :157.5  
 3rd Qu.: 0.51360   3rd Qu.:186.0  
 Max.   : 7.67702   Max.   :186.0  
 NA's   :36                        

chopsticks documentation built on Nov. 8, 2020, 7:51 p.m.