public final class Pedigree extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Pedigree.IndexedPerson
Helper class, used in the name to member map.
|
Constructor and Description |
---|
Pedigree(PedFileContents contents,
String pedigreeName)
Initialize the object with the members of
contents that have the pedigree name equal to
pedigreeName . |
Pedigree(String name,
Collection<Person> members)
Initialize the object with the given values
|
Modifier and Type | Method and Description |
---|---|
static Pedigree |
constructSingleSamplePedigree(String sampleName) |
com.google.common.collect.ImmutableList<Person> |
getMembers() |
String |
getName() |
com.google.common.collect.ImmutableList<String> |
getNames() |
com.google.common.collect.ImmutableMap<String,Pedigree.IndexedPerson> |
getNameToMember() |
int |
getNMembers() |
boolean |
hasPerson(String name) |
Pedigree |
subsetOfMembers(Collection<String> names)
Obtain subset of members in a pedigree or change order.
|
String |
toString() |
public Pedigree(String name, Collection<Person> members)
name
- the name of the pedigree/familymembers
- list of the memberspublic Pedigree(PedFileContents contents, String pedigreeName) throws PedParseException
contents
that have the pedigree name equal to
pedigreeName
.contents
- contents from the pedigree filepedigreeName
- name of the pedigree to extractPedParseException
- in the case of problems with references to individuals for mother and fatherpublic int getNMembers()
public String getName()
public com.google.common.collect.ImmutableList<Person> getMembers()
public com.google.common.collect.ImmutableMap<String,Pedigree.IndexedPerson> getNameToMember()
public Pedigree subsetOfMembers(Collection<String> names)
Person
is selected that has parents in this
but the parent's name is not in
name
then the Person
will have null
as the parent object.Pedigree
with the members from names
in the given orderpublic static Pedigree constructSingleSamplePedigree(String sampleName)
public boolean hasPerson(String name)
true
if the pedigree contains a sample with the given name
.public com.google.common.collect.ImmutableList<String> getNames()
members
.Copyright © 2016. All rights reserved.