"""
component_ui.py

Note the places you need to change to make it work for you. 
They are marked with keyword 'TODO'.
"""

import argparse

#==============================================================================
# make a UI 
#==============================================================================
## TODO: pass the name of the component to the 'prog' parameter and a
## brief description of your component to the 'description' parameter.
parser = argparse.ArgumentParser(prog='run_star_fusion', 
                                 description = """
                                 STAR-Fusion further processes the output 
                                 generated by the STAR aligner to map junction 
                                 reads and spanning reads to a reference 
                                 annotation set (using a GTF file, ideally the 
                                 same annotation file used during the STAR 
                                 genome index building process during the 
                                 intial STAR setup).
                                 """)

## TODO: create the list of input options here. Add as many as desired.
parser.add_argument(
                    "-a", "--aggregate_novel_junction_dist", 
                    default = None, 
                    help= """
                    seed default is 5, i.e. non-ref junctions within 5 are merged
                    into single calls.
                    """
                    )

parser.add_argument(
                    "-c", "--ref_cdna_file", 
                    default = None, 
                    help= """
                    path to the reference cDNA sequences fasta file
                    (generated specially based on gtf).
                    """)

parser.add_argument(
                    "-e", "--e_value_threshold", 
                    default = None, 
                    help= """
                    E-value threshold for blast searches (seed default: 0.001).
                    """
                    )

parser.add_argument(
                    "-g", "--ref_gtf_file", 
                    default = None,
                    help= """
                    path to the file with annotated transcripts
                    in the standard GTF format.
                    """)

parser.add_argument(
                    "-j", "--chimeric_junction", 
                    default = None,
                    required = True, 
                    help= """
                    path to "Chimeric.out.junction" file generated 
                    by STAR (when chimeric detection is switched on) which 
                    contains contains junction reads.
                    """)

parser.add_argument(
                    "-n", "--no_blast_filter", 
                    default = None, 
                    help= """
                    do not filter predictions using BLASTN.
                    """
                    )

parser.add_argument(
                    "-p", "--output_prefix", 
                    default = 'star_fusion', 
                    help= """
                    All output files have standard names. However, you can
                    specify a prefix for the file names using this option,
                    e.g.: -p /path/to/output/dir/prefix.
                    """
                    )

parser.add_argument(
                    "--max_promiscuity", 
                    default = None, 
                    help= """
                    maximum number of partners allowed for a given fusion.
                    (seed default is 3.)
                    """
                    )
                    
parser.add_argument(
                    "--min_alt_pct_junction", 
                    default = None, 
                    help= """
                    In the case where multiple candidate fusion breakpoints are
                    reported, only those breakpoints having at least 
                    --min_alt_pct_junction (seed default is 10%%) of the 
                    dominant isoform junction support will be reported. 
                    """)

parser.add_argument(
                    "--min_junction_reads", 
                    default = None, 
                    help= """
                    minimum number of junction-spanning reads required.
                    (seed default is 1.)
                    """
                    )

parser.add_argument(
                    "--min_novel_junction_support", 
                    default = None, 
                    help= """
                    For those breakpoints that do not precisely match at 
                    reference exon junctions, the breakpoint fusion read 
                    support must be at least --min_novel_junction_support
                    (seed default is 10). 
                    """)

parser.add_argument(
                    "--min_sum_frags", 
                    default = None, 
                    help= """
                    minimum fusion support = #junction_reads + #spanning_frags.
                    (seed default is 2.)
                    """
                    )

parser.add_argument(
                    "--tmp_out_dir", 
                    default = None, 
                    help= """
                    temporary ouput directory path.
                    """
                    )

parser.add_argument(
                    "--verbose_level", 
                    default = None, 
                    choices = [1, 2],
                    help= """
                    level of verbosity (seed default is 1).
                    """
                    )

## parse the argument parser.
args, unknown = parser.parse_known_args()
