Package org.snpsift

# Class SnpSiftCmdCaseControl

java.lang.Object
org.snpsift.SnpSift
org.snpsift.SnpSiftCmdCaseControl

All Implemented Interfaces:
  `org.snpeff.snpEffect.commandLine.CommandLine`, `org.snpeff.snpEffect.VcfAnnotator`

public class SnpSiftCmdCaseControl extends SnpSift
Count number of cases and controls

Author:
  pablocingolani

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Boolean[]`
`caseControl`
`protected String`
`groups`
`protected org.snpeff.ped.PedPedigree`
`pedigree`
`protected double`
`pvalueThreshold`
`static final int`
`SHOW_EVERY`
`protected String`
`tfamFile`
`protected boolean`
`useChiSquare`
`static final String`
`VCF_INFO_CASE`
`static final String`
`VCF_INFO_CC_ALL`
`static final String`
`VCF_INFO_CC_DOM`
`static final String`
`VCF_INFO_CC_GENO`
`static final String`
`VCF_INFO_CC_REC`
`static final String`
`VCF_INFO_CC_TREND`
`static final String`
`VCF_INFO_CONTROL`

### Fields inherited from class org.snpsift.SnpSift

`args, BUILD, command, config, configFile, dataDir, dbFileName, dbTabix, dbType, debug, download, EMPTY_ARGS, errCount, genomeVersion, help, log, needsConfig, needsDb, needsGenome, numWorkers, output, quiet, REVISION, saveOutput, shiftArgs, SHOW_EVERY_VCFLINES, showVcfHeader, showVersion, SOFTWARE_NAME, suppressOutput, vcfHeaderAddProgramVersion, vcfHeaderProcessed, vcfInputFile, verbose, VERSION, VERSION_MAJOR, VERSION_NO_NAME, VERSION_SHORT`

## Constructor Summary

Constructors
Constructor
Description
`SnpSiftCmdCaseControl()`
`SnpSiftCmdCaseControl(String[] args)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`annotate(org.snpeff.vcf.VcfEntry vcfEntry)`
Annotate VCF entry
`protected List<org.snpeff.vcf.VcfHeaderEntry>`
`headers()`
Lines to be added to VCF header
`void`
`init()`
Initialize default values
`protected double`
`pAllelic(int[] nControl, int[] nCase, double pvalueTh)`
Allelic model: Count number of SNPs
`void`
`parseArgs(String[] args)`
Parse command line arguments
`protected double`
`pDominant(int[] nControl, int[] nCase, double pvalueTh)`
Dominant model: Either a/A or A/A causes the disease
`protected double`
`pGenotypic(int[] nControl, int[] nCase)`
Genotypic model (Chi Square)
`protected double`
`pRecessive(int[] nControl, int[] nCase, double pvalueTh)`
Recessive model: Only A/A causes the disease
`protected String`
`processVcfHeader(org.snpeff.fileIterator.VcfFileIterator vcf)`
Process VCF header related issues
`protected double`
`pTrend(int[] nControl, int[] nCase)`
Trend model
`boolean`
`run()`
Load a file compare calls
`List<org.snpeff.vcf.VcfEntry>`
`run(boolean createList)`
Run
`protected void`
`swapMinorAllele(int[] nControl, int[] nCase)`
Swap counts if REF is minor allele (instead of ALT)
`void`
`usage(String msg)`
Show usage message

### Methods inherited from class org.snpsift.SnpSift

`addHeaders, annotateFinish, annotateInit, cmd, commandLineStr, databaseDownload, databaseFind, error, getArgs, getConfig, getConfigFile, getOutput, isOpt, loadConfig, main, openVcfInputFile, setCommand, setCommand, setConfig, setConfigFile, setDbFileName, setDebug, setQuiet, setSaveOutput, setShowVcfHeader, setShowVersion, setSuppressOutput, setVcfHeaderAddProgramVersion, setVerbose, showCmd, showVersion, unSanitize, usageGenericAndDb`

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

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

