Package org.snpeff.ped

# Class PedEntry

java.lang.Object
org.snpeff.ped.TfamEntry
org.snpeff.ped.PedEntry

All Implemented Interfaces:
  `Comparable<TfamEntry>`, `Iterable<PedGenotype>`

public class PedEntry extends TfamEntry implements Iterable<PedGenotype>
An entry in a PED table. I.e. a line in a PED file (PLINK)

Author:
  pcingola

## Field Summary

### Fields inherited from class org.snpeff.ped.TfamEntry

`PHENOTYPE_CASE, PHENOTYPE_CONTROL, PHENOTYPE_MISSING`

## Constructor Summary

Constructors
Constructor
Description
`PedEntry(PlinkMap plinkMap, String line)`
`PedEntry(PlinkMap plinkMap, String familyId, String id, String fatherId, String motherId, Sex sex, double phenotype, String[] genotypes)`

## Method Summary

Modifier and Type
Method
Description
`int`
`countGenotypes()`
Number of phenotypes available
`PedGenotype`
`getGenotype(int idx)`
Get genotype WARNING: Empty string means that no genotpye is available
`PedGenotype`
`getGenotype(String idStr)`
Get phenotype by String ID
`Collection<String>`
`getGenotypeNames()`
Get all genotype names WARNING: the returned string collection is unsorted!
`String[]`
`getGenotypes()`
`Iterator<PedGenotype>`
`iterator()`
`protected void`
`parse(String line)`
Parse a line form a TFAM file
`protected int`
`parse(String[] fields)`
Parse fields form a line
`int`
`size()`
Number of phenotypes
`String`
`toString()`

### Methods inherited from class org.snpeff.ped.TfamEntry

`compareTo, getFamilyId, getFatherId, getId, getMotherId, getPhenotype, getSex, isCase, isControl, isMissing`

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

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

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

## Constructor Details

### PedEntry

public PedEntry(PlinkMap plinkMap, String line)

### PedEntry

public PedEntry(PlinkMap plinkMap, String familyId, String id, String fatherId, String motherId, Sex sex, double phenotype, String[] genotypes)

## Method Details

### countGenotypes

public int countGenotypes()
Number of phenotypes available

Returns:

### getGenotype

public PedGenotype getGenotype(int idx)
Get genotype WARNING: Empty string means that no genotpye is available

Parameters:
  `idx` -
Returns:

### getGenotype

public PedGenotype getGenotype(String idStr)
Get phenotype by String ID

Parameters:
  `idStr` -
Returns:

### getGenotypeNames

public Collection<String> getGenotypeNames()
Get all genotype names WARNING: the returned string collection is unsorted!

Returns:

### getGenotypes

public String[] getGenotypes()

### iterator

public Iterator<PedGenotype> iterator()

Specified by:
  `iterator` in interface `Iterable<PedGenotype>`

### parse

protected void parse(String line)
Description copied from class: `TfamEntry`
Parse a line form a TFAM file

Overrides:
  `parse` in class `TfamEntry`
Parameters:
  `line` -

### parse

protected int parse(String[] fields)
Description copied from class: `TfamEntry`
Parse fields form a line

Overrides:
  `parse` in class `TfamEntry`
Parameters:
  `fields` -

### size

public int size()
Number of phenotypes

Returns:

### toString

public String toString()

Overrides:
  `toString` in class `TfamEntry`