dear harris:
        thank you very much for your help, but i think your method can only
deal with
the special case.
         we need a more general method to remove adaptor and barcode in 3'
or 5'
position.
         so i write such coding to remove 3' adaptor+barcode
PCR2<-
DNAString("CAAGCAGAAGACGGCATACGAGATCGGTCTCGGCATTCCTGCTGAACCGCTCTTCCGATCT")
barcode1 <- DNAString("CGATT")
PCR2<- append(PCR2,barcode1)
PCR2rc<-reverseComplement(PCR2)#
clippedCoords <- trimLRPatterns(Rpattern = PCR2rc, subject =
sread(trimmedReads), max.Rmismatch=0.2, with.Rindels=T,ranges=T)
clippedReads <- narrow(trimmedReads, start=start(clippedCoords),
end=end(clippedCoords))
      but for adaptor on the 5' end
we must find a more general way to recognize them and remove the whole
reads??

shan gao

	[[alternative HTML version deleted]]

