ped
Below is an auto-generated summary of the xftsim.ped submodule API.
- class xftsim.ped.Pedigree(founder_samples)[source]
Bases:
objectA class representing a pedigree as a graph.
- G
The directed graph representing the pedigree.
- Type:
nx.DiGraph
- generation(K: int):
Returns the subgraph of nodes with generation K.
- generations(gens):
Returns the subgraph of nodes with generations in the given iterable.
- current_generation(K):
Returns the subgraph of nodes in the current generation.
- most_recent_K_generations():
Returns the subgraph of nodes in the most recent K generations.
- _add_edges_from_arrays(x, y):
Adds edges from arrays x and y.
- add_offspring(mating: xft.mate.MateAssignment):
Adds offspring nodes and edges to the pedigree based on a MateAssignment object.
- _get_trios():
TODO
- Parameters:
founder_samples (
SampleMeta)
- property generational_depth
- generations(gens)[source]
Returns the subgraph of nodes with generations in the given iterable.
- Parameters:
gens (
iterable) – An iterable containing generations.- Returns:
nx.subgraph_view– The subgraph of nodes with generations in the given iterable.