Skip to content

Commit ce83136

Browse files
authored
Merge pull request #4 from maize-genetics/fix-demo-params
Fix `DEMO` endpoint from returning incorrect data
2 parents 698bd6e + 04f9e42 commit ce83136

9 files changed

+22
-11
lines changed

DESCRIPTION

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: rPHG
2-
Version: 0.2.1
2+
Version: 0.2.2
33
Date: 2019-06-03
44
Title: R front-end for the practical haplotype graph
55
Authors@R: c(
@@ -72,6 +72,6 @@ Encoding: UTF-8
7272
LazyData: true
7373
VignetteBuilder:
7474
knitr
75-
RoxygenNote: 7.2.3
75+
RoxygenNote: 7.3.1
7676
biocViews:
7777
GenomeWideAssociation

NEWS

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## CHANGES IN VERSION 0.2.2
2+
* Fixed issue with `DEMO` method endpoint returning incorrect dimensional data
3+
for specific Maize PHGv1 methods
4+
5+
16
## CHANGES IN VERSION 0.2.1
27
* Added new function, `plotDot()`
38
+ Creates dot plots from `.anchorspro` files

NEWS.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## rPHG 0.2.2
2+
* Fixed issue with `DEMO` method endpoint returning incorrect dimensional data
3+
for specific Maize PHGv1 methods
4+
5+
16
## rPHG 0.2.1
27
* Added new function, `plotDot()`
38
+ Creates dot plots from `.anchorspro` files

R/class_phg_method.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ setMethod(
251251
if (conType == "local") {
252252
phgDataSetFromLocal(conObj, conMethod, verbose)
253253
} else if (conType == "server") {
254-
phgDataSetFromServer(conObj, conMethod, verbose, conDemo)
254+
phgDataSetFromServer(conObj, conMethod, conDemo, verbose)
255255
}
256256
}
257257
)

R/constants.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ BRAPI_PARAMS <- list(
2525
"METHOD_RR_SIZE" = "dimensionCallSetPageSize=%i",
2626
"METHOD_RR_PAGE" = "dimensionCallSetPage=%i",
2727
"METHOD_SAMPLE_SIZE" = "dimensionVariantPageSize=%i",
28-
"METHOD_SAMPLE_PAGE" = "dimensionVariantPagePage=%i"
28+
"METHOD_SAMPLE_PAGE" = "dimensionVariantPage=%i"
2929
)
3030

3131

R/read_hap_ids.R

+5-4
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ hapIdsFromSever <- function(conObj, conMethod, conDemo) {
7373
)
7474
)
7575

76+
7677
message(verbInfo[2])
7778
pb <- utils::txtProgressBar(
7879
min = 0,
@@ -92,7 +93,7 @@ hapIdsFromSever <- function(conObj, conMethod, conDemo) {
9293

9394
message(verbInfo[3])
9495
fullResp <- do.call(
95-
what = "cbind",
96+
what = "rbind",
9697
args = lapply(
9798
X = respVector,
9899
FUN = function(x) {
@@ -101,10 +102,10 @@ hapIdsFromSever <- function(conObj, conMethod, conDemo) {
101102
)
102103
)
103104

104-
colnames(fullResp) <- paste0("R", seq_len(ncol(fullResp)))
105-
rownames(fullResp) <- samplesFromServer(conObj, conMethod, conDemo)
105+
rownames(fullResp) <- paste0("R", seq_len(nrow(fullResp)))
106+
colnames(fullResp) <- samplesFromServer(conObj, conMethod, conDemo)
106107

107-
return(fullResp)
108+
return(t(fullResp))
108109
}
109110

110111

R/read_ref_ranges.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refRangesFromServer <- function(conObj, conMethod, conDemo) {
2929
if (conDemo) {
3030
BRAPI_PARAMS$DEMO_N_RR_TOTAL
3131
} else {
32-
BRAPI_PARAMS$MAX_N_RR_SIZE
32+
BRAPI_PARAMS$MAX_N_RR_TOTAL
3333
}
3434
)
3535
)

R/utilities_api_brapi.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ amUrlContextStringBuilder <- function(
3636
BRAPI_PARAMS$REST_KV_SEP,
3737
BRAPI_PARAMS$METHOD_SAMPLE_PAGE
3838
),
39-
methodId, rrPageSize, samplePageSize, rrPage, samplePage
39+
methodId, rrPageSize, samplePageSize, samplePage, rrPage
4040
)
4141

4242
return(amContextString)

vignettes/rphg_walkthrough.Rmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ If you would like to use a PHG web service, we can use the following
8585
similar method:
8686

8787
```{r, echo=TRUE, eval=TRUE}
88-
"demo.hub.maizegenetics.net" |> PHGServerCon()
88+
"phg.maizegdb.org" |> PHGServerCon()
8989
```
9090

9191
Here, a URL pointing to a PHG web service is supplied to the

0 commit comments

Comments
 (0)