[BioC] a possible bug of trimLRPatterns

wang peter wng.peter at gmail.com
Fri Mar 9 01:40:06 CET 2012


	reads <- readFastq(fastqfile);
	seqs <- sread(reads);	
	max.mismatchs <- mismatch_rate*1:nchar(DNAString(PCR2rc))
	trimmedCoords <- trimLRPatterns(Rpattern = PCR2rc, subject = seqs,
max.Rmismatch= max.mismatchs, with.Rindels=T,ranges=T)

> end(trimmedCoords)[1:20]
 [1] 22 18 20 33 14 22 22 20 22 22 22 15 20 37 19 13 20 22  0 34
> start(trimmedCoords)[1:20]
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

there is a "0" in the end of trimmedCoords so i cannot get the trimmed sequences

trimmed3End <- narrow(reads, start=end(trimmedCoords), end=width(reads))

R version 2.14.1 (2011-12-22)
Platform: x86_64-redhat-linux-gnu (64-bit)

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=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=C                 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.12.4    latticeExtra_0.6-19 RColorBrewer_1.0-5
[4] Rsamtools_1.6.3     lattice_0.20-0      Biostrings_2.22.0
[7] GenomicRanges_1.6.7 IRanges_1.12.6

loaded via a namespace (and not attached):
 [1] Biobase_2.14.0     bitops_1.0-4.1     BSgenome_1.22.0    grid_2.14.1
 [5] hwriter_1.3        RCurl_1.91-1       rtracklayer_1.14.4 tools_2.14.1
 [9] XML_3.9-4          zlibbioc_1.0.0

-- 
shan gao
Room 231(Dr.Fei lab)
Boyce Thompson Institute
Cornell University
Tower Road, Ithaca, NY 14853-1801
Office phone: 1-607-254-1267(day)
Official email:sg839 at cornell.edu
Facebook:http://www.facebook.com/profile.php?id=100001986532253



More information about the Bioconductor mailing list