## Orthologs.Blast.ComparativeGenetics


Main Comparative Genetics class.


Usage

``` python
Orthologs.Blast.ComparativeGenetics(
    project,
    template=None,
    taxon_file=None,
    ref_species=None,
    post_blast=False,
    save_data=True,
    **kwargs
)
```


## Methods

| Name | Description |
|----|----|
| [__init__()](#__init__) | Inherits BaseComparativeGenetics to build a file layer to the Blast workflow. |
| [add_accession()](#add_accession) | Build an accession file after a Blastn run. |
| [add_blast_time()](#add_blast_time) | Build a file that stores the amount of time for each gene to blast. |
| [post_blast_analysis()](#post_blast_analysis) | Write duplicate, missing, and removed-gene results to Excel. |

------------------------------------------------------------------------


#### \_\_init\_\_()


Inherits BaseComparativeGenetics to build a file layer to the Blast workflow.


Usage

``` python
__init__(
    project,
    template=None,
    taxon_file=None,
    ref_species=None,
    post_blast=False,
    save_data=True,
    **kwargs
)
```


This class handles all of the files before and after the Blast occurs. It also uses a building file to start where a previous blast left off.


##### Parameters


`project`  
The name of the project.

`template=None`  
A template accession file in the desired format. See the Blast README for an example.

`taxon_file=None`  
A list of taxon ids in a text file.

`ref_species=None`  
A reference species or organism for the blast query.

`post_blast=``False`  
A flag that triggers the post blast analysis.

`save_data=``True`  
A flag that indicates whether the data should be saved in an excel file or not.

`kwargs={}`  
Mostly used for BaseComparativeGenetics


##### Returns


An API for accessing the various files used before, during, and after blasting.


------------------------------------------------------------------------


#### add_accession()


Build an accession file after a Blastn run.


Usage

``` python
add_accession(gene, organism, accession)
```


It finds whether or not the Blast has been interrupted or not, so that the Blast can pick up where it left off.


##### Parameters


`gene`  
The gene of interest.

`organism`  
The organism of interest.

`accession`  
The accession of interest.


##### Returns


------------------------------------------------------------------------


#### add_blast_time()


Build a file that stores the amount of time for each gene to blast.


Usage

``` python
add_blast_time(gene, organism, start, end)
```


This method is similar to the add_accession() method.


##### Parameters


`gene: str`  
The gene of interest.

`organism: str`  
The organism of interest.

`start: float`  
Starting time.

`end: float`  
Ending time.


------------------------------------------------------------------------


#### post_blast_analysis()


Write duplicate, missing, and removed-gene results to Excel.


Usage

``` python
post_blast_analysis(removed_genes=None)
```
