Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/coverage_matrix.R
Given a set of genomic regions as created by expressed_regions, this function computes the coverage matrix for a library size of 40 million 100 bp reads for a given SRA study.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
project |
A character vector with one SRA study id. |
chr |
A character vector with the name of the chromosome. |
regions |
A GRanges-class object with regions
for |
chunksize |
A single integer vector defining the chunksize to use for
computing the coverage matrix. Regions will be split into different chunks
which can be useful when using a parallel instance as defined by
|
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 |
chrlen |
The chromosome length in base pairs. If it's |
verbose |
If |
verboseLoad |
If |
scale |
If |
round |
If |
... |
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).
Alternatively check the SciServer
section on the vignette to see
how to access all the recount data via a R Jupyter Notebook.
If you have bwtool
installed, you can use
https://github.com/LieberInstitute/recount.bwtool for faster results.
Note that you will need to run scale_counts after running
coverage_matrix_bwtool()
.
A RangedSummarizedExperiment-class object with the counts stored in the assays slot.
Leonardo Collado-Torres
download_study, findRegions, railMatrix
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | if (.Platform$OS.type != "windows") {
## Reading BigWig files is not supported by rtracklayer on Windows
## 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("DRP002835", "chrY", regions)
## One row per region
identical(length(regions), nrow(rse))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.