#!python

import os
import sys
script_dir = os.path.dirname(os.path.realpath(__file__))
if __name__ == "__main__":
    sys.path.append(os.path.join(script_dir, '..', '..'))

import argparse

from rnaglib.utils import graph_io

"""
A downloading script
"""

parser = argparse.ArgumentParser()
parser.add_argument("-r", "--redundancy", default='NR', type=str, help="Do we want all RNA or a non redundant subset ?")
parser.add_argument("-c", "--chop", default=False, action='store_true', help="Shall we chop the big rna into "
                                                                             "smaller spatially coherent graphs")
parser.add_argument("-a", "--annotated", default=False, action='store_true', help="To include graphlets annotations in "
                                                                                  "the graphs for kernel computations.")
parser.add_argument("-o", "--overwrite", default=False, action='store_true', help='To overwrite existing data.')
parser.add_argument("-dl", "--download_dir", default=None, type=str, help='Where to store the downloaded data.')
args, _ = parser.parse_known_args()

graph_io.download_graphs(redundancy='NR', chop=args.chop, annotated=args.annotated, overwrite=args.overwrite,
                         download_dir=args.download_dir, verbose=True)
