Class PedFile

All Implemented Interfaces:
Serializable, Cloneable, Map<String,PedFile.PedTrio>, NavigableMap<String,PedFile.PedTrio>, SequencedMap<String,PedFile.PedTrio>, SortedMap<String,PedFile.PedTrio>

public class PedFile extends TreeMap<String,PedFile.PedTrio>
Represents a .ped file of family information as documented here: http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml Stores the information in memory as a map of individualId -> Pedigree information for that individual
See Also:
  • Field Details

    • NO_PHENO

      public static final Number NO_PHENO
    • UNKNOWN_SEX

      public static final Sex UNKNOWN_SEX
  • Constructor Details

    • PedFile

      public PedFile(boolean isTabMode)
  • Method Details

    • add

      public void add(PedFile.PedTrio trio)
      Adds a trio to the PedFile keyed by the individual id.
    • write

      public void write(File file)
      Writes a set of pedigrees out to disk.
    • fromFile

      public static PedFile fromFile(File file, boolean isTabMode)
      Attempts to read a pedigree file into memory.
    • removeIncompleteTrios

      public PedFile removeIncompleteTrios()
      Scans through the pedigrees and removes all entries that do not have both paternal and maternal ids set.
    • fromSexMap

      public static PedFile fromSexMap(Map<String,Sex> sampleSexes)
      Function that accepts a map from sample-name to its sex and creates a PEDFile documenting the sexes.
      Parameters:
      sampleSexes - a map from sample-name to its sex
      Returns:
      a PedFile object that contains data.