diff --git a/DESCRIPTION b/DESCRIPTION index a3bf3e9..50d78e4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,8 +2,8 @@ Package: SNPRelate Type: Package Title: Parallel Computing Toolset for Relatedness and Principal Component Analysis of SNP Data -Version: 1.17.1 -Date: 2018-12-20 +Version: 1.17.2 +Date: 2019-01-01 Depends: R (>= 2.15), gdsfmt (>= 1.8.3) LinkingTo: gdsfmt Imports: methods diff --git a/NEWS b/NEWS index b953a13..971dffe 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,8 @@ -CHANGES IN VERSION 1.17.1 +CHANGES IN VERSION 1.17.1-1.17.2 ------------------------- - o + o `snpgdsBED2GDS()` allows a single file name without the extended file + names (.bed, .fam, .bim) CHANGES IN VERSION 1.16.0 diff --git a/R/Conversion.R b/R/Conversion.R index 5af996c..365277c 100755 --- a/R/Conversion.R +++ b/R/Conversion.R @@ -438,6 +438,13 @@ snpgdsBED2GDS <- function(bed.fn, fam.fn, bim.fn, out.gdsfn, family=FALSE, { # check stopifnot(is.character(bed.fn), length(bed.fn)==1L) + if (missing(fam.fn) && missing(bim.fn)) + { + fn <- gsub("\\.bed$", "", bed.fn, ignore.case=TRUE) + bed.fn <- paste(fn, ".bed", sep="") + fam.fn <- paste(fn, ".fam", sep="") + bim.fn <- paste(fn, ".bim", sep="") + } stopifnot(is.character(fam.fn), length(fam.fn)==1L) stopifnot(is.character(bim.fn), length(bim.fn)==1L) stopifnot(is.character(out.gdsfn), length(out.gdsfn)==1L) diff --git a/man/snpgdsBED2GDS.Rd b/man/snpgdsBED2GDS.Rd index 6594222..9d0b16f 100644 --- a/man/snpgdsBED2GDS.Rd +++ b/man/snpgdsBED2GDS.Rd @@ -12,9 +12,10 @@ snpgdsBED2GDS(bed.fn, fam.fn, bim.fn, out.gdsfn, family=FALSE, } \arguments{ \item{bed.fn}{the file name of binary file, genotype information} - \item{fam.fn}{the file name of first six columns of \code{".ped"}} - \item{bim.fn}{the file name of extended MAP file: - two extra columns = allele names} + \item{fam.fn}{the file name of first six columns of \code{".ped"}; if it is + missing, } + \item{bim.fn}{the file name of extended MAP file: two extra columns = + allele names; if it is missing, } \item{out.gdsfn}{the output GDS file} \item{family}{if \code{TRUE}, to include family information in the sample annotation}