Biostrings gregexpr2 gives errors while gregexpr works fine
问题 I'm replacing gregexpr with gregexpr2 to detect overlapping matches. When I try. >subSeq 3000-letter "DNAString" instance seq: ACACGTGTTCTATTTTCATTTGCTGACATTTTCTAGTGCATCATTTTTTATTTTATTTTCATT.... gregexpr2("TAAT|ATTA",subSeq) Error in matches[[i]] : subscript out of bounds whereas gregexpr("TAAT|ATTA",subSeq) works fine. What happened? 回答1: It is quite clear if you read gregexpr2 documentation: This is a replacement for the standard gregexpr function that does exact matching only. Standard