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

      • PedEntry

        public PedEntry​(PlinkMap plinkMap,
                        java.lang.String line)
      • PedEntry

        public PedEntry​(PlinkMap plinkMap,
                        java.lang.String familyId,
                        java.lang.String id,
                        java.lang.String fatherId,
                        java.lang.String motherId,
                        Sex sex,
                        double phenotype,
                        java.lang.String[] genotypes)
    • 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 interface java.lang.Iterable<PedGenotype>
      • parse

        protected void parse​(java.lang.String line)
        Description copied from class: TfamEntry
        Parse a line form a TFAM file
        Overrides:
        parse in class TfamEntry
      • parse

        protected int parse​(java.lang.String[] fields)
        Description copied from class: TfamEntry
        Parse fields form a line
        Overrides:
        parse in class TfamEntry
      • size

        public int size()
        Number of phenotypes
        Returns:
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class TfamEntry