Package picard.pedigree
Class PedFile
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
,PedFile.PedTrio> NavigableMap<String,
,PedFile.PedTrio> SortedMap<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:
-
Nested Class Summary
Nested ClassesNested 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(PedFile.PedTrio trio) Adds a trio to the PedFile keyed by the individual id.static PedFile
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.Scans through the pedigrees and removes all entries that do not have both paternal and maternal ids set.void
Writes a set of pedigrees out to disk.Methods inherited from class java.util.TreeMap
ceilingEntry, ceilingKey, clear, clone, comparator, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, merge, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, putIfAbsent, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
-
Field Details
-
NO_PHENO
-
UNKNOWN_SEX
-
-
Constructor Details
-
PedFile
public PedFile(boolean isTabMode)
-
-
Method Details
-
add
Adds a trio to the PedFile keyed by the individual id. -
write
Writes a set of pedigrees out to disk. -
fromFile
Attempts to read a pedigree file into memory. -
removeIncompleteTrios
Scans through the pedigrees and removes all entries that do not have both paternal and maternal ids set. -
fromSexMap
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.
-