"--inpath",
                  dest="inpath",
                  metavar="PATH",
                  help="relative input PATH (default: pwd)")

######################## MAIN PART ###########################
if __name__ == '__main__':

    # read in command line options
    (options, args) = parser.parse_args()

    # optional arguments
    inpath = path
    if options.inpath:
        inpath = path + options.inpath
        ana_func.checkPath(inpath)
    outpath = inpath

    summary = {}

    # loop over dataset sources
    for dataset in list(conf.set_data.keys()):
        print(dataset)
        # input directory
        inpath = outpath + '/' + dataset

        # loop over targets
        for target in conf.set_data[dataset]['ids']:
            print(target)

            # load results
# prepare command-line option parser
usage = "usage: %prog [options] arg"
parser = OptionParser(usage)
parser.add_option("-i", "--inpath", dest="inpath", metavar="PATH", help="relative input PATH (default: pwd)")

######################## MAIN PART ###########################
if __name__=='__main__':

    # read in command line options
    (options, args) = parser.parse_args()

    # optional arguments
    inpath = path
    if options.inpath:
        inpath = path+options.inpath
        ana_func.checkPath(inpath)
    outpath = inpath

    summary = {}

    # loop over dataset sources
    for dataset in conf.set_data.keys():
        print dataset
        # input path
        inpath = outpath+'/'+dataset

        # loop over targets
        for target in conf.set_data[dataset]['ids']:
            print target

            # load results
    # read in command line options
    (options, args) = parser.parse_args()

    # required arguments
    if options.filename:
        methods_file = path+options.filename
    else:
        raise RuntimeError('one or more of the required options was not given!')
    methods = ana_func.readMethods(methods_file)

    # optional arguments
    inpath = path+'stat_analysis/'
    if options.inpath:
        inpath = path+options.inpath+'/stat_analysis/'
        ana_func.checkPath(inpath)
    outpath = inpath

    # output file(s)
    outfile = open(outpath+'correlation_tables.dat', 'w')
    texfile = open(outpath+'correlation_tables_latex.dat', 'w') # as latex tabulars

    # loop over methods
    for m in methods:
        print(m)

        # run R script
        R_input = inpath+'fp_ranking_'+m+'.csv'
        ana_func.checkPath(R_input)
        R_output1 = outpath+'friedman_fp_ranking_'+m+'.csv'
        R_output2 = outpath+'friedman_resampled_p_values_'+m+'.csv'
    # read in command line options
    (options, args) = parser.parse_args()

    # required arguments
    if options.filename:
        methods_file = path+options.filename
    else:
        raise RuntimeError('one or more of the required options was not given!')
    methods = ana_func.readMethods(methods_file)

    # optional arguments
    inpath = path+'stat_analysis/'
    if options.inpath:
        inpath = path+options.inpath+'/stat_analysis/'
        ana_func.checkPath(inpath)
    outpath = inpath

    # output file(s)
    outfile = open(outpath+'correlation_tables.dat', 'w')
    texfile = open(outpath+'correlation_tables_latex.dat', 'w') # as latex tabulars

    # loop over methods
    for m in methods:
        print m

        # run R script
        R_input = inpath+'fp_ranking_'+m+'.csv'
        ana_func.checkPath(R_input)
        R_output1 = outpath+'friedman_fp_ranking_'+m+'.csv'
        R_output2 = outpath+'friedman_resampled_p_values_'+m+'.csv'