Skip to content

Commit ea520d4

Browse files
authored
Merge pull request #613 from adeschen/main
Update default parameter in snpgdsIBDKING() function and adjust unit test
2 parents ca81f2b + 60ce1ba commit ea520d4

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

.github/workflows/check-bioc.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@ jobs:
5252
matrix:
5353
config:
5454
##- { os: ubuntu-latest, r: '4.4', bioc: '3.19', cont: "bioconductor/bioconductor_docker:RELEASE_3_19", rspm: "https://packagemanager.posit.co/cran/__linux__/jammy/latest" }
55-
- { os: ubuntu-latest, r: '4.4.1', bioc: '3.20', cont: "bioconductor/bioconductor_docker:RELEASE_3_20", rspm: "https://packagemanager.posit.co/cran/__linux__/jammy/latest" }
56-
## - { os: macOS-latest, r: '4.4', bioc: '3.19'}
57-
- { os: macOS-latest, r: '4.4.1', bioc: '3.20'}
55+
- { os: ubuntu-latest, r: '4.5.0', bioc: '3.21', cont: "bioconductor/bioconductor_docker:RELEASE_3_21", rspm: "https://packagemanager.posit.co/cran/__linux__/jammy/latest" }
56+
- { os: ubuntu-devel, r: '4.6.0', bioc: '3.22', cont: "bioconductor/bioconductor_docker:RELEASE_3_22", rspm: "https://packagemanager.posit.co/cran/__linux__/jammy/latest" }
57+
## - { os: macOS-latest, r: '4.4', bioc: '3.19'}
58+
- { os: macOS-latest, r: '4.5.0', bioc: '3.21'}
5859
## - { os: windows-latest, r: '4.2.2', bioc: '3.16'}
59-
- { os: windows-latest, r: '4.4.1', bioc: '3.20'}
60+
- { os: windows-latest, r: '4.5.0', bioc: '3.21'}
6061

6162
env:
6263
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true

R/gdsWrapper_internal.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ runIBDKING <- function(gds, profileID=NULL, snpID=NULL, maf=0.05, verbose) {
10951095

10961096
## Calculate IBD coefficients by KING method of moment
10971097
ibd.robust <- snpgdsIBDKING(gdsobj=gds, sample.id=profileID,
1098-
snp.id=snpID, maf=maf,
1098+
snp.id=snpID, maf=maf, missing.rate=0.01,
10991099
type="KING-robust",
11001100
verbose=verbose)
11011101

tests/testthat/test-gdsWrapper_internal.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,13 @@ test_that("runIBDKING() must return expected results", {
132132
maf=0.05, verbose=FALSE)
133133

134134
sampleIDs <- c("NA07034", "NA07055", "NA12814")
135-
ibs0 <- matrix(c(0.000000000000000, 0.079705823891870, 0.088194306191519,
136-
0.079705823891870, 0.000000000000000, 0.094035785288270,
137-
0.088194306191519, 0.094035785288270, 0.000000000000000), nrow=3,
135+
ibs0 <- matrix(c(0.000000000000000, 0.079928243970500, 0.088100458441300,
136+
0.079928243970500, 0.000000000000000, 0.093880805262109,
137+
0.088100458441300, 0.093880805262109, 0.000000000000000), nrow=3,
138138
byrow=TRUE)
139-
kinship <- matrix(c(0.500000000000000, 0.017237640936687, 0.001294777729823,
140-
0.017237640936687, 0.500000000000000, -0.014341590612777,
141-
0.001294777729823, -0.014341590612777, 0.500000000000000), nrow=3,
139+
kinship <- matrix(c(0.500000000000000, 0.015481901439163, 0.001080847384349,
140+
0.015481901439163, 0.500000000000000, -0.014173571740078,
141+
0.001080847384349, -0.014173571740078, 0.500000000000000), nrow=3,
142142
byrow=TRUE)
143143

144144
expect_equal(result$sample.id, sampleIDs)

0 commit comments

Comments
 (0)