Skip to content

Commit

Permalink
Merge pull request #541 from adeschen/main
Browse files Browse the repository at this point in the history
Update doc for addGeneBlockGDSRefAnnot() function
  • Loading branch information
adeschen authored Sep 30, 2023
2 parents c51989d + 82f9a00 commit 501b100
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 33 deletions.
22 changes: 12 additions & 10 deletions R/process1KG.R
Original file line number Diff line number Diff line change
Expand Up @@ -819,22 +819,24 @@ getRef1KGPop <- function(gdsReference, popName="superPop") {
#' fileReferenceGDS <- file.path(dataDir, "tests",
#' "ex1_good_small_1KG.gds")
#'
#' ## Open the reference GDS file (demo version)
#' gds1KG <- snpgdsOpen(fileReferenceGDS)
#' \donttest{
#' ## Open the reference GDS file (demo version)
#' gds1KG <- snpgdsOpen(fileReferenceGDS)
#'
#' ## Append information associated to blocks
#' addGeneBlockGDSRefAnnot(gdsReference=gds1KG,
#' ## Append information associated to blocks
#' addGeneBlockGDSRefAnnot(gdsReference=gds1KG,
#' gdsRefAnnotFile=fileAnnotGDS,
#' ensDb=edb,
#' suffixBlockName="EnsDb.Hsapiens.v86")
#'
#' gdsAnnot1KG <- openfn.gds(fileAnnotGDS)
#' print(gdsAnnot1KG)
#' print(read.gdsn(index.gdsn(gdsAnnot1KG, "block.annot")))
#' gdsAnnot1KG <- openfn.gds(fileAnnotGDS)
#' print(gdsAnnot1KG)
#' print(read.gdsn(index.gdsn(gdsAnnot1KG, "block.annot")))
#'
#' ## Close GDS files
#' closefn.gds(gds1KG)
#' closefn.gds(gdsAnnot1KG)
#' ## Close GDS files
#' closefn.gds(gds1KG)
#' closefn.gds(gdsAnnot1KG)
#' }
#'
#' ## Remove temporary file
#' unlink(fileAnnotGDS, force=TRUE)
Expand Down
20 changes: 13 additions & 7 deletions R/process1KG_internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,19 @@ pruning1KGbyChr <- function(gdsReference, method="corr", listSamples=NULL,
#' ## Reference GDS file
#' fileReferenceGDS <- file.path(path1KG, "ex1_good_small_1KG.gds")
#'
#' ## Open the reference GDS file (demo version)
#' gds1KG <- snpgdsOpen(fileReferenceGDS)
#'
#' ## The function returns a data frame containing gene block information
#' matGeneBlock <- RAIDS:::generateGeneBlock(gdsReference=gds1KG, ensDb=edb)
#' print(head(matGeneBlock[grep("ENSG00000157152", matGeneBlock$GName),]))
#' closefn.gds(gds1KG)
#' \donttest{
#' ## Open the reference GDS file (demo version)
#' gds1KG <- snpgdsOpen(fileReferenceGDS)
#'
#' ## The function returns a data.frame containing
#' ## gene block information
#' matGeneBlock <- RAIDS:::generateGeneBlock(gdsReference=gds1KG,
#' ensDb=edb)
#' print(head(matGeneBlock[grep("ENSG00000157152",
#' matGeneBlock$GName),]))
#'
#' closefn.gds(gds1KG)
#' }
#' }
#'
#' @author Pascal Belleau, Astrid Deschênes and Alex Krasnitz
Expand Down
22 changes: 12 additions & 10 deletions man/addGeneBlockGDSRefAnnot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions man/generateGeneBlock.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 501b100

Please sign in to comment.