コード例 #1
0
ファイル: rec_test.py プロジェクト: evocell/rec
                folder = "", extra = data['extra'])
    else:
        if algorithm == "REC":
            crossed_test = functions.convert_crossed(
                    filename = args.test, length = length, 
                    output = "test_crossed_" + args.output, 
                    features = data['rec_crossed_features'], 
                    positive = True, folder = "", extra = data['extra'])
        ric_test = functions.convert_ric(filename = args.test, 
                length = length, output = "test_ric_" + args.output,
                folder = "")

    #Apply algorithms
    if algorithm == "CROSSED":
        crossed_output =  functions.run_crossed(filename=crossed_test,
                model=os.path.join(model, data['crossed_model']),
                output="test_crossed_results_" + args.output,
                base_folder=base_folder, folder="")
    else:
        if algorithm != "rRIC":
            ric_output = functions.run_ric(test_file = ric_test,
                    length = length, base_folder = base_folder, 
                    training_file = os.path.join(os.path.join(
                        base_folder, "Data"), "classic_mouse_" + str(
                        length-16) + ".fasta"), output = 
                        "test_ric_results_" + args.output, folder="")
        if algorithm != "RIC":
            rric_output = functions.run_ric(test_file = ric_test, 
                    length = length, base_folder = base_folder, 
                    training_file = os.path.join(model, 
                        data['ric_template']), output = 
                    "test_rric_results_" + args.output, folder = "")
コード例 #2
0
ファイル: rec_train.py プロジェクト: evocell/rec
         output="train_crossed_positives.fasta",
         features=features, positive=True, folder=unique, 
         extra=extra)
 crossed_negatives = functions.convert_crossed(
         filename=args.negative,
         length=length,
         output="train_crossed_negatives.fasta",
         features=features, positive=False, folder=unique, 
         extra=extra)
 #Train CRoSSeD model
 model = functions.train_crossed(positive=crossed_positives,
         negative=crossed_negatives, model="CRoSSeD_model",
         unique=unique, base_folder=base_folder)
 #Aply CRoSSeD to input data
 crossed_positives_output = functions.run_crossed(
         filename=crossed_positives, model=model,
         output="test_crossed_positives", base_folder=base_folder,
         folder=unique)
 crossed_negatives_output = functions.run_crossed(
         filename=crossed_negatives, model=model,
         output="test_crossed_negatives", base_folder=base_folder,
         folder=unique)
 #Read scores
 crossed_positive_scores = functions.read_crossed(
         filename=crossed_positives_output, original=args.positive,
         length=length)
 crossed_negative_scores = functions.read_crossed(
         filename=crossed_negatives_output, original=args.negative,
         length=length)
 crossed_value_fdr = functions.get_threshold_unique(
         positive = crossed_positive_scores, 
         negative = crossed_negative_scores,