[Bioc-sig-seq] trimLRPatterns question

Kunbin Qu KQu at genomichealth.com
Wed Feb 23 05:10:04 CET 2011


Hi, 

I have a 50 cycle RNA-seq run, with variable length of adapters in some reads. The length of the adapter is longer than 50 bp, and the portion in each read could be as high as the full length of 50 cycles, as well as zero bp. When I trim the adapter, I do not want over trim, so the max.Rmismatch parameter I used was shorter than (eg, 3 bp shorter) than the full length, also with more mismatch tolerance for longer portion, less mismatch for short segment. So I wrote like the following:

trimLen<-length(adapter)
trimCoords<-trimLRPatterns(Rpattern=adapter, subject=seqs, max.Rmismatch = c(rep(2,trimLen-15), rep(1, 12)), ranges=T, with.Rindels=TRUE) 

the value for the max.Rmismatch is basically: 
> c(rep(2,trimLen-15), rep(1, 12))
 [1] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1
[39] 1 1 1 1 1 1 1 1 1

So I want to leave the last 3 bp alone (to avoid over-trimming by chance), then followed by 12 bp with 1 mismatch, then 35 bp with 2 mismatch. Somehow when I tried this to the read, it does not seem work, the trimmed reads really do not seem what they should be. Anyone can help me on this? Thanks

-Kunbin


> sessionInfo()
R version 2.11.0 (2010-04-22) 
x86_64-unknown-linux-gnu 

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ShortRead_1.6.2     Rsamtools_1.0.1     lattice_0.19-11    
[4] Biostrings_2.16.7   GenomicRanges_1.0.1 IRanges_1.6.8      

loaded via a namespace (and not attached):
[1] Biobase_2.8.0 grid_2.11.0   hwriter_1.3   tools_2.11.0 
>

______________________________________________________________________
The contents of this electronic message, including any attachments, are intended only for the use of the individual or entity to which they are addressed and may contain confidential information. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this message or any attachment is strictly prohibited. If you have received this transmission in error, please send an e-mail to postmaster at genomichealth.com and delete this message, along with any attachments, from your computer.



More information about the Bioc-sig-sequencing mailing list