snpmclust: Genotype clustering and calling

Description Usage Arguments Value Author(s) References Examples

View source: R/snpmclust.R

Description

Genotype clustering and calling for Illumina microarrays.

Usage

1
2
3
snpmclust(indata, p = 1, priorfrac = 0.2, uncertcutoff = 0.01, qcutoff = 0,
          showplots = FALSE, xm1 = NA, xm2 = NA, xm3 = NA, ym1 = NA,
          ym2 = NA, ym3 = NA, ranseed = 1969, R.lowcutoff = 0.05)

Arguments

indata

A list containing input data on one or all SNPs, and would normally be produced by the function prepdata. Details on the different components of indata can be seen in help(prepdata).

p

A positive integer specifying which SNP to cluster. The default is 1.

priorfrac

A non-negative scalar specifying the number of observations, as a fraction of the number of samples N, of pseudodata to be appended to the heterozygous and homozygous minor genotypes. The default is 0.2.

uncertcutoff

Genotype calls with uncertainty greater than uncertcutoff are set to "NC" (no call). The default is 0.01.

qcutoff

Uncertainty scores lower than the qcutoff'th quantile are reset to that value. When used with R.lowcutoff, this is equivalent to requiring a SNP-specific call rate of qcutoff or higher.

showplots

A logical value. If TRUE, the function will produce a series of plots. The default is FALSE.

xm1, xm2, xm3, ym1, ym2, ym3

Pseudodata cluster means can be user-specified through these parameters. The ordered pair (xm1,ym1) gives the cluster mean for genotype AA; similarly for (xm2,ym2), (xm3,ym3) and AB, BB, respectively. Default values are NA, in which case cluster means are estimated from the data, conditional on the a priori genotypes produced by GenomeStudio.

ranseed

Random seed for generation of pseudodata. The default is 1969.

R.lowcutoff

Genotypes for which R is less than R.lowcutoff are set to "NC" (no call). The default is 0.05.

Value

A list with the following components:

calls

A data frame with N rows and 4 columns, namely, SNP, SampleID, MClustCalls (the genotype call), and Uncertainty.

snp

The SNP name (i.e. rs-number).

callrate

Call rate for the SNP.

priorfrac

Value of argument in function call.

uncertcutoff

Value of argument in function call.

qcutoff

Value of argument in function call.

Author(s)

Stephen W. Erickson [email protected] with Joshua C. Callaway [email protected]

References

Stephen W. Erickson, Joshua Callaway (2016). SNPMClust: Bivariate Gaussian Genotype Clustering and Calling for Illumina Microarrays. Journal of Statistical Software, 71(2), 1-9. doi:10.18637/jss.v071.c02

Examples

1
2
3
data(testset)
tmpfile = prepdata(testset)
snpmclust(tmpfile, p=1, showplots=TRUE)

Example output

Loading required package: MASS
Loading required package: mclust
Package 'mclust' version 5.3
Type 'citation("mclust")' for citing this R package in publications.
$calls
     SNP SampleID MClustCalls  Uncertainty
