Class 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
  • Constructor Details

  • 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