make bowtie db

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