https://github.com/bioconductor-source/strandcheckr
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.1%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Basic Info
- Host: GitHub
- Owner: bioconductor-source
- License: gpl-2.0
- Language: R
- Default Branch: devel
- Size: 2.44 MB
Statistics
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Created almost 2 years ago
· Last pushed almost 2 years ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, collapse = TRUE)
```
[](https://travis-ci.org/UofABioinformaticsHub/strandCheckR)
[](http://www.repostatus.org/#active)
[](https://zenodo.org/badge/latestdoi/70646093)
strandCheckR
---
This package aims to check the strandedness of reads in a bam file,
enabling easy detection of any contaminating genomic DNA or other
unexpected sources of contamination.
It can be applied to quantify and remove reads which correspond to putative
double strand DNA within a strand-specific RNA sample.
The package uses a sliding window to scan a bam file and find the number of
positive/negative reads in each window.
It then provides method to plot the proportions of positive/negative stranded
alignments within all windows, which allow users to determine how much the
sample was contaminated, and to determine an appropriate threshold for filtering.
Finally, users can filter putative DNA contamination from any strand-specific
RNAseq sample using their selected threshold.
## Installation
To install the release version from Bioconductor:
```{r installBioc, eval = FALSE}
install.packages("BiocManager")
BiocManager::install("strandCheckR")
```
To install the development version on github (i.e. this version):
```{r installGit, eval=FALSE}
install.packages("BiocManager")
BiocManager::install("UofABioinformaticsHub/strandCheckR")
```
## Quick Usage Guide
Following are the main functions of the package.
- `getStrandFromBamFile()`
To get the number of +/- stranded reads of all sliding windows across a bam
file:
```{r, message=FALSE}
# Load the package and example bam files
library(strandCheckR)
files <- system.file(
"extdata", c("s1.sorted.bam", "s2.sorted.bam"),
package = "strandCheckR"
)
# Find the read proportions from chromosome 10 for the two files
win <- getStrandFromBamFile(files, sequences = "10")
# Tidy up the file name for prettier output
win$File <- basename(as.character(win$File))
win
```
- `plotHist()`
The histogram plot shows you the proportion of +/- stranded reads across all
windows.
```{r plotHist, message=FALSE}
plotHist(
windows = win,
groupBy = "File",
normalizeBy = "File",
scales = "free_y"
)
```
In this example, *s2.sorted.bam* seems to be contaminated with double stranded
DNA, as evidenced by many windows containing a roughly equal proportion of
reads on both strands, whilst *s1.sorted.bam* is cleaner.
- `plotWin()`
The output from `plotWin()` represents each window as a point.
This plot also has threshold lines which can be used to provide guidance as to
the best threshold to choose when filtering windows.
Given a suitable threshold, reads from a positive (resp. negative) window are
kept if and only if the proportion is above (resp. below) the corresponding
threshold line.
```{r plotWin, message=FALSE, warning=FALSE}
plotWin(win, groupBy = "File")
```
- `filterDNA()`
The function `filterDNA()` removes potential double stranded DNA from a bam
file using a selected threshold.
```{r win2, message=FALSE}
win2 <- filterDNA(
file = files[2],
destination = "s2.filtered.bam",
sequences = "10",
threshold = 0.7,
getWin = TRUE
)
```
Comparing the histogram plot of the file before and after filtering shows that
reads from the windows with roughly equal proportions of +/- stranded reads
have been removed.
```{r plotHistAfterFilter, message=FALSE}
win2$File <- basename(as.character(win2$File))
win2$File <- factor(win2$File, levels = c("s2.sorted.bam", "s2.filtered.bam"))
library(ggplot2)
plotHist(win2, groupBy = "File", normalizeBy = "File", scales = "free_y")
```
A more comprehensive vignette is available at https://bioconductor.org/packages/release/bioc/vignettes/strandCheckR/inst/doc/strandCheckR.html
## Support
We recommend that questions seeking support in using the software are posted to
the Bioconductor support forum - https://support.bioconductor.org/ - where they
will attract not only our attention but that of the wider Bioconductor community.
Code contributions, bug reports and feature requests are most welcome.
Please make any pull requests against the master branch at https://github.com/UofABioinformaticsHub/strandCheckR and file issues at https://github.com/UofABioinformaticsHub/strandCheckR/issues
## Author Contributions
- *Thu-Hien To* authored the vast majority of code within the package along with unit tests
- *Thu-Hien To* and *Stephen Pederson* worked closely together on the package design and
methodology
## License
`strandCheckR` is licensed under [GPL >= 2.0](https://www.r-project.org/Licenses/GPL-2)
```{r, echo=FALSE, results='hide'}
## Clean up the files generated by the above
file.remove("s2.filtered.bam", "s2.filtered.bam.bai", "out.stat")
```
Owner
- Name: (WIP DEV) Bioconductor Packages
- Login: bioconductor-source
- Kind: organization
- Email: maintainer@bioconductor.org
- Website: https://bioconductor.org
- Repositories: 1
- Profile: https://github.com/bioconductor-source
Source code for packages accepted into Bioconductor
GitHub Events
Total
Last Year
Dependencies
DESCRIPTION
cran
- BiocGenerics * imports
- GenomeInfoDb * imports
- GenomicAlignments * imports
- GenomicRanges * imports
- IRanges * imports
- Rsamtools * imports
- S4Vectors * imports
- TxDb.Hsapiens.UCSC.hg38.knownGene * imports
- dplyr * imports
- ggplot2 * imports
- grid * imports
- gridExtra * imports
- magrittr * imports
- methods * imports
- reshape2 * imports
- rmarkdown * imports
- stats * imports
- stringr * imports
- BiocStyle * suggests
- knitr * suggests
- testthat * suggests