Package org.snpeff.ped
Class PedEntry
- java.lang.Object
-
- org.snpeff.ped.TfamEntry
-
- org.snpeff.ped.PedEntry
-
- All Implemented Interfaces:
java.lang.Comparable<TfamEntry>
,java.lang.Iterable<PedGenotype>
public class PedEntry extends TfamEntry implements java.lang.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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
countGenotypes()
Number of phenotypes availablePedGenotype
getGenotype(int idx)
Get genotype WARNING: Empty string means that no genotpye is availablePedGenotype
getGenotype(java.lang.String idStr)
Get phenotype by String IDjava.util.Collection<java.lang.String>
getGenotypeNames()
Get all genotype names WARNING: the returned string collection is unsorted!java.lang.String[]
getGenotypes()
java.util.Iterator<PedGenotype>
iterator()
protected void
parse(java.lang.String line)
Parse a line form a TFAM fileprotected int
parse(java.lang.String[] fields)
Parse fields form a lineint
size()
Number of phenotypesjava.lang.String
toString()
-
Methods inherited from class org.snpeff.ped.TfamEntry
compareTo, getFamilyId, getFatherId, getId, getMotherId, getPhenotype, getSex, isCase, isControl, isMissing
-
-
-
-
Method Detail
-
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(java.lang.String idStr)
Get phenotype by String ID- Parameters:
idStr
-- Returns:
-
getGenotypeNames
public java.util.Collection<java.lang.String> getGenotypeNames()
Get all genotype names WARNING: the returned string collection is unsorted!- Returns:
-
getGenotypes
public java.lang.String[] getGenotypes()
-
iterator
public java.util.Iterator<PedGenotype> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<PedGenotype>
-
parse
protected void parse(java.lang.String line)
Description copied from class:TfamEntry
Parse a line form a TFAM file
-
parse
protected int parse(java.lang.String[] fields)
Description copied from class:TfamEntry
Parse fields form a line
-
size
public int size()
Number of phenotypes- Returns:
-
-