Have you looked at the help page for matchProbePairs?
Usage:
matchProbePair(Fprobe, Rprobe, subject, algorithm="auto", logfile=NULL, verbose=FALSE)
Arguments:
Fprobe: The forward probe.
Rprobe: The reverse probe.
subject: A DNAString object (or an XStringViews object with a
DNAString subject) containing the target sequence.
A BSgenome object is definitely not a DNAString object. There are also examples!
Examples:
library(BSgenome.Dmelanogaster.UCSC.dm3)
subject <- Dmelanogaster$chr3R
## With 20-nucleotide forward and reverse probes:
Fprobe <- "AGCTCCGAGTTCCTGCAATA"
Rprobe <- "CGTTGTTCACAAATATGCGG"
matchProbePair(Fprobe, Rprobe, subject) # 1 "theoretical amplicon"
## With shorter forward and reverse probes, the risk of having multiple
## "theoretical amplicons" increases:
Fprobe <- "AGCTCCGAGTTCC"
Rprobe <- "CGTTGTTCACAA"
before posting the question, I spent a lot of time on that help page and I tried many other combinations, inluding putting Hsapiens$chr11 (where my primers are) as subject, without success.
Is it possible to use matchProbePair with the whole human genome? Is there a different package/function I should look into (I'm new to Bioconductor)? I need to get coordinates for 500 primer pairs, so In-Silico-PCR from UCSC browser is not an option.
Thank you
Well that was on hg38. For completeness, here is hg19
> testF <- DNAString("CACGGCCGCAGTCCCAATCA")
> testR <- DNAString("TGGGCATGCGCAACCTCTCG")
> matchProbePair(testF, testR, Hsapiens$chr11)
Views on a 135006516-letter DNAString subject
subject: NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN...NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
views:
start end width
[1] 67250303 67250818 516 [CACGGCCGCAGTCCCAATCAATTC...AGGCGAGAGGTTGCGCATGCCCA]
That sounds like a lot of PCR primer pairs. But if you really need to do something like that, you could just set up a loop for each chromosome where you run matchProbePair for each of the PCR primers that are supposed to bind to that chromosome. There may be some other, better trick than that, and if so hopefully Herve Pages will see this post and let you know what that is.
before posting the question, I spent a lot of time on that help page and I tried many other combinations, inluding putting Hsapiens$chr11 (where my primers are) as subject, without success. Is it possible to use matchProbePair with the whole human genome? Is there a different package/function I should look into (I'm new to Bioconductor)? I need to get coordinates for 500 primer pairs, so In-Silico-PCR from UCSC browser is not an option. Thank you
Well you would have to show some code. If I do that, it seems to work OK.
Well that was on hg38. For completeness, here is hg19
That sounds like a lot of PCR primer pairs. But if you really need to do something like that, you could just set up a loop for each chromosome where you run
matchProbePair
for each of the PCR primers that are supposed to bind to that chromosome. There may be some other, better trick than that, and if so hopefully Herve Pages will see this post and let you know what that is.It works now for chr11 example. I'll loop through the chromosomes to get the matches in the the whole genome. Thanks for your help!
I now found everything I need to search Genomes for patterns in the excellent guide by Hervé Pages! https://bioconductor.org/packages/release/bioc/vignettes/BSgenome/inst/doc/GenomeSearching.pdf