I'm struggling to understand how score thresholds for a given PSSM are calculated in biopython. In the bio.motifs module, you can access the motif PSSM score distribution as an object. When searching for motif matches in a given sequence, you can specify the false positive rate (fpr) you want as a parameter for getting a score threshold that afterwards serves to filter out all positions in the sequence which score below that threshold in the PSSM.
My question then is, how does biopython (or maybe as well, how does any program) calculate that threshold given a score distribution and the fpr requested? The documentation mentions that the fpr is the "probability" of finding a motif instance in background generated sequence, but it fails to give any specifics about the length of the background generated sequence and what exactly does a "motif instance" mean.
Any help would be greatly appreciated