summarise.by.length: Summarise reads mapped by length of the read and position in...

Description Usage Arguments Value Author(s) Examples

View source: R/viRome_functions.R View source: R/summarise.by.length.R

Description

This function takes the results of read.bam and clip.bam and counts the occurrence of the length of reads mapping to each position in the reference genome

Usage

1
summarise.by.length(vdf = NULL, minlen = 1, maxlen = 37, start = 1, end = 1e+07, strand = NULL)

Arguments

vdf

the results of read.bam and clip.bam

minlen

The minimum length of aligned read to consider

maxlen

The maximum length of aligned read to consider

start

The start position from which alignments should be extracted

end

The end position from which alignments should be extracted

strand

Choose which strand to count reads on. One of either "pos" or "neg". For both strands, set to NULL (the default).

Value

The result is a data.frame, the columns being read lengths, the rows being position in the genome, and the values being counts.

Author(s)

Mick Watson <mick.watson@roslin.ed.ac.uk>

Examples

1
2
3
4
5
6
 ## Not run: infile <- system.file("data/SRR389184_vs_SINV_sorted.bam", package="viRome")
 ## Not run: bam <- read.bam(bamfile=infile, chr="SINV", start=1, end=11703, removeN=TRUE)
 ## Not run: bamc <- clip.bam(bam)
## Not run: dm <- summarise.by.length(bamc)
## Not run: dmp <- summarise.by.length(bamc, strand="pos")
## Not run: dmn <- summarise.by.length(bamc, strand="neg")

mw55309/viRome_legacy documentation built on Dec. 21, 2021, 11:05 p.m.