1   rs01      ID1          AB 8.250553e-05
2   rs01      ID2          AB 7.531890e-04
3   rs01      ID3          AA 6.888464e-09
4   rs01      ID4          AB 2.212727e-03
5   rs01      ID5          AA 3.805802e-07
6   rs01      ID6          AB 7.994968e-03
7   rs01      ID7          AB 9.664116e-03
8   rs01      ID8          AA 1.362355e-08
9   rs01      ID9          AB 1.524775e-05
10  rs01     ID10          AA 2.486900e-14
11  rs01     ID11          NC 1.405959e-02
12  rs01     ID12          AB 7.849124e-10
13  rs01     ID13          AA 2.241569e-05
14  rs01     ID14          AA 1.219025e-13
15  rs01     ID15          AA 1.634470e-12
16  rs01     ID16          BB 1.742131e-09
17  rs01     ID17          NC 2.457102e-02
18  rs01     ID18          AA 5.103112e-06
19  rs01     ID19          AA 3.064184e-05
20  rs01     ID20          AB 1.342320e-08
21  rs01     ID21          AA 6.721512e-12
22  rs01     ID22          AB 4.126413e-10
23  rs01     ID23          AB 6.474239e-10
24  rs01     ID24          AA 1.311191e-08
25  rs01     ID25          AB 5.710964e-03
26  rs01     ID26          BB 7.383474e-10
27  rs01     ID27          AB 1.756933e-09
28  rs01     ID28          AA 7.025491e-13
29  rs01     ID29          BB 3.064216e-14
30  rs01     ID30          NC 2.505060e-01
31  rs01     ID31          AB 8.175530e-03
32  rs01     ID32          AB 4.583016e-10
33  rs01     ID33          AB 1.412231e-09
34  rs01     ID34          AA 1.788515e-08
35  rs01     ID35          BB 4.397838e-11
36  rs01     ID36          AA 9.836576e-14
37  rs01     ID37          AA 1.323039e-10
38  rs01     ID38          AB 2.778449e-10
39  rs01     ID39          AA 1.067870e-04
40  rs01     ID40          AB 9.871720e-06
41  rs01     ID41          AA 2.984085e-09
42  rs01     ID42          AA 1.425333e-10
43  rs01     ID43          AB 6.274625e-11
44  rs01     ID44          BB 8.535345e-08
45  rs01     ID45          AA 3.321405e-06
46  rs01     ID46          AB 1.331396e-06
47  rs01     ID47          AA 1.483432e-04
48  rs01     ID48          NC 7.051057e-02
49  rs01     ID49          BB 1.109350e-04
50  rs01     ID50          AA 3.330669e-15
51  rs01     ID51          AB 3.572845e-08
52  rs01     ID52          AA 2.719770e-06
53  rs01     ID53          AB 2.520463e-09
54  rs01     ID54          AA 2.468914e-12
55  rs01     ID55          AB 9.647242e-09
56  rs01     ID56          AA 4.101541e-11
57  rs01     ID57          AB 2.599923e-06
58  rs01     ID58          AA 8.804615e-09
59  rs01     ID59          AB 4.178042e-10
60  rs01     ID60          AB 6.409481e-09
61  rs01     ID61          AA 3.596465e-07
62  rs01     ID62          AB 6.635912e-09
63  rs01     ID63          AB 2.186475e-10
64  rs01     ID64          AB 1.071703e-07
65  rs01     ID65          AB 8.165179e-07
66  rs01     ID66          AA 1.501073e-10
67  rs01     ID67          AA 2.090571e-09
68  rs01     ID68          NC 1.193337e-01
69  rs01     ID69          AA 2.746170e-10
70  rs01     ID70          AB 1.279008e-09
71  rs01     ID71          AA 1.778515e-04
72  rs01     ID72          AA 1.163156e-09
73  rs01     ID73          AA 1.084688e-12
74  rs01     ID74          BB 5.263789e-12
75  rs01     ID75          AA 1.977285e-10
76  rs01     ID76          AB 9.619148e-10
77  rs01     ID77          AA 4.658575e-08
78  rs01     ID78          AB 6.457019e-09
79  rs01     ID79          AA 1.157058e-05
80  rs01     ID80          BB 9.954704e-11
81  rs01     ID81          AB 3.557981e-10
82  rs01     ID82          AA 1.567247e-04
83  rs01     ID83          AA 2.449852e-08
84  rs01     ID84          AA 3.872950e-05
85  rs01     ID85          AA 1.301972e-09
86  rs01     ID86          AA 1.644960e-08
87  rs01     ID87          BB 2.043067e-08
88  rs01     ID88          AB 1.414779e-11
89  rs01     ID89          AA 6.048557e-07
90  rs01     ID90          AA 7.764938e-10
91  rs01     ID91          AA 3.623708e-09
92  rs01     ID92          AA 8.179109e-07
93  rs01     ID93          AA 2.927858e-11
94  rs01     ID94          AA 2.087616e-06
95  rs01     ID95          AB 1.660760e-09
96  rs01     ID96          AA 1.667555e-13
97  rs01     ID97          AB 1.202480e-10
98  rs01     ID98          AB 6.054492e-10
99  rs01     ID99          AA 6.324792e-07
100 rs01    ID100          BB 1.398881e-14
101 rs01    ID101          AA 6.349100e-09
102 rs01    ID102          AB 4.284191e-09
103 rs01    ID103          AA 1.512402e-06
104 rs01    ID104          AA 2.376782e-05
105 rs01    ID105          AA 6.322955e-10
106 rs01    ID106          AB 5.102299e-10
107 rs01    ID107          BB 3.330669e-14
108 rs01    ID108          AA 1.107515e-09
109 rs01    ID109          AA 1.623070e-08
110 rs01    ID110          AA 8.016754e-08
111 rs01    ID111          AA 4.462801e-05
112 rs01    ID112          AB 1.342390e-07
113 rs01    ID113          AA 8.089174e-11
114 rs01    ID114          BB 1.925518e-10
115 rs01    ID115          AB 3.048002e-09
116 rs01    ID116          AA 3.613341e-07
117 rs01    ID117          AB 1.308998e-09
118 rs01    ID118          AB 7.189954e-09
119 rs01    ID119          AB 3.683015e-07
120 rs01    ID120          AA 1.038469e-04
121 rs01    ID121          AA 7.329737e-11
122 rs01    ID122          BB 5.258460e-12
123 rs01    ID123          AA 1.474296e-09
124 rs01    ID124          AA 4.679994e-07
125 rs01    ID125          AA 1.968662e-09
126 rs01    ID126          AA 2.796501e-09
127 rs01    ID127          AA 3.585576e-12
128 rs01    ID128          AB 1.780765e-08
129 rs01    ID129          NC 1.961649e-02
130 rs01    ID130          AA 1.407046e-06
131 rs01    ID131          AB 4.999121e-06
132 rs01    ID132          AB 3.475893e-09
133 rs01    ID133          AA 1.451523e-07
134 rs01    ID134          AA 4.453675e-10
135 rs01    ID135          AB 1.273498e-09
136 rs01    ID136          AA 5.096151e-09
137 rs01    ID137          BB 5.986323e-13
138 rs01    ID138          AB 1.384206e-09
139 rs01    ID139          AB 5.549671e-08
140 rs01    ID140          AB 7.055974e-10
141 rs01    ID141          AB 3.883453e-04
142 rs01    ID142          AA 4.245518e-07
143 rs01    ID143          BB 1.185296e-11
144 rs01    ID144          BB 8.211209e-13
145 rs01    ID145          AA 5.656332e-08
146 rs01    ID146          BB 2.856604e-12
147 rs01    ID147          AB 5.825052e-09
148 rs01    ID148          AB 1.838179e-08
149 rs01    ID149          AB 3.974616e-09
150 rs01    ID150          AB 2.035772e-08
151 rs01    ID151          BB 7.940315e-13
152 rs01    ID152          AA 1.396964e-09
153 rs01    ID153          AB 2.329074e-09
154 rs01    ID154          AA 2.729972e-11
155 rs01    ID155          AA 7.809860e-08
156 rs01    ID156          AB 2.634896e-07
157 rs01    ID157          BB 2.034439e-11
158 rs01    ID158          AB 1.196386e-09
159 rs01    ID159          AA 1.975420e-11
160 rs01    ID160          AA 3.304179e-11
161 rs01    ID161          AA 1.516565e-13
162 rs01    ID162          AB 5.448797e-11
163 rs01    ID163          AA 6.501522e-10
164 rs01    ID164          AA 3.471781e-10
165 rs01    ID165          AA 2.501830e-09
166 rs01    ID166          AA 1.874723e-12
167 rs01    ID167          BB 1.476386e-10
168 rs01    ID168          BB 1.029554e-11
169 rs01    ID169          AA 1.216738e-11
170 rs01    ID170          AB 1.925544e-07
171 rs01    ID171          BB 8.707057e-09
172 rs01    ID172          AB 1.529284e-09
173 rs01    ID173          BB 1.869505e-11
174 rs01    ID174          AB 3.283307e-09
175 rs01    ID175          BB 2.580719e-06
176 rs01    ID176          AA 8.119949e-12
177 rs01    ID177          AA 9.827694e-13
178 rs01    ID178          AB 8.376635e-09
179 rs01    ID179          AA 1.313205e-10
180 rs01    ID180          AB 8.255923e-09
181 rs01    ID181          AA 1.034375e-07
182 rs01    ID182          BB 1.322720e-12
183 rs01    ID183          AB 1.798345e-09
184 rs01    ID184          AB 6.278113e-09
185 rs01    ID185          AB 3.599338e-07
186 rs01    ID186          BB 4.574119e-14
187 rs01    ID187          AB 1.764455e-07
188 rs01    ID188          AB 8.604886e-10
189 rs01    ID189          AA 8.668177e-12
190 rs01    ID190          AB 1.282514e-09
191 rs01    ID191          BB 8.006928e-13
192 rs01    ID192          AA 2.292582e-10
193 rs01    ID193          AA 1.356397e-08
194 rs01    ID194          AB 7.835908e-09
195 rs01    ID195          BB 1.450384e-10
196 rs01    ID196          AB 3.536585e-09
197 rs01    ID197          NC 1.336274e-02
198 rs01    ID198          AB 8.963931e-08
199 rs01    ID199          BB 1.940729e-09
200 rs01    ID200          AA 3.239410e-03

$snp
[1] "rs01"

$callrate
[1] 0.965

$priorfrac
[1] 0.2

$uncertcutoff
[1] 0.01

$qcutoff
[1] 0

SNPMClust documentation built on May 29, 2017, 3:59 p.m.