-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
128 lines (91 loc) · 4.59 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# txcutr
<!-- badges: start -->
[![R build status](https://github.com/mfansler/txcutr/workflows/R-CMD-check-bioc/badge.svg)](https://github.com/mfansler/txcutr/actions)
[![codecov](https://codecov.io/gh/mfansler/txcutr/branch/bioc-check/graph/badge.svg?token=CGGZP68G67)](https://codecov.io/gh/mfansler/txcutr)
[![Anaconda-Server Badge](https://anaconda.org/merv/r-txcutr/badges/installer/conda.svg)](https://conda.anaconda.org/merv/r-txcutr)
[![Anaconda-Server Badge](https://anaconda.org/merv/r-txcutr/badges/version.svg)](https://anaconda.org/merv/r-txcutr)
<!-- badges: end -->
## Overview
Various mRNA sequencing library preparation methods generate sequencing reads
from the transcript ends. Quantification of isoform usage can be improved by
using truncated versions of transcriptome annotations when assigning such reads
to isoforms. The `txcutr` package implements some convenience methods for
readily generating such truncated annotations and their corresponding sequences.
## Installation instructions
### Bioconductor
Get the latest stable `R` release from [CRAN](http://cran.r-project.org/). Then install `txcutr` using from [Bioconductor](http://bioconductor.org/) the following code:
```{r 'install', eval = FALSE}
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("txcutr")
```
And the development version from [GitHub](https://github.com/mfansler/txcutr) with:
```{r 'install_dev', eval = FALSE}
BiocManager::install("mfansler/txcutr")
```
### Conda/Mamba
Users managing R environments with Conda/Mamba can install the package with:
**Conda**
```bash
conda install -c conda-forge -c bioconda merv::r-txcutr
```
**Mamba**
```bash
mamba install -c conda-forge -c bioconda merv::r-txcutr
```
We strongly encourage users to create dedicated R environments. **Do not
install this in your *base* environment!**
## Example
A typical workflow for `txcutr` involves
- loading an existing annotation as `TxDb` object
- truncating the annotation
- exporting the truncated annotation (GTF)
- exporting supporting files (FASTA, merge TSV)
```{r eval=FALSE}
library(rtracklayer)
library(txcutr)
library(BSgenome.Hsapiens.UCSC.hg38)
## load human genome
hg38 <- BSgenome.Hsapiens.UCSC.hg38
## load human GENCODE annotation
txdb <- makeTxDbFromGFF("gencode.v38.annotaton.gtf.gz", organism="Homo sapiens")
## truncate to maximum of 500 nts
txdb_w500 <- truncateTxome(txdb, maxTxLength=500)
## export annotation
exportGTF(txdb_w500, file="gencode.v38.txcutr_w500.gtf.gz")
## export FASTA
exportFASTA(txdb_w500, genome=hg38, file="gencode.v38.txcutr_w500.fa.gz")
## export merge-table
exportMergeTable(txdb_w500, minDistance=200,
file="gencode.v38.txcutr_w500.merge.tsv.gz")
```
## Citation
Below is the citation output from using `citation('txcutr')` in R. Please
run this yourself to check for any updates on how to cite __txcutr__.
```{r 'citation', eval = requireNamespace('txcutr')}
print(citation('txcutr'), bibtex = TRUE)
```
Please note that the `txcutr` 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 `txcutr` 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.
## Development tools
* Continuous code testing is possible thanks to [GitHub actions](https://www.tidyverse.org/blog/2020/04/usethis-1-6-0/) through `r BiocStyle::CRANpkg('usethis')`, `r BiocStyle::CRANpkg('remotes')`, and `r BiocStyle::CRANpkg('rcmdcheck')` customized to use [Bioconductor's docker containers](https://www.bioconductor.org/help/docker/) and `r BiocStyle::Biocpkg('BiocCheck')`.
* Code coverage assessment is possible thanks to [codecov](https://codecov.io/gh) and `r BiocStyle::CRANpkg('covr')`.
* The [documentation website](http://mfansler.github.io/txcutr) is automatically updated thanks to `r BiocStyle::CRANpkg('pkgdown')`.
* The code is styled automatically thanks to `r BiocStyle::CRANpkg('styler')`.
* The documentation is formatted thanks to `r BiocStyle::CRANpkg('devtools')` and `r BiocStyle::CRANpkg('roxygen2')`.
For more details, check the `dev` directory.
This package was developed using `r BiocStyle::Biocpkg('biocthis')`.