Package org.snpeff.probablility

# Class RankSumNoReplacementSimulate

java.lang.Object
org.snpeff.probablility.RankSumNoReplacementSimulate

public class RankSumNoReplacementSimulate extends Object
Calculate rank sum probability distribution function (pdf) and cumulative distribution function (cdf). Note: This class assumes that ranks cannot be repeated (selecting without replacement)

Author:
  Pablo Cingolani

## Constructor Summary

Constructors
Constructor
Description
`RankSumNoReplacementSimulate(int numberOfSamples, int n)`

## Method Summary

Modifier and Type
Method
Description
`int`
`getN()`
`int`
`getNumberOfSamples()`
`long[][]`
`getRankSum()`
`int[][]`
`getSamples()`
`void`
`initSamples()`
Initialize samples (ranks: 1 to N)
`static void`
`main(String[] args)`
`double`
`mean(int nt)`
`void`
`randomizeSamples()`
Shufle samples (random ranks)
`void`
`rankSum()`
Calculate rankSums
`double`
`sampleMean(int nt)`
Calculate the mean rankSum for a given 'N_T' (number of ranks to add)
`double`
`sampleVariance(int nt)`
Calculate the variance of rankSum for a given 'N_T' (number of ranks to add)
`void`
`setN(int n)`
`void`
`setNumberOfSamples(int numberOfSamples)`
`void`
`setRankSum(long[][] rankSum)`
`void`
`setSamples(int[][] samples)`
`String`
`toString()`
`double`
`variance(int nt)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### RankSumNoReplacementSimulate

public RankSumNoReplacementSimulate(int numberOfSamples, int n)

## Method Details

### main

public static void main(String[] args)

### getN

public int getN()

### getNumberOfSamples

public int getNumberOfSamples()

### getRankSum

public long[][] getRankSum()

### getSamples

public int[][] getSamples()

### initSamples

public void initSamples()
Initialize samples (ranks: 1 to N)

### mean

public double mean(int nt)

### randomizeSamples

public void randomizeSamples()
Shufle samples (random ranks)

### rankSum

public void rankSum()
Calculate rankSums

### sampleMean

public double sampleMean(int nt)
Calculate the mean rankSum for a given 'N_T' (number of ranks to add)

Parameters:
  `nt` - : number of ranks to add
Returns:
  Mean rank sum value

### sampleVariance

public double sampleVariance(int nt)
Calculate the variance of rankSum for a given 'N_T' (number of ranks to add)

Parameters:
  `nt` - : number of ranks to add
Returns:
  Variance rank sum value

### setN

public void setN(int n)

### setNumberOfSamples

public void setNumberOfSamples(int numberOfSamples)

### setRankSum

public void setRankSum(long[][] rankSum)

### setSamples

public void setSamples(int[][] samples)

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### variance

public double variance(int nt)