Module Expr Str ImportFrom alias ClassDef bases body FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert BoolOpOr CompareIsNot AttributeLoad NameLoad attr NameLoad CompareIsNot AttributeLoad NameLoad attr NameLoad Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assert CompareIs Call NameLoad AttributeLoad NameLoad attr NameLoad Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Print Str Assign NameStore Call NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num Assign AttributeStore NameLoad attr ListLoad BinOpDiv Call NameLoad AttributeLoad NameLoad attr NameLoad For NameStore AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert CompareIsNot AttributeLoad NameLoad attr NameLoad Str If CompareIsNot Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr ListLoad AttributeLoad NameLoad attr Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr If CompareGt Call NameLoad AttributeLoad NameLoad attr Num body For NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num body Assert CompareEq AttributeLoad NameLoad attr NameLoad Str If Call AttributeLoad NameLoad attr body For NameStore AttributeLoad NameLoad attr body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Break orelse Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assert CompareNotEq AttributeLoad NameLoad attr NameLoad Str If Call AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad For NameStore AttributeLoad NameLoad attr body Assert CompareEq Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call NameLoad AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assert CompareEq Call NameLoad NameLoad AttributeLoad NameLoad attr Str Assert CompareEq Call NameLoad NameLoad NameLoad Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpOr Call NameLoad AttributeLoad NameLoad attr NameLoad CompareEq Call NameLoad AttributeLoad NameLoad attr Num body Return NameLoad orelse If CompareGt Call NameLoad AttributeLoad NameLoad attr Num body Return NameLoad orelse Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Return NameLoad If CompareGt Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Num body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr decorator_list decorator_list
N/A N/A 
    This module defines the Partition() class, which indicates a particular evolutionary unit. 
 model * Partition N/A N/A __init__ N/A N/A self N/A kwargs N/A N/A 
            Required keyword arguments:
                
                1. **size**, integer giving the root length of this partition (only required when no root sequence is given)
                2. **models** (or **model**), either a single Model object (for cases of branch homogeneity), or a list of Model objects (for cases of branch heterogeneity).
        
            Optional keyword arguments:
            
                1. **root_sequence**, a string giving the ancestral sequence for this partition. Note that, when provided, the **size** argument is not needed.
                2. **root_model_name**, the *name attribute* of the model to be used at the root of the phylogeny. Applicable only to cases of *branch heterogeneity*.

            Examples:
                .. code-block:: python

                   >>> # Define a temporally homogeneous partition
                   >>> my_partition = Partition(models = my_model, size = 500) 
                   
                   >>> # Define a temporally heterogeneous partition, in which three models (model1, model2, and rootmodel) are used during sequence evolution, and rootmodel is the model at the root of the tree
                   >>> my_other_partition = Partition(models = [model1, model2, rootmodel], size = 134, root_model_name = rootmodel.name)       
                
         N/A N/A self size N/A N/A kwargs get size None N/A N/A self MRCA N/A N/A kwargs get root_sequence None N/A N/A self models N/A N/A kwargs get models None N/A N/A N/A self models None N/A N/A N/A self model N/A N/A kwargs get model None N/A N/A self root_model_name N/A N/A kwargs get root_model_name None N/A N/A self _shuffle False N/A N/A self _root_model None N/A N/A N/A self _partition_sanity N/A N/A N/A self _size_MRCA_sanity N/A N/A N/A self MRCA None N/A N/A N/A N/A self _divvy_partition_size N/A _size_MRCA_sanity N/A N/A self N/A N/A N/A 
            Sanity checks and setup for the size and MRCA, if provided.
         N/A N/A N/A N/A self size None N/A N/A self MRCA None 

When defining a Partition object, you must specify either a root sequence or a partition size. N/A N/A N/A self MRCA None N/A N/A N/A N/A type N/A self MRCA str 

The provided root sequence in your Partition object must be a string. N/A N/A N/A self size None N/A N/A 

WARNING: You provided both a size and a root sequence for your Partition. The size argument will be ignored. N/A code_step N/A len N/A N/A N/A self _root_model code N/A 0 N/A N/A self size N/A N/A N/A len N/A self MRCA code_step N/A model N/A self models N/A N/A N/A model rate_probs N/A N/A np array N/A 1.0 N/A N/A model rate_factors N/A N/A np array N/A 1.0 N/A _partition_sanity N/A N/A self N/A N/A N/A  
            Sanity checks that Partition has been properly setup.
         N/A N/A N/A self models None 

No model(s) was/were provided to this Partition. Please check that you have specified a proper model object, or list of model objects, using the keyword 'model' or 'models' (both are accepted). N/A N/A N/A type N/A self models list N/A N/A N/A self models N/A N/A self models N/A code1 N/A N/A N/A self models N/A 0 code N/A N/A N/A len N/A self models 1 N/A N/A m N/A N/A self models N/A 1 N/A N/A N/A N/A m code code1 

Your partitions are evolving according to different codes/alphabets. This is not allowed. N/A N/A N/A self branch_het N/A N/A m N/A self models N/A N/A N/A N/A m name N/A self root_model_name N/A N/A N/A self _root_model m N/A N/A N/A N/A self _root_model N/A N/A self models N/A 0 N/A N/A N/A self _root_model None 
 Root model not properly assigned in your partition. Make sure that you specified a root model name if you have branch heterogeneity! Do so with the argument root_model_name. N/A N/A N/A self site_het N/A N/A N/A self _shuffle True N/A model N/A self models N/A N/A N/A N/A len N/A model rate_probs N/A len N/A N/A self _root_model rate_probs For branch-site models, the number of rate categories must remain constant over the tree in a given partition. N/A _divvy_partition_size N/A N/A self N/A N/A N/A 
            Turn size attribute into a list of different rate-heterogeneity size chunks (based on rate_probs to model object).
            Note that this is *probability-based!* So if you specified 25% for a category, it is not strictly true that 25% of sites will be in that category, but rather that category will occur with a probability of 25%. 
            
            If no rate heterogeneity, will simply be a list of length 1 containing full size.
         N/A nc N/A N/A N/A self _root_model num_classes N/A rate_occurrences N/A N/A N/A np random choice nc N/A int N/A self size p N/A N/A self _root_model rate_probs N/A new_size N/A N/A np bincount rate_occurrences minlength nc N/A N/A N/A sum new_size N/A self size 

Improperly divvied up rate heterogeneity. N/A N/A N/A len new_size nc 

Partition size does not correspond to the number of rate categories. Please report this error. N/A N/A self size N/A list new_size N/A branch_het N/A N/A self N/A N/A N/A  
            Return True if the partition uses branch heterogeneity, and False if homogeneous.
         N/A N/A N/A isinstance N/A self models Model N/A N/A len N/A self models 1 N/A N/A False N/A N/A N/A N/A len N/A self models 1 N/A N/A True N/A N/A N/A AssertionError 

Partition has no associated models. N/A site_het N/A N/A self N/A N/A N/A  
            Return True if the partition uses site/rate heterogeneity, and False if homogeneous.
            Also returns False if an MRCA has been provided, as we do not support rate heterogeneity in this case.
         N/A N/A N/A self MRCA None N/A N/A False N/A N/A N/A N/A N/A N/A self models N/A 0 num_classes 1 N/A N/A True N/A N/A False N/A is_codon_model N/A N/A self N/A N/A N/A 
            Return True if the partition is evolving with dN/dS heterogeneity, and False otherwise.
         N/A N/A N/A N/A N/A self models N/A 0 is_codon_model N/A N/A