<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 <img src="images/JHI_STRAP_Web.png" style="width
Step1:  <p></p>
<div class="alert-success">
<b>It can be useful here to create any output directories that will be used throughout the document.</b>
</div>
The os.makedirs() function allows us to create a new directory, and the exist_ok option will prevent the notebook code from stopping and throwing an error if the directory already exists.
Step2:  <p></p>
<div class="alert-success">
<b>It can be useful here to create helper functions that will be used throughout the document.</b>
</div>
The to_df() function will turn tabular data into a pandas dataframe
<ASSISTANT_TASK:>
Python Code:
# The line below allows the notebooks to show graphics inline
%pylab inline
import io                            # This lets us handle streaming data
import os                            # This lets us communicate with the operating system
import pandas as pd                  # This lets us use dataframes
import seaborn as sns                # This lets us draw pretty graphics
# Biopython is a widely-used library for bioinformatics
# tasks, and integrating with software
from Bio import SeqIO                # This lets us handle sequence data
from Bio.KEGG import REST            # This lets us connect to the KEGG databases
# The bioservices library allows connections to common
# online bioinformatics resources
from bioservices import UniProt      # This lets us connect to the UniProt databases
from IPython.display import Image    # This lets us display images (.png etc) from code
Explanation: <img src="images/JHI_STRAP_Web.png" style="width: 150px; float: right;">
03a - Building a Reproducible Document
Table of Contents
Python Imports/Startup
Biological Motivation
Load Sequence
Build BLAST database
Run BLAST query
Load BLAST results
Query UniProt
Query KEGG
<a id="python_imports"></a>
1. Python Imports/Startup
<p></p>
<div class="alert-success">
<b>It can be very convenient to have all the `Python` library imports at the top of the notebook.</b>
</div>
This is very helpful when running the notebook with, e.g. Cell -&gt; Run All or Kernel -&gt; Restart &amp; Run All from the menu bar, all the libraries are available throughout the document.
End of explanation
# Create a new directory for notebook output
OUTDIR = os.path.join("data", "reproducible", "output")
os.makedirs(OUTDIR, exist_ok=True)
Explanation: <p></p>
<div class="alert-success">
<b>It can be useful here to create any output directories that will be used throughout the document.</b>
</div>
The os.makedirs() function allows us to create a new directory, and the exist_ok option will prevent the notebook code from stopping and throwing an error if the directory already exists.
End of explanation
# A small function to return a Pandas dataframe, given tabular text
def to_df(result):
    return pd.read_table(io.StringIO(result), header=None)
Explanation: <p></p>
<div class="alert-success">
<b>It can be useful here to create helper functions that will be used throughout the document.</b>
</div>
The to_df() function will turn tabular data into a pandas dataframe
End of explanation
<END_TASK>