Class TfamEntry

  • All Implemented Interfaces:
    java.lang.Comparable<TfamEntry>
    Direct Known Subclasses:
    PedEntry

    public class TfamEntry
    extends java.lang.Object
    implements java.lang.Comparable<TfamEntry>
    An entry in a TFAM table. I.e. a line in a PLINK's TFAM file
    Author:
    pcingola
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int PHENOTYPE_CASE
      From PLINK's manual: Affection status, by default, should be coded: -9 missing 0 missing 1 unaffected 2 affected
      static int PHENOTYPE_CONTROL  
      static int PHENOTYPE_MISSING  
    • Constructor Summary

      Constructors 
      Constructor Description
      TfamEntry​(java.lang.String line)  
      TfamEntry​(java.lang.String familyId, java.lang.String id, java.lang.String fatherId, java.lang.String motherId, Sex sex, double phenotype)  
    • Field Detail

      • PHENOTYPE_CASE

        public static final int PHENOTYPE_CASE
        From PLINK's manual: Affection status, by default, should be coded: -9 missing 0 missing 1 unaffected 2 affected
        See Also:
        Constant Field Values
    • Constructor Detail

      • TfamEntry

        public TfamEntry​(java.lang.String line)
      • TfamEntry

        public TfamEntry​(java.lang.String familyId,
                         java.lang.String id,
                         java.lang.String fatherId,
                         java.lang.String motherId,
                         Sex sex,
                         double phenotype)
    • Method Detail

      • compareTo

        public int compareTo​(TfamEntry ind)
        Specified by:
        compareTo in interface java.lang.Comparable<TfamEntry>
      • getFamilyId

        public java.lang.String getFamilyId()
      • getFatherId

        public java.lang.String getFatherId()
      • getId

        public java.lang.String getId()
      • getMotherId

        public java.lang.String getMotherId()
      • getPhenotype

        public double getPhenotype()
      • getSex

        public Sex getSex()
      • isCase

        public boolean isCase()
        Is phenotype 'Case'?
        Returns:
      • isControl

        public boolean isControl()
        Is phenotype 'Control'?
        Returns:
      • isMissing

        public boolean isMissing()
        Is phenotype 'Missing'?
        Returns:
      • parse

        protected void parse​(java.lang.String line)
        Parse a line form a TFAM file
        Parameters:
        line -
      • parse

        protected int parse​(java.lang.String[] fields)
        Parse fields form a line
        Parameters:
        fields -
      • toString

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