Skip to content

Commit

Permalink
tweak help
Browse files Browse the repository at this point in the history
  • Loading branch information
mikelove committed Sep 25, 2023
1 parent 418c410 commit a6de3cb
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: easylift
Title: An R package to perform genomic liftover
Version: 0.99.2
Version: 0.99.3
Date: 2023-09-25
Authors@R:
c(
Expand Down
7 changes: 5 additions & 2 deletions R/easylift.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
#' @param x A GRanges object with genomic coordinates in the original assembly.
#' @param to The target genome assembly (e.g., "hg38").
#' @param chain The path to the chain file containing the liftover mapping.
#' Can be provided in gzipped or non-gzipped format.
#' Can be provided in gzipped or non-gzipped format. If omitted, the function
#' will look in the default BiocFileCache for a properly named chain file.
#'
#' @return A GRanges object with lifted genomic coordinates.
#'
#' @examples
#' # Lift over the coordinates of the first 10 genes in the hg19 assembly
#' # to the hg38 assembly
Expand All @@ -25,7 +28,7 @@
#' easylift(gr, "hg38", chain)
#'
#' # To use `BiocFileCache` for the chain file, you can add it to the cache as follows:
#' # chain_file <- "/path/to/your/chainfile.chain"
#' # chain_file <- "/path/to/your/hg19ToHg38.over.chain.gz"
#' # bfc <- BiocFileCache()
#' # bfcadd(bfc, chain_file)
#'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ To use `BiocFileCache` for the chain file, you can add it to the cache
as follows:

``` r
chain_file <- "/path/to/your/chainfile.chain"
chain_file <- "/path/to/your/hg19ToHg38.over.chain.gz"
bfc <- BiocFileCache()
bfcadd(bfc, chain_file)
```
Expand Down
5 changes: 3 additions & 2 deletions man/easylift.Rd

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

11 changes: 8 additions & 3 deletions vignettes/easylift.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ author:
affiliation:
- "Biostatistics Department, University of North Carolina-Chapel Hill, Chapel Hill, NC, USA"
- "Genetics Department, University of North Carolina-Chapel Hill, Chapel Hill, NC, USA"
email: [email protected]
output: BiocStyle::html_document
vignette: >
%\VignetteIndexEntry{Perform Genomic Liftover}
Expand Down Expand Up @@ -75,9 +74,11 @@ easylift(gr, to, chain)

## BiocFileCache

To use `BiocFileCache` for the chain file, you can add it to the cache as follows:
To use `BiocFileCache` for the chain file, you can add it to the cache
as follows:

```{r bioCache, eval=FALSE}
chain_file <- "/path/to/your/chainfile.chain"
chain_file <- "/path/to/your/hg19ToHg38.over.chain.gz"
bfc <- BiocFileCache()
bfcadd(bfc, chain_file)
```
Expand All @@ -88,6 +89,10 @@ Then, you can use it in `easylift` like this:
gr |> easylift("hg38")
```

`easylift` here will look for a chain file with the proper name
(`genome(gr)` + "To" + Capitalized-`to`-argument + `.over.chain`)
in the BiocFileCache default location.

# Citation

To cite package ‘easylift’ in publications use:
Expand Down

0 comments on commit a6de3cb

Please sign in to comment.