Skip to content

Commit 6936144

Browse files
jimb3claude
andcommitted
Add bd5snpreaders vignette reference and note getsnp Format 5 support
In the Reading SNP data section of usingformat5files.Rmd, add a note that getsnp works with Format 5, and link to the bd5snpreaders vignette for details on the buf/con reader variants. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e280a8d commit 6936144

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: BinaryDosage
22
Title: Creates, Merges, and Reads Binary Dosage Files
3-
Version: 1.0.0.9024
3+
Version: 1.0.0.9025
44
Authors@R:
55
c(person(given = "John",
66
family = "Morrison",

R/RcppExports.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ OpenFormat5FileC <- function(filename) {
4141
.Call(`_BinaryDosage_OpenFormat5FileC`, filename)
4242
}
4343

44-
CloseFormat5FileC <- function(xptr) {
45-
invisible(.Call(`_BinaryDosage_CloseFormat5FileC`, xptr))
44+
CloseFormat5FileC <- function(xptr_sexp) {
45+
invisible(.Call(`_BinaryDosage_CloseFormat5FileC`, xptr_sexp))
4646
}
4747

48-
ReadFormat5SNPC <- function(xptr, start, nbytes, n_samp, dosage, p0, p1, p2) {
49-
.Call(`_BinaryDosage_ReadFormat5SNPC`, xptr, start, nbytes, n_samp, dosage, p0, p1, p2)
48+
ReadFormat5SNPC <- function(xptr_sexp, start, nbytes, n_samp, dosage, p0, p1, p2) {
49+
.Call(`_BinaryDosage_ReadFormat5SNPC`, xptr_sexp, start, nbytes, n_samp, dosage, p0, p1, p2)
5050
}
5151

5252
ReadBinaryDosageDataC <- function(filename, headersize, numsub, snp, dosage, us, base) {

vignettes/usingformat5files.Rmd

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,13 @@ cat("Indices (bytes):", bd5$indices, "\n")
160160
# Reading SNP data
161161

162162
The `getbd5snp` function decompresses and returns the dosage and genotype
163-
probability data for a single SNP.
163+
probability data for a single SNP. The general-purpose `getsnp` function also
164+
works with Format 5 files and can be used as an alternative.
165+
166+
For details on all three Format 5 SNP reader functions — including
167+
`getbd5snp_buf` (pre-allocated output vectors) and `getbd5snp_con` (persistent
168+
file connection for high-throughput loops) — see the
169+
[Reading SNPs from Format 5 Files](bd5snpreaders.html) vignette.
164170

165171
The function takes the following parameters.
166172

0 commit comments

Comments
 (0)