Bioconductor snpStats Bugs

Hin-Tak Leung
April 19, 2013

Contents
1 Introduction

1

2 Bugs in snpStats GLM estimates
2.1 snpStats::snp.*hs.estimates() returns garbage . . . . . . . . . . . . . . . . . . . . . .

3
3

3 Multiple snpStats issues of data corruption, memory violations and crashes

5

4 Bugs in snpStats GLM score tests
4.1 snpStats::snp.lhs.tests(...,robust=TRUE) returns garbage . . . . .
4.2 Malformed ”GlmTests” S4 object from snpStats::snp.lhs.tests() . .
4.3 Crazy large/negative number of samples from snpStats GLM tests
4.4 snpStats::snp.rhs.tests() returning garbage with or without robust

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

5
5
7
8
8

5 2-df Bug in snpStats::single.snp.tests()

10

6 Inputs/Conversions of uncertain genotypes from posterior probabilities

13

7 2nd bug in Inputs/Conversions of uncertain genotypes from posterior probabilities
14
8 cbind/rbind in snpStats 1.7.4 onwards

14

9 ld() is broken, has always been broken

14

10 64-bit mode for snpStats::single.snp.tests()

14

11 X chromosome conversion

14

1

Introduction

In the Regression and Migration vignette, we discovered that there has been a bug in snpMatrix’s
single.snp.tests() for many years, which can affect 1% to 2% of SNPs, and fixed it. This
vignette uses the testsuite code in snpMatrix to reveal snpStats’ bug(s). The quick summary is
that most (all?) of the statistical tests were broken to various extent arount October 2008 by
the imputation-related changes. That is 3 years of flawed publications. David made an effort with
1

