# directory where you want the spacer blasting to be done
## CHANGE THIS!
workDir = "/home/nyoungb2/t/CLdb_Ecoli/spacer_pres-abs/"

"""
Explanation: Description:

This notebook goes through the assessment of CRISPR loci presence/absence in the database

Before running this notebook:

run the Setup notebook

User-defined variables
End of explanation
"""


import os
from IPython.display import FileLinks
%load_ext rpy2.ipython

if not os.path.isdir(workDir):
    os.makedirs(workDir)

# checking that CLdb is in $PATH & ~/.CLdb config file is set up
!CLdb --config-params

"""
Explanation: Init
End of explanation
"""


!cd $workDir; \
    CLdb -- subtypePA_ITOL -h

!cd $workDir; \
    CLdb -- subtypePA_ITOL 

"""
Explanation: Pres-abs
Spacer pres-abs table

in ITOL format for easy plotting on a tree
End of explanation
"""


!cd $workDir; \
    CLdb -- subtypePA_ITOL -a

"""
Explanation: Notes
Not a very exciting table!
We can try including loci abundances...
End of explanation
"""


