-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
113 lines (84 loc) · 2.66 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# easylift
<!-- badges: start -->
[![GitHub issues](https://img.shields.io/github/issues/nahid18/easylift)](https://github.com/nahid18/easylift/issues)
[![GitHub pulls](https://img.shields.io/github/issues-pr/nahid18/easylift)](https://github.com/nahid18/easylift/pulls)
<!-- badges: end -->
The goal of `easylift` is to perform genomic liftover given `GRanges` and `chain` file.
## Installation
```{r 'install_dev', eval = FALSE}
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("easylift")
```
## Documentation
To view documentation:
```{r doc, eval = FALSE}
browseVignettes("easylift")
```
## Import
Import the libraries
```{r library, eval = FALSE}
library("easylift")
```
Call `easylift` with `GRanges` object, target genome and the chain file.
```{r example, eval = FALSE}
gr <- GRanges(
seqname = Rle(
c("chr1", "chr2"),
c(100000, 100000)
),
ranges = IRanges(
start = 1,
end = 200000
)
)
# Here, "hg19" is the source genome
genome(gr) <- "hg19"
chain <- "hg19ToHg38.over.chain.gz"
# Here, "hg38" is the target genome
easylift(gr, "hg38", chain)
```
### BiocFileCache
To use `BiocFileCache` for the chain file, add it to the cache:
```{r example2, eval = FALSE}
chain_file <- "/path/to/your/hg19ToHg38.over.chain.gz"
bfc <- BiocFileCache()
# Add chain file to cache if already not available
if (nrow(bfcquery(bfc, basename(chain_file))) == 0)
bfcadd(bfc, chain_file)
```
Then, use it in `easylift`:
```{r example3, eval = FALSE}
easylift(gr, "hg38")
# or
gr |> easylift("hg38")
```
## Citation
To cite package `easylift` in publications use:
Al Nahid A, Pagès H, Love M (2023). _easylift: An R package to perform
genomic liftover_. R package version 1.0.0,
<https://github.com/nahid18/easylift>.
A BibTeX entry for LaTeX users is
```
@Manual{,
title = {easylift: An R package to perform genomic liftover},
author = {Abdullah Al Nahid, Hervé Pagès, Michael Love},
year = {2023},
note = {R package version 1.0.0},
url = {https://github.com/nahid18/easylift},
}
```
Please note that the `easylift` was only made possible thanks to many other R and bioinformatics software authors, which are cited either in the vignettes and/or the paper(s) describing this package.
## Code of Conduct
Please note that the `easylift` project is released with a [Contributor Code of Conduct](http://bioconductor.org/about/code-of-conduct/). By contributing to this project, you agree to abide by its terms.