ibsDist.4.tests() instead of single.freedom.7+ (20th October 2011) but did not get very far.utf8 LC_NAME=C LC_TELEPHONE=C LC_IDENTIFICATION=C attached base packages: [1] grDevices datasets splines [8] base graphics utils stats methods other attached packages: [1] snpStats_1. imputation.0 snpMatrix_1.tests() in snpStats vs the correct one in snpMatrix) and a warning about routines shadowing each other.1-0 [4] survival_2.sample.maf. col.size.13. impute. imputation. effect.0.r2.value.squared.impute.19 Matrix_1. as long as either are referenced explicitly in each step.snp.6 (17th October 2011). snpMatrix::single.3. ibsCount. ld.rules.snps.15. glm.37-4 loaded via a namespace (and not attached): [1] BiocGenerics_0. the latter because of the number of flawed results in 3 years.snp.utf8 LC_MESSAGES=en_GB. This document is usually built against current snpStats HEAD as well as 1.3 At this point there is a warning: Attaching package: 'snpStats' The following object(s) are masked from 'package:snpMatrix': can.control. imputation. Fst.19. Despite many routines being of the same names but behaving differently (such as the buggy single.15. it is possible to use either in the same R session even in alternating statements.nsnp.0 grid_2.3. filter. deg.tests()) or adding package= within. mvtests.utf8 [5] LC_MONETARY=en_GB.15.test.sign.snp. This usually consists of prefix’ing with explicit namespace references (e. misinherits.20-24 tools_2.utf8 [7] LC_PAPER=C [9] LC_ADDRESS=C [11] LC_MEASUREMENT=en_GB.g. chi.utf8 [3] LC_TIME=en_GB.3 (2013-03-01) Platform: i686-redhat-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_GB.summary. plotUncertainty. > library(snpMatrix) > library(snpStats) > sessionInfo() R version 2.utf8 LC_NUMERIC=C LC_COLLATE=en_GB. 2 . p. effective.3 lattice_0.1.

allele.estimates. snp.7. "data.long.08718862 NA NA NA NA 0 NA 0.tests. snp.multiply.data = Autosomes.614689875 1 0.estimates() gives garbage — the way to illustrate this is simply running the corresponding snp. read. data = subject.snpStats::snp.switch.data.090165195 1 0.1 snpStats::snp.*hs.frame"))) 173760 173761 173762 173767 173769 173770 173772 173774 173775 173776 Chi.15121869 0.92552940 1 0.96172092 1 0.estimates() returns garbage snp.05991420 1 0.32823661 0. as below.estimates.76393342 This is the correct result from snpMatrix (1.32675367 1.rhs.37757361 2.37793093 0.tests.952718263 1 0.impute.002022755 1 0.size.tests. snp.snp.data. family = "binomial".beagle.data = Autosomes. data = subject.*hs.t <. snp.15192836 2.95584241 1 0.31130988 0. snp.96412719 0. read. snp.cor.mach.09650612 2.estimates(cc ~ region + sex.lhs.summary.11) (Wald test close to the score test): 3 . if one pays attention to specifying each explicitly.rhs.39230296 0. read.post. switch. snp. sample.rbind.052781924 1 0.17. read. tests = 1:10) print(cbind(as(as(test2. read.73179195 1 0.tests and compare: > > + > + > + data(testdata.32902835 0. row.squared Df p.snp.multiply.777421401 1 0. snp. snp.rhs.value Chi. snp.96391400 1.729732211 1 0.76396725 0. sets = 1:10) test2.762354385 1 0. as(test2. write.pool. test. understandably: A specification for class X.20383380 1. xxt Loading snpMatrix124 simultaneously can also cause a few warnings of the form.61954459 1 0. "data.20315530 2. pp. read. snp.cbind.alleles. "GlmTests").matrix in package ‘snpMatrix124’ seems equivalent to one from package ‘snpMatrix’ and is not turning on duplicate class definitions for this class The warning is harmless.002046886 1 0.09019184 1 0.rhs. package = "snpStats") test2 <.frame").plink.chisq.77858708 1 0.plink.tests(cc ~ region + sex.snpStats::snp.imputation.lhs.rhs. tdt.02511037 1 0. family = "binomial".pedfile.pre.squared Df p. pool2.39297000 0.snp. qq.value 0.snps. single. 2 Bugs in snpStats GLM estimates 2. snp.t.

37791334 0. "data. "data. but better: > Autosomes <. 1:10].02511036 1 0.new("snp.40015665 NA NA 13.476287 9 0.77747875 1 0. as(test3. ~strata(region).matrix". data = subject.matrix".09016525 1 0. ~strata(cc).lhs.tests.76393341 See another garbage result from snpStats: > > + > + > + data(testdata. ~strata(cc). + ~strata(region). package = "snpStats") test3 <.95584109 1 0.31130988 0. robust = TRUE) 4 . unreleased) isn’t correct either.06150760 NA NA 0.data.estimates(Autosomes[. family = "binomial".32823694 0.20376957 1.39902177 1.08970445 NA NA 16.t <.value 0.Data) test2 <. 1:10].17.data = Autosomes.61953853 1 0.rhs.7.snpStats::snp.440413 9 0. "snp.08719062 NA NA NA NA 0 NA 0.glm").squared NA NA NA NA NA NA NA NA NA NA Df p.frame"))) 173760 173761 173762 173767 173769 173770 173772 173774 173775 173776 Chi.09019184 1 0.15121951 0. ~strata(region). as(test2.t <.00000000 NA NA NaN 0 NaN NA NA 9.797680 9 0.value NA NA NaN 0 NaN NA NA 10.15186885 2.31331934 NA NA 15.05990584 1 0.05198017 At the time of this writing.73179195 1 0.32902816 0. snp.snpMatrix::snp.new("snp.tests(cc ~ region + sex.95271902 1 0.Data) > test3 <.000000 0 1.data = Autosomes.09629398 2.data. data = subject. 1:10].snpStats::snp.t.value Chi.lhs.frame"))) 173760 173761 173762 173767 173769 173770 173772 173774 173775 173776 Chi. "data. sets = 1:10) test2.76587572 1 0.t.tests(Autosomes[.data. snp. data = subject. snpMatrix (1.37757361 2.267175 9 0. data = subject. robust = TRUE) test3.77858708 1 0.estimates(Autosomes[.76396718 0. data = subject.14366942 NA NA 16.39296980 0.61514861 1 0.263701 9 0.32675559 1. "GlmTests").71127227 1 0.estimates(cc ~ region + sex.squared Df p. robust = TRUE) print(cbind(as(as(test3.11.05337857 1 0. family = "binomial".data.> > + > + > + Autosomes <.data.72973283 1 0.frame").40686481 0. ~strata(cc).value Chi.squared Df p. Autosomes@.045105 9 0.snpMatrix::snp. tests = 1:10) print(cbind(as(as(test2.squared Df p.snpMatrix::snp.92549240 1 0. "data.lhs.32956204 NA NA 10.frame").411857 9 0.39230296 0. Autosomes@.96171330 1 0.rhs.68794335 1 0.20315614 2.

40015665 173775 337.tests(Autosomes[.411857 9 0. "data.263701 9 0.frame"))) Chi.476287 9 0.squared Df p. + ~strata(region). data = subject.000000 0 1. 4 Bugs in snpStats GLM score tests 4.411265e-38 16.05198017 The correct result should be somewhat close to the non-robust result: 5 .125582e-54 9.155682 9 2.robust=TRUE) returns garbage > data(testdata.009439 9 0. as(test3.045105 9 0.1 snpStats::snp.lhs.14366942 16.31331934 173767 17.773047e-86 16. 1:10]. + data = subject. memory violation and crashes in the GLM related code.32956204 10.267175 9 0.784868e-01 10.411857 9 0. + "data.045105 9 0.tests(Autosomes[.06150760 0.99941616 173761 10.00000000 173772 5.squared Df p.801433e-210 1..959622 9 2.t <.08970445 173769 201.00000000 NaN 0 NaN 9.009134 9 0. 1:10]. "snp.data.476287 9 0.267175 9 0.31331934 15. ~strata(cc).935005e-01 1.044143 9 3.value Chi.> test3.440413 9 0.263701 9 0.05198017 3 Multiple snpStats issues of data corruption.40015665 13.549087 9 1.009456 9 4.000000 0 1.data.t. memory violations and crashes There are multiple issues of data corruption.06150760 173770 NA NA NA 0. package = "snpStats") > snpStats::snp.tests(.. robust = TRUE) > print(cbind(as(as(test3.tests.lhs.08970445 16.glm").value 173760 1004.32956204 173762 11.value NaN 0 NaN 10. ~strata(region).767706 9 1.130321 9 1.152659 9 3.14366942 173776 426..lhs.856810e-02 15.352980e-67 13.snpMatrix:::snp.squared Df p.440413 9 0.449466 9 7. robust = TRUE) 173760 173761 173762 173767 173769 173770 173772 173774 173775 173776 Chi.651885e-01 10.797680 9 0.99941544 173774 278. The best way to demonstrate this is turn on gctorture() and uses the GLM score tests/estimates and see R crash.frame").797680 9 0. ~strata(cc).

data = subject. 1:10].squared Df p.99941544 9.1984058 12.> snpStats::snp.000000 0 1.tests(new("snp.1067926 8.267175 9 0.009134 9 0. + robust = FALSE) 173760 173761 173762 173767 173769 173770 Chi.value 5.462676 9 0.tests(Autosomes[. + robust = TRUE) 173760 173761 173762 173767 173769 173770 173772 173774 173775 173776 Chi.06150760 0. + 1:10].263701 9 0. ~strata(cc).476151 9 0. ~strata(region).462676 9 0.5746207 Now we convert snpStats classes (mixed-cases without “.1877771 14. + 1:10].31331934 15.08970445 16. Autosomes@.lhs.045105 9 0. ~strata(cc).”).14366942 16.lhs.squared Df p.8305461 12.value NaN 9 NaN 12.matrix".042974 9 0.476287 9 0.4759812 0.lhs. data = subject.Data)[. robust = FALSE) 173760 173761 173762 173767 173769 173770 173772 173774 173775 173776 Chi.data. and re-run the the snpMatrix version of snp.4759812 0.000000 0 1.440413 9 0.0000000 NaN 9 NaN 6.squared Df p.009439 9 0. Autosomes@.000000 0 1.812111 9 0.272003 9 0.1984058 12. ~strata(region).476151 9 0.40015665 13.data.7241952 8.matrix".411857 9 0.797680 9 0. ~strata(region).32956204 10.05198017 Just to see what snpMatrix does without robust: > snpMatrix::snp.1877771 14.99941616 10.602749 9 0.tests(new("snp.156140 9 0.Data)[.0000000 6 .272003 9 0. ~strata(cc).00000000 1.data.”) to snpMatrix’s (lowercases with “.value 1. + data = subject.589652 9 0.4547958 7.1067926 8.lhs.tests(): > snpMatrix::snp.589652 9 0.

812111 9 397 7.589652 9 394 NA NA NA 7.6: > result <.006621 8 394 NA NA NA 1. + 1:10]. ~strata(region). + robust = TRUE) 173760 173761 173762 173767 173769 173770 173772 173774 173775 173776 Chi.263701 9 398 10.tests(Autosomes[. data = subject. ~strata(region).812111 7.data) 7 .2 Chi.tests(new("snp. + 1:10].17. + ~strata(region).462676 9 376 8.7241952 0.440413 9 397 16.476287 9 396 15.173772 173774 173775 173776 7. See also how snpMatrix124 does: > snpMatrix124::snp.squared Df Df.residual 5.5.045105 9 376 16.008943 8 198 10.matrix". ~strata(cc). ~strata(cc). Autosomes@.009439 8 199 9.data.tests(new("snp.797680 9 398 > snpMatrix124::snp.156140 9 386 8. data = subject.squared Df Df.4547958 0.5746207 This bug also exist in snpMatrix prior to 1. ~strata(cc).lhs.tests() Upto and including snpStats 1.lhs.602749 9 398 Malformed ”GlmTests” S4 object from snpStats::snp.411857 9 386 13.714940 6. 1:10].lhs.3.lhs.Data)[.data.476151 9 396 14.042974 9 198 12.602749 9 9 9 9 0. data = subject.272003 9 398 12. + robust = FALSE) 173760 173761 173762 173767 173769 173770 173772 173774 173775 173776 4. Autosomes@.156140 8.10 and was introduced with the imputationrelated changes around October 2008.matrix".snpStats::snp.residual 1.5631090 0.714940 9 199 6.Data)[.

5. "var. family = "binomial".names" for this object of class "GlmTests" There is no need to show the alternatives as this is clearly broken.36388768 0. tests = 1:10) 173760 173761 173762 173767 173769 173770 173772 173774 173775 173776 Chi.6: > result@N [1] 202248192 202248160 202248128 202248096 202248064 202248032 202248000 [8] 202247968 202247936 202247904 Hundred million samples and negative number of samples? This bug also exist in snpMatrix prior to 1.value 1.3 Crazy large/negative number of samples from snpStats GLM tests Upto and including snpStats 1.09218633 1 0.34890234 0.rhs.04226350 1 0. family = "binomial".rhs.. .3.10 and was introduced with the imputationrelated changes around October 2008. + data = subject.data = Autosomes. "N")[[2L]]. tests = 1:10) 8 .names".76141588 The correct result shouldn’t be too far from without sex: > snpStats::snp.17.tests(cc ~ strata(region).4 snpStats::snp.05977872 NA 0 NA 0.squared Df p.61290542 1 0.59863946 1 0. + data = subject.Looking at result gives a hard error so I’ll just show the message below: > str(result) Error in FUN(c("snp. 4.15298186 NaN 1 NaN 3.87744532 1 0.rhs.data = Autosomes. "df".43909761 0.25356125 1 0.tests(cc ~ strata(region.data.54351327 1 0. snp.names".. "chisq".data.tests() returning garbage with or without robust > snpStats::snp. 4. sex).26287339 1.) : no slot of name "var. snp.82443150 1 0.20408387 2. This bug is specific to snpStats and has no equivalent in snpMatrix.

46259571 1 0. sex).value 1.22651757 1.tests(cc ~ strata(region.31361630 1.squared Df p.92028786 1 0.34890234 0. + data = subject.29671726 1 0.75385649 Here is how snpMatrix does it: > snpMatrix::snp.41410906 0.rhs.08715513 NA 0 NA 1.37833736 2.37833736 2.09831885 1 0.09831885 1 0.rhs.16582493 0. snp.data. Autosomes@.36388768 0. + tests = 1:10) 173760 173761 173762 173767 173769 173770 173772 173774 173775 173776 Chi.43909761 0.82443150 1 0.58594776 3. family = "binomial".01538462 1 0.96730037 1 0.31361630 1.squared Df p.squared Df p.tests(cc ~ strata(region).61290542 1 0.Data).75385649 9 .08715513 NA 0 NA 1.09218633 1 0.04226350 1 0.54351327 1 0.value 1.92614948 1 0.25356125 1 0.data = new("snp. + tests = 1:10) 173760 173761 173762 173767 173769 173770 173772 173774 173775 173776 Chi.173760 173761 173762 173767 173769 173770 173772 173774 173775 173776 Chi.11008326 1 0.05977872 NA 0 NA 0.data.Data).01538462 1 0. family = "binomial".29206385 0.59863946 1 0.46259571 1 0.20408387 2.32535438 0.29206385 0.92028786 1 0. Autosomes@.66697270 1 0.15298186 0.77609738 1 0.96730037 1 0. snp.value 1.16582493 0.data = new("snp.76141588 Just to see that snpMatrix does it without sex: > snpMatrix::snp. + data = subject.87744532 1 0.matrix".92614948 1 0.77609738 1 0.41410906 0.11008326 1 0.26287339 1.66697270 1 0.32535438 0.22651757 1.matrix".

rhs.77609738 1 368 2.data.data = snps.data = new("snp.82443150 1 365 0.”). + data = subject.exercise.61290542 1 376 2. package = "snpStats") > tests.10) Now we convert snpStats classes (mixed-cases without “.rhs.29671726 1 350 3.tests(cc ~ strata(region.5. + tests = 1:10) 173760 173761 173762 173767 173769 173770 173772 173774 173775 173776 Chi. + tests = 1:10) 173760 173761 173762 173767 173769 173770 173772 173774 173775 173776 5 Chi. Autosomes@.residual 1. family = "binomial".data.data = new("snp.squared Df Df.17.04226350 1 374 0. and re-run the the snpMatrix version of single. Autosomes@.matrix".squared Df Df.66697270 1 378 0.96730037 1 389 0.tests(cc ~ strata(region).matrix". See how snpMatrix124 does: > snpMatrix124::snp.snp.This bug also exist in snpMatrix prior to 1. family = "binomial".tests(cc.09831885 1 390 2-df Bug in snpStats::single.snpStats::single. data = subject.Data).snp.support.92028786 1 388 0.92614948 1 386 NA NA 390 1.54958407 1 372 NA NA 376 0.”) to snpMatrix’s (lowercases with “. + data = subject.snpStats <.09218633 1 376 > snpMatrix124::snp.01538462 1 387 1.Data).87744532 1 375 0. snp. stratum.25356125 1 373 1.tests() > data(for.46259571 1 390 1.10 and was introduced with the imputationrelated changes around October 2008.snp. sex).residual 1. + snp.11008326 1 390 0.tests(): > str(snps.10) 10 . snp.59863946 1 376 0.

10) 11 ..10) Formal class 'snp. tests. "dimnames")=List of 2 .2830 2. .new("snp.8604 1.crude <.snpStats@chisq[. data = subject.support. . ... 1:28501] 01 01 01 01 .snp..matrix' [package "snpMatrix"] with 1 slots .3000 2. stratum..2580 Or 20 SNP tests failed in snpStats but okay in snpMatrix... + "2 df"]...10) Then we use the testsuite code to compare: > all.tests(cc. .@ . .$ : chr [1:28501] "rs7909677" "rs7093061" "rs12773042" "rs7475011" ...9840 Difference 18 Max. + "1 df"].. but convert in the opposite direction.NA' value mismatch: 789 in current 807 in target" > snpMatrix:::. > tests. Median Mean 3rd Qu..10) > str(snps...Data) > str(snps..all. ....Formal class 'SnpMatrix' [package "snpStats"] with 1 slots . 1:28501] 01 01 01 01 .862" "jpt.$ : chr [1:1000] "jpt.869" "jpt.948" "ceu. .snpMatrix <. + snp. "dimnames")=List of 2 .$ : chr [1:28501] "rs7909677" "rs7093061" "rs12773042" "rs7475011" . . tolerance = 0) [1] "'is..10 <.snpStats@chisq[.matrix".snp.attr(*.948" "ceu.@ . + snp.equal(tests.equal(tests.. tests. ..snpMatrix::single.tests(cc. "2 df"]. > snps.Data: raw [1:1000..data = snps.. + "2 df"]) Max absolute finite difference: 0 Max relative finite difference: 0 Finite in 1st but not in 2nd: 0 Finite in 2nd but not in 1st: 18 Min..4020 2.. . 1st Qu.chi2.564" . 4. .data = snps.862" "jpt. snps.snpMatrix@chisq[. 0.snpMatrix::single. "2 df"]. data = subject..support.snpMatrix. Now we run the non-stratified tests.snpMatrix@chisq[.Data: raw [1:1000.10@. and compare: > tests... tolerance = 0) [1] TRUE > all.. tests. .snpStats@chisq[.. "1 df"]. .equal(tests.snpMatrix@chisq[.$ : chr [1:1000] "jpt..attr(*.564" . .869" "jpt.

snpStats::single.. + tests. Median Mean 3rd Qu. . "2 df"]. + data = subject.equal(tests.snpStats@chisq[.crude@chisq[.snpStats. .@ . > snps..$ : chr [1:28501] "rs7909677" "rs7093061" "rs12773042" "rs7475011" ..Formal class 'snp.10@. ...tests(cc...10 <.snpMatrix124 <.869" "jpt..snpMatrix.data = snps. "1 df"]..attr(*.$ : chr [1:28501] "rs7909677" "rs7093061" "rs12773042" "rs7475011" ..922 Or 18 SNP tests failed in snpStats but okay in snpMatrix... "dimnames")=List of 2 . tolerance = 0) [1] "'is.Data) > str(snps.10) Formal class 'SnpMatrix' [package "snpStats"] with 1 slots . This explains why snpStats and snpMatrix124 differs: > snps. .crude <.support.564" . + "2 df"]..043 1. 1:28501] 01 01 01 01 .snpMatrix124$chi2.405 2.862" "jpt..323 2..564" .10@.. and differently before 1. .. "2 df"]) Max absolute finite difference: 0 Max relative finite difference: 0 Finite in 1st but not in 2nd: 0 Finite in 2nd but not in 1st: 18 Min.snpStats.. .. .equal(tests.snpMatrix.5.862" "jpt. This bug also exist in snpMatrix prior to 1.snpMatrix124::single.865 Difference 18 Max..equal(tests. "dimnames")=List of 2 .new("SnpMatrix".4. 3.1df..0).$ : chr [1:1000] "jpt.matrix".NA' value mismatch: 789 in current 807 in target" > snpMatrix:::.408 2.... 1.10 <..matrix' [package "snpMatrix"] with 1 slots .attr(*.10) > all. .x also. data = subject. stratum.new("snp. 1:28501] 01 01 01 01 . .all.tests(cc.. snps.Data: raw [1:1000.948" "ceu.support..crude@chisq[.948" "ceu.e. .crude@chisq[. snps..@ . + snp..crude@chisq[.chi2. tests. since pre-1. tests.snp. .Data) > tests.$ : chr [1:1000] "jpt. . + tolerance = 0) [1] "Mean relative difference: 1. 1st Qu.data = snps.. > tests.9 for its entire history (i.17.790103e-16" 12 . . snp.10) > all.. .snp.snpStats..Data: raw [1:1000. "2 df"].869" "jpt.

19. It is seen on Linux/gcc. This means all common systems.19.6. and possibly all gcc-based systems at normal usage.2580 Difference 18 > snpMatrix:::. + tolerance = 0) [1] "'is. Max. 1st Qu. + "2 df"]) Max absolute finite difference: 3.snpMatrix124$chi2. "2 df"].819167e-14 Max relative finite difference: 4.all.all. tests.1df.17.NA' value mismatch: 789 in current 807 in target" > snpMatrix:::.> all.equal(tests.snpMatrix124$chi2.2df. where basically garbage-in.2df. tests.snpMatrix@chisq[. and in snpStats x. It is fixed in snpMatrix 1.equal(tests.105427e-15 Max relative finite difference: 8. 0.chi2.10+ .equal(tests.equal(tests. 13 . 1.9840 4. garbage-out. snpMatrix124 can do 18 and much closer to snpMatrix 1.2df) Max absolute finite difference: 3.chi2. + "1 df"]) Max absolute finite difference: 7.3.0. tests.snpMatrix124$chi2.7.x. tests. Median Mean 3rd Qu.14).819167e-14 Max relative finite difference: 2.4020 2. "2 df"].0.2.all. 6 Inputs/Conversions of uncertain genotypes from posterior probabilities There is a compiler/optimization-dependent bug in inputs/conversions of uncertain genotypes from posterior probabilities. since R on windows also uses gcc.35139e-14 Finite in 1st but not in 2nd: 0 Finite in 2nd but not in 1st: 18 Min.14 onwards (although snpMatrix does not use uncertain genotypes anywhere up to and including 1.3000 2.8604 1.snpStats@chisq[.chi2.snpStats@chisq[.20642e-14 Finite in 1st but not in 2nd: 0 Finite in 2nd but not in 1st: 0 Difference 0 So out of 20 of those SNPs that snpStats failed.snpMatrix@chisq[.snpMatrix124$chi2.941748e-13 Finite in 1st but not in 2nd: 0 Finite in 2nd but not in 1st: 0 Difference 0 > snpMatrix:::.x.2 being the lowest version with the fix.2830 2.

1.chiamo() for generating uncertain genotypes.19.x.data) 11 X chromosome conversion The corresponding X-chromosome conversion is as follows: 1 Bug 8529 . to be precise) (Mon Feb 11 19:21:34 2008.r-project.19. snpMatrix 1. “Talked to Jeff Barrett a while ago about this.. 170.9.org/ bugzilla3/show_bug.18 (April 2013) adds the uncertain= option to read.sub* assgnment unimplemented for raw (RAWSXP) types.9. 10 64-bit mode for snpStats::single.x. (r2 at worst is zero for uncorrelated but called snps).18 .tests(Autosomes[. committed a major clean-up which touched almost half of the files (49 out of 102..0<->1. It was tested against haploview in 2006. committed myself) of HaploView.snps() function in snpMatrix is not affected. it was me who wrote the relevant part of R’s cbind/rbind1 in January 2006.cgi?id=8530 14 . some snps with non-zero call rates could have NA for r2 .4 onwards cbind/rbind in snpStats 1. from the development leading up to snpMatrix 1. HTL_PRE_SERIALVER_CHANGE. hapmap).4 was rewritten.7 2nd bug in Inputs/Conversions of uncertain genotypes from posterior probabilities Another bug related to inputs/conversions of uncertain genotypes from posterior probabilities was fixed with snpStats x. About 9.1:10]. as well as sub-assignments2 of RAW types.3% of wide-spectrum data are mis-read in snpStats x. https://bugs.org/bugzilla3/ show_bug.7.x. 9 ld() is broken. has always been broken The ld() function introduced in snpStats 1. ~cc. 8 cbind/rbind in snpStats 1.3. data=subject. “cache and show last popup” — the forwarded patch was committed by Jeff). This was first discovered with snpStats 1.snp.8 (2011-02-15) is broken. https://bugs.r-project.rbind/cbind unimplemented for raw (RAWSXP) types. and has always been broken. The older ld.lhs. and I gained commit rights to HaploView’s repository and tagged HTL_POST_SERIALVER_CHANGE.7.snps.x. It does not work under some of the normal use-cases.cgi?id=8529 2 Bug 8530 . haploview gained an enhancement in this area — for easier comparison! (Sun Apr 23 13:19:26 2006.0. ~region.tests() This returns all zeros in 64-bit machine occasionally (corruption?): snp. in read-life data (Chiamo’s bundled examples. See Haploview’s CVS commit logs for details.000 data points from WTCCC1) about 1% is mis-read. As a result.9.”.1 which changes it slightly.0. Before or after the change.g. Incidentally. Wrong answers affect up to 5% of SNP pairs in typical datasets (e.5 (1.5).

....attr(*..@ .. . . .@ diploid: Named logi [1:400] TRUE FALSE TRUE FALSE FALSE FALSE .. .... .. .... "dimnames")=List of 2 .Data. . Female = Xchromosome@diploid) > str(Xchromosome) Formal class 'X.Data : raw [1:400.. .. .... . "names")= chr [1:400] "1987" "436" "762" "1199" .. .attr(*. 1:155] 03 03 03 01 .matrix"...$ : chr [1:155] "174193" "174196" "174197" "174208" .new("X.. ..> data(testdata.... Xchromosome@.... .....snp..matrix' [package "snpMatrix"] with 2 slots . .Data : raw [1:400.$ : chr [1:400] "1987" "436" "762" "1199" .attr(*.. ..attr(*..$ : chr [1:400] "1987" "436" "762" "1199" .. .. .@ . package = "snpStats") > str(Xchromosome) Formal class 'XSnpMatrix' [package "snpStats"] with 2 slots .. ..@ Female: Named logi [1:400] TRUE FALSE TRUE FALSE FALSE FALSE . 15 . > Xchromosome <.snp.. "names")= chr [1:400] "1987" "436" "762" "1199" . 1:155] 03 03 03 01 .......$ : chr [1:155] "174193" "174196" "174197" "174208" . . "dimnames")=List of 2 .