## Field Details

### SHOW_EVERY

public static final int SHOW_EVERY

See Also:
  - Constant Field Values

### VCF_INFO_CASE

public static final String VCF_INFO_CASE

See Also:
  - Constant Field Values

### VCF_INFO_CONTROL

public static final String VCF_INFO_CONTROL

See Also:
  - Constant Field Values

### VCF_INFO_CC_GENO

public static final String VCF_INFO_CC_GENO

See Also:
  - Constant Field Values

### VCF_INFO_CC_ALL

public static final String VCF_INFO_CC_ALL

See Also:
  - Constant Field Values

### VCF_INFO_CC_DOM

public static final String VCF_INFO_CC_DOM

See Also:
  - Constant Field Values

### VCF_INFO_CC_REC

public static final String VCF_INFO_CC_REC

See Also:
  - Constant Field Values

### VCF_INFO_CC_TREND

public static final String VCF_INFO_CC_TREND

See Also:
  - Constant Field Values

### caseControl

protected Boolean[] caseControl

### tfamFile

protected String tfamFile

### groups

protected String groups

### pedigree

protected org.snpeff.ped.PedPedigree pedigree

### pvalueThreshold

protected double pvalueThreshold

### useChiSquare

protected boolean useChiSquare

## Constructor Details

### SnpSiftCmdCaseControl

public SnpSiftCmdCaseControl()

### SnpSiftCmdCaseControl

public SnpSiftCmdCaseControl(String[] args)

## Method Details

### annotate

public boolean annotate(org.snpeff.vcf.VcfEntry vcfEntry)
Annotate VCF entry

Specified by:
  `annotate` in interface `org.snpeff.snpEffect.VcfAnnotator`
Overrides:
  `annotate` in class `SnpSift`

### headers

protected List<org.snpeff.vcf.VcfHeaderEntry> headers()
Lines to be added to VCF header

Overrides:
  `headers` in class `SnpSift`

### init

public void init()
Description copied from class: `SnpSift`
Initialize default values

Overrides:
  `init` in class `SnpSift`

### pAllelic

protected double pAllelic(int[] nControl, int[] nCase, double pvalueTh)
Allelic model: Count number of SNPs

### parseArgs

public void parseArgs(String[] args)
Description copied from class: `SnpSift`
Parse command line arguments

Specified by:
  `parseArgs` in interface `org.snpeff.snpEffect.commandLine.CommandLine`
Overrides:
  `parseArgs` in class `SnpSift`

### pDominant

protected double pDominant(int[] nControl, int[] nCase, double pvalueTh)
Dominant model: Either a/A or A/A causes the disease

### pGenotypic

protected double pGenotypic(int[] nControl, int[] nCase)
Genotypic model (Chi Square)

### pRecessive

protected double pRecessive(int[] nControl, int[] nCase, double pvalueTh)
Recessive model: Only A/A causes the disease

### processVcfHeader

protected String processVcfHeader(org.snpeff.fileIterator.VcfFileIterator vcf)
Description copied from class: `SnpSift`
Process VCF header related issues

Overrides:
  `processVcfHeader` in class `SnpSift`

### pTrend

protected double pTrend(int[] nControl, int[] nCase)
Trend model

### run

public boolean run()
Load a file compare calls

Specified by:
  `run` in interface `org.snpeff.snpEffect.commandLine.CommandLine`
Overrides:
  `run` in class `SnpSift`

### run

public List<org.snpeff.vcf.VcfEntry> run(boolean createList)
Run

Parameters:
  `createList` - : Is true , create a list of VcfEntries (used in test cases)
Returns:
  A list of VcfEntry is createList is true

### swapMinorAllele

protected void swapMinorAllele(int[] nControl, int[] nCase)
Swap counts if REF is minor allele (instead of ALT)

### usage

public void usage(String msg)
Show usage message

Specified by:
  `usage` in interface `org.snpeff.snpEffect.commandLine.CommandLine`
Overrides:
  `usage` in class `SnpSift`