Description Usage Arguments Details Value Author(s) Examples
View source: R/viRome_functions.R View source: R/make.simple.consensus.R
From aligned data read in by read.bam
and processed by clip.bam
create a consensus sequence
1 | make.simple.consensus(vdf = NULL, reflen = 11703)
|
vdf |
A data frame as produced by |
reflen |
The reference length |
This is a *very simple* way to calculate the consensus sequence, and in general we recommend other tools, such as samtools, for doing this.
Basically, for each location in the reference, this function counts the most common aligned base. These are then returned as a string. By definition the return is the same length as the reference. Indels not handled.
A string of the consensus
Mick Watson
1 2 3 4 | ## 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=12000, removeN=TRUE)
## Not run: bamc <- clip.bam(bam)
## Not run: seq <- make.simple.consensus(bamc)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.