addPrimingWeights: Adding priming weights to an AlignedRead object.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/primingWeights.R

Description

This function adds priming weights to an AlignedRead object.

Usage

1
addPrimingWeights(aln, weights = NULL, overwrite = FALSE, ...)

Arguments

aln

An object of class AlignedRead.

weights

A vector of weights as produced by computePrimingWeights.

overwrite

A logical, will a weights entry in the alignData of the aln argument be overwritten?

...

These arguments are passed to computePrimingWeights and are only used if weights are NULL.

Details

If the weights are not supplied, the weights are calculated using the aln object itself.

Value

An object of class AlignedRead with a weights component in its alignData slot.

Author(s)

Kasper Daniel Hansen khansen@jhsph.edu.

References

Hansen, K. D., Brenner, S. E. and Dudoit, S (2010) Biases in Illumina transcriptome sequencing caused by random hexamer priming. Nucleic Acids Res, doi:10.1093/nar/gkq224

See Also

computePrimingWeights and the extended example in the 'Working with ShortRead' vignette.

Examples

1
2
3
4
5
6
7
8
if(require(ShortRead)) {
  bwt.file <- system.file("extdata", "bowtie", "s_1_aligned_bowtie.txt",
                          package="ShortRead")
  aln <- readAligned(bwt.file, type = "Bowtie")
  weights <- computePrimingWeights(aln, weightsLength = 2L)
  aln <- addPrimingWeights(aln, weights = weights)
  head(alignData(aln)$weights)
}

Genominator documentation built on Oct. 31, 2019, 8:56 a.m.