ped
Below is an auto-generated summary of the xftsim.ped submodule API.
- class xftsim.ped.Pedigree(founder_sample_index)
Bases:
object
A class representing a pedigree as a graph.
- G
The directed graph representing the pedigree.
- Type:
nx.DiGraph
- _generation
A dictionary containing node generations.
- Type:
dict
- _fid
A dictionary containing node family IDs.
- Type:
dict
- _generational_depth
The generational depth of the tree.
- Type:
int
- 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
- generation(K)
Returns the subgraph of nodes with generation K.
- Parameters:
K (
int
) – The generation number.- Returns:
nx.subgraph_view
– The subgraph of nodes with generation K.
- property generational_depth
- generations(gens)
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.
- get_current_generation()
Returns the subgraph of nodes in the current generation.
- Parameters:
K (
int
) – The generation number.- Returns:
nx.subgraph_view
– The subgraph of nodes in the current generation.
- get_most_recent_K_generations(K)
Returns the subgraph of nodes in the most recent K generations.
- Returns:
nx.subgraph_view
– The subgraph of nodes in the most recent K generations.