covRleFromGR | R Documentation |
Convert GRanges to covRle
covRleFromGR(x, weight = "AUTO", ignore.strand = FALSE)
x |
a GRanges, GAlignment or GAlignmentPairs object. Note that coverage calculation for GAlignment is slower, so usually best to call convertToOneBasedRanges on GAlignment object to speed it up. |
weight |
default "AUTO", pick 'score' column if exist, else all are 1L. Can also be a manually assigned meta column like 'score2' etc. |
ignore.strand |
logical, default FALSE. |
covRle object
Other covRLE:
covRle
,
covRle-class
,
covRleList
,
covRleList-class
seqlengths <- as.integer(c(200, 300))
names(seqlengths) <- c("chr1", "chr2")
gr <- GRanges(seqnames = c("chr1", "chr1", "chr2", "chr2"),
ranges = IRanges(start = c(10, 50, 100, 150), end = c(40, 80, 129, 179)),
strand = c("+", "+", "-", "-"), seqlengths = seqlengths)
cov_both_strands <- covRleFromGR(gr)
cov_both_strands
cov_ignore_strand <- covRleFromGR(gr, ignore.strand = TRUE)
cov_ignore_strand
strandMode(cov_both_strands)
strandMode(cov_ignore_strand)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.