<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bowtiedb(fa, keepDB):
 """ make bowtie db """

    btdir = '%s/bt2' % (os.getcwd())
    # make directory for
    if not os.path.exists(btdir):
        os.mkdir(btdir)
    btdb = '%s/%s' % (btdir, fa.rsplit('/', 1)[-1])
    if keepDB is True:
        if os.path.exists('%s.1.bt2' % (btdb)):
            return btdb
    p = subprocess.Popen('bowtie2-build -q %s %s' \
        % (fa, btdb), shell = True)
    p.communicate()
    return btdb