Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/coverage_matrix_bwtool.R
Given a set of genomic regions as created by
expressed_regions, this
function computes the coverage matrix using bwtool
. You can
then scale the counts to a 40 million 100 bp reads library using
scale_counts.
1 2 3 4 5 |
project |
A character vector with one SRA study id. |
regions |
A GRanges-class object with regions for which to calculate the coverage matrix. |
bwtool |
The path to |
bpparam |
A BiocParallelParam-class instance which will be used to calculate the coverage matrix in parallel. By default, SerialParam-class will be used. |
outdir |
The destination directory for the downloaded file(s) that were
previously downloaded with download_study. If the files are missing,
but |
verbose |
If |
sumsdir |
The path to an existing directory where the |
bed |
The path to the BED file for the regions. You are responsible
for making sure that the BED file and the regions are in the same order.
Could be useful for a scenario where you have a BED file and import it to
define |
url_table |
A custom data.frame named with the same columns as
|
commands_only |
If |
pheno |
|
overwrite |
Logical, whether to overwrite output files. |
... |
Additional arguments passed to download_study when
|
When using outdir = NULL
the information will be accessed
from the web on the fly. If you encounter internet access problems, it might
be best to first download the BigWig files using download_study. This
might be the best option if you are accessing all chromosomes for a given
project and/or are thinking of using different sets of regions
(for
example, from different cutoffs applied to expressed_regions).
If you are working at JHPCE (and part of leekgroup
) or at SciServer,
the files will be located automatically.
Check also system.file('extdata', 'jhpce', package = 'recount.bwtool')
for some scripts that will run this function for all the projects we have
available at JHPCE.
A RangedSummarizedExperiment-class object with the counts stored in the assays slot.
Leonardo Collado-Torres
coverage_matrix, download_study, findRegions, railMatrix
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | if(.Platform$OS.type != 'windows') {
## Disable the example for now. I'd have to figure out how to install
## bwtool on travis
if(FALSE) {
## Reading BigWig files is not supported by rtracklayer on Windows
## (only needed for defining the regions in this example)
## Define expressed regions for study DRP002835, chrY
regions <- expressed_regions('DRP002835', 'chrY', cutoff = 5L,
maxClusterGap = 3000L)
## Now calculate the coverage matrix for this study
rse <- coverage_matrix_bwtool('DRP002835', regions)
## Scale counts
rse_scaled <- scale_counts(rse, round = FALSE)
}
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.