def from_file(data_file, learn_options, data_file2=None, data_file3=None):
    if learn_options["V"] == 1:  # from Nature Biotech paper

        print learn_options["V"] % "loading V%d data"

        assert not learn_options["weighted"] is not None, "not supported for V1 data"
        annotations, gene_position, target_genes, Xdf, Y = read_V1_data(data_file, learn_options)

        learn_options['binary target name'] = 'average threshold'
        learn_options['rank-transformed target name'] = 'average rank'
        learn_options['raw target name'] = 'average activity'

        # NF: not sure why the line below was uncommented
        # gene_position, selected_ind, target_genes, Xdf, Y = extract_by_organism("mouse", Xdf, Y, gene_position)

    elif learn_options["V"] == 2:  # from Nov 2014, hot off the machines
        Xdf, drugs_to_genes, target_genes, Y, gene_position = read_V2_data(data_file, learn_options)

        # check that data is consistent with sgRNA score
        xx = Xdf['sgRNA Score'].values
        yy = Y['score_drug_gene_rank'].values
        rr,pp = sp.stats.pearsonr(xx, yy)
        assert rr > 0, "data processing has gone wrong as correlation with previous predictions is negative"

        learn_options = set_V2_target_names(learn_options)

    elif learn_options["V"] == 3:  # merge of V1 and V2--this is what is used for the final model
        # these are relative to the V2 data, and V1 will be made to automatically match
        learn_options['binary target name'] = 'score_drug_gene_threshold'
        learn_options['rank-transformed target name'] = 'score_drug_gene_rank'
        learn_options['raw target name'] = None

        Xdf, Y, gene_position, target_genes = mergeV1_V2(data_file, data_file2, learn_options)


    elif learn_options["V"] == 4:  # merge of V1 and V2 and the Xu et al data
        # these are relative to the V2 data, and V1 and Xu et al. will be made to automatically match
        learn_options['binary target name'] = 'score_drug_gene_threshold'
        learn_options['rank-transformed target name'] = 'score_drug_gene_rank'
        learn_options['raw target name'] = None

        Xdf, Y, gene_position, target_genes = merge_all(data_file, data_file2, data_file3, learn_options)


    elif learn_options['V'] == 5:
        learn_options['binary target name'] = 'score_drug_gene_threshold'
        learn_options['rank-transformed target name'] = 'score_drug_gene_rank'
        learn_options['raw target name'] = None

        gene_position, target_genes, Xdf, Y = read_xu_et_al(data_file3)


    # truncate down to 30--some data sets gave us more.
    Xdf["30mer"] = Xdf["30mer"].apply(lambda x: x[0:30])

    return Xdf, Y, gene_position, target_genes
dataset/ETHPy150Open MicrosoftResearch/Azimuth/azimuth/load_data.py/from_file/swapped operands of `%`