Change "peptide" references in code to "sequence", adding comments
This commit is contained in:
@@ -8,6 +8,9 @@ public abstract class Equations {
|
||||
return (int) ((Math.random() * (max - min)) + min);
|
||||
}
|
||||
|
||||
//pValue calculation as described in original pairSEQ paper.
|
||||
//Included for comparison with original results.
|
||||
//Not used by BiGpairSEQ for matching.
|
||||
public static double pValue(Integer w, Integer w_a, Integer w_b, double w_ab_d) {
|
||||
int w_ab = (int) w_ab_d;
|
||||
double pv = 0.0;
|
||||
@@ -18,6 +21,9 @@ public abstract class Equations {
|
||||
return pv;
|
||||
}
|
||||
|
||||
//Implementation of the (corrected) probability equation from pairSEQ paper.
|
||||
//Included for comparison with original results.
|
||||
//Not used by BiGpairSEQ for matching.
|
||||
private static double probPairedByChance(Integer w, Integer w_a, Integer w_b, Integer w_ab){
|
||||
BigInteger numer1 = choose(w, w_ab);
|
||||
BigInteger numer2 = choose(w - w_ab, w_a - w_ab);
|
||||
@@ -30,10 +36,9 @@ public abstract class Equations {
|
||||
return prob.doubleValue();
|
||||
}
|
||||
|
||||
/*
|
||||
* This works because nC(k+1) = nCk * (n-k)/(k+1)
|
||||
* Since nC0 = 1, can start there and generate all the rest.
|
||||
*/
|
||||
|
||||
//This works because nC(k+1) = nCk * (n-k)/(k+1)
|
||||
//Since nC0 = 1, can start there and generate all the rest.
|
||||
public static BigInteger choose(final int N, final int K) {
|
||||
BigInteger nCk = BigInteger.ONE;
|
||||
for (int k = 0; k < K; k++) {
|
||||
|
||||
Reference in New Issue
Block a user