Skip to content

Commit

Permalink
Update 03-horizontalGeneTransfer-TDA.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nselem authored Apr 6, 2024
1 parent 1e95dea commit 85ad45d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions _episodes/03-horizontalGeneTransfer-TDA.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ to import some libraries, then to define functions, and finally to call them to
> To learn more about applications of TDA in genomics, consult the Rabadan book [Topological Data Analysis for Genomics](https://www.amazon.com.mx/Topological-Data-Analysis-Genomics-Evolution/dp/1107159547)
{: .callout}

### Library
### Importing Libraries
To begin, we will import the necessary packages.
~~~
import numpy as np
Expand All @@ -67,8 +67,12 @@ import plotly.graph_objects as go
import plotly.io as pio
~~~
{: .language-python}
### **Fuctions**
These functions calculate a Hamming distance matrix from an array where the columns are genes and the rows are genomes.

### Defining Fuctions
The function `calculate_hamming_matrix` calculates a Hamming distance
matrix from an array where the columns are genes and the rows are genomes.
The hamming distance counts how many differences are in two strings.
We have created several hamming distance functions in the episode functions.
~~~
# Let's assume that "population" is a numpy ndarray with your genomes as rows.
def calculate_hamming_matrix(population):
Expand Down

0 comments on commit 85ad45d

Please sign in to comment.