Question: seqbias : how to correct weight of mapped short reads?
0
7.6 years ago by
Sang Chul Choi230 wrote:
Hi, I wish to smooth rugged coverage of short reads by using seqbias R package. I followed the vignette of seqbias R package to see some bias in mapping of short reads from experiment. I computed bias values for each site of a bacterial genome using the package. Because each site is given a bias value and the value is used as a weight to each site, I think that I could give the weight to short reads that start at the site. Now that I have weight real values not integers for mapped short reads, I wish to compute coverage of short reads with weight (real numbers). I've found out that I can give integer weights as an argument to the function "coverage" of IRanges package as follows. I, however, could not find a similar function to give real numbered weights. I've realized that given real numbered weight, one has to handle real numbers and cannot use Rle functions. I'm wondering if there are ways of sidestepping this problem. I will appreciate any answers. Thank you, SangChul .coverage example with double weights on each of ranges. ===================== x <- IRanges(start=c(-2L, 6L, 9L, -4L, 1L, 0L, -6L, 10L), width=c( 5L, 0L, 6L, 1L, 4L, 3L, 2L, 3L)) > coverage(x) 'integer' Rle of length 14 with 6 runs Lengths: 2 2 4 1 3 2 Values : 3 1 0 1 2 1 > coverage(x,weight=rep(2L,8)) 'integer' Rle of length 14 with 6 runs Lengths: 2 2 4 1 3 2 Values : 6 2 0 2 4 2 =====================
coverage iranges seqbias • 497 views
modified 7.6 years ago by Martin Morgan ♦♦ 24k • written 7.6 years ago by Sang Chul Choi230
0
7.6 years ago by
Martin Morgan ♦♦ 24k
United States
Martin Morgan ♦♦ 24k wrote:
On 04/21/2012 09:17 AM, Sang Chul Choi wrote: > Hi, > > I wish to smooth rugged coverage of short reads by using seqbias R package. I followed the vignette of seqbias R package to see some bias in mapping of short reads from experiment. I computed bias values for each site of a bacterial genome using the package. Because each site is given a bias value and the value is used as a weight to each site, I think that I could give the weight to short reads that start at the site. > > Now that I have weight real values not integers for mapped short reads, I wish to compute coverage of short reads with weight (real numbers). I've found out that I can give integer weights as an argument to the function "coverage" of IRanges package as follows. I, however, could not find a similar function to give real numbered weights. I've realized that given real numbered weight, one has to handle real numbers and cannot use Rle functions. I'm wondering if there are ways of sidestepping this problem. I will appreciate any answers. Maybe scale real values to approximate integer representations, e.g., weight=round(rnorm(length(x))) ? Also there is a GRanges method of coverage, which might be helpful Martin > Thank you, > > SangChul > > .coverage example with double weights on each of ranges. > ===================== > x<- IRanges(start=c(-2L, 6L, 9L, -4L, 1L, 0L, -6L, 10L), > width=c( 5L, 0L, 6L, 1L, 4L, 3L, 2L, 3L)) >> coverage(x) > 'integer' Rle of length 14 with 6 runs > Lengths: 2 2 4 1 3 2 > Values : 3 1 0 1 2 1 >> coverage(x,weight=rep(2L,8)) > 'integer' Rle of length 14 with 6 runs > Lengths: 2 2 4 1 3 2 > Values : 6 2 0 2 4 2 > ===================== > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Computational Biology Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: M1-B861 Telephone: 206 667-2793