Package picard.pedigree

## Class PedFile

- java.lang.Object
- - java.util.AbstractMap<K,​V>
  - - java.util.TreeMap<String,​PedFile.PedTrio>
    - - picard.pedigree.PedFile

- All Implemented Interfaces:
    `Serializable`, `Cloneable`, `Map<String,​PedFile.PedTrio>`, `NavigableMap<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:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `PedFile.PedTrio` |

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `AbstractMap.SimpleEntry<K extends Object,​V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,​V extends Object>`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static Number` | `NO_PHENO` |
    `static Sex` | `UNKNOWN_SEX` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PedFile​(boolean isTabMode)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `add​(PedFile.PedTrio trio)` | Adds a trio to the PedFile keyed by the individual id.
    `static PedFile` | `fromFile​(File file, boolean isTabMode)` | Attempts to read a pedigree file into memory.
    `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.
    `PedFile` | `removeIncompleteTrios()` | Scans through the pedigrees and removes all entries that do not have both paternal and maternal ids set.
    `void` | `write​(File file)` | Writes a set of pedigrees out to disk.

    - ### Methods inherited from class java.util.TreeMap

      `ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, values`

    - ### Methods inherited from class java.util.AbstractMap

      `equals, hashCode, isEmpty, toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `compute, computeIfAbsent, computeIfPresent, equals, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, remove`

- - ### Field Detail

    - #### NO_PHENO

          public static final Number NO_PHENO

    - #### UNKNOWN_SEX

          public static final Sex UNKNOWN_SEX

  - ### Constructor Detail

    - #### PedFile

          public PedFile​(boolean isTabMode)

  - ### Method Detail

    - #### 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.