Skip to content

Commit

Permalink
Update 03-antiSMASHdb-MiBiG.md
Browse files Browse the repository at this point in the history
agregé imagenes de lo outputs en la parte de python
  • Loading branch information
andrespan authored Aug 22, 2024
1 parent 82d93eb commit f05d08e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions _episodes/03-antiSMASHdb-MiBiG.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ data
~~~
{: .language-python}

<a href="{{ page.root }}/fig/21-08-24-chapter9-table.png">
<img src="{{ page.root }}/fig/21-08-24-chapter9-table.png" alt="a dataframe variable the content of the Streptococcus predicted BGC" />
</a>

Now, group the data by the variables Species and BGC type:
~~~
occurences = data.groupby(["Species", "BGC type"]).size().reset_index(name="Occurrences")
Expand All @@ -122,6 +126,10 @@ occurences
~~~
{: .language-python}

<a href="{{ page.root }}/fig/21-08-24-chapter9-occurences.png">
<img src="{{ page.root }}fig/21-08-24-chapter9-occurences.png" alt="the content of the ocurrences grouped by species column" />
</a>

Let's see our first visualization of the BGC content on a heatmap.

~~~
Expand All @@ -132,6 +140,11 @@ plt.show()
~~~
{: .language-python}

<a href="{{ page.root }}fig/21-08-24-chapter9-heatmap.png">
<img src="{{ page.root }}fig/21-08-24-chapter9-heatmap.png" alt="visualization of the BGC content on a heatmap." />
</a>


Now, let's restrict ourselves to _S. agalactiae_.

~~~
Expand All @@ -142,6 +155,10 @@ plt.show()
~~~
{: .language-python}

<a href="{{ page.root }}fig/21-08-24-chapter9.dotplot.png">
<img src="{{ page.root }}fig/21-08-24-chapter9.dotplot.png" alt="visualization of the BGC content of S. agalactiae. on a sctterplot" />
</a>

Finally, let's restrict ourselves to BGC predicted less than 200 times.

~~~
Expand All @@ -154,6 +171,10 @@ plt.show()
~~~
{: .language-python}

<a href="{{ page.root }}fig/21-08-24-chapter9.dotplot2.png">
<img src="{{ page.root }}fig/21-08-24-chapter9.dotplot2.png" alt="visualization of the BGC content on a scatterplot" />
</a>

~~~
filtered_pivot = filtered.pivot(index="BGC type", columns="Species", values="Occurrences")
plt.figure(figsize=(8, 10))
Expand All @@ -162,3 +183,7 @@ plt.show()
~~~
{: .language-python}

<a href="{{ page.root }}fig/21-08-24-chapter9-pivot-filtered.png">
<img src="{{ page.root }}fig/21-08-24-chapter9-pivot-filtered.png" alt="filtered heatmap " />
</a>

0 comments on commit f05d08e

Please sign in to comment.