data['rec_crossed_model']), output = "test_crossed_results_" + args.output, base_folder = base_folder, folder="") #Read scores if algorithm == "CROSSED" or algorithm == "REC": crossed_scores = functions.read_crossed( filename = crossed_output, original = args.test, length = length) ric_scores = None rric_scores = None else: crossed_scores = None if algorithm != "CROSSED": if algorithm != "rRIC": ric_scores = functions.read_ric(ric_output) else: ric_scores = None if algorithm != "RIC": rric_scores = functions.read_ric(rric_output) else: rric_scores = None #Classify sequences result = functions.classify(algorithm = algorithm, crossed_scores = crossed_scores, ric_scores = ric_scores, rric_scores = rric_scores, data = data, length = length) #Save result functions.save(output = args.output, result = result, algorithm = algorithm, original = args.test,
ric_negatives = functions.convert_ric( filename=args.negative, length=length, output="train_ric_negatives.fasta", folder=unique) #Aply RIC to the test files ric_positives_output = functions.run_ric(test_file=ric_positives, length=length, base_folder=base_folder, training_file=ric_positives, output="test_ric_positives", folder=unique) ric_negatives_output = functions.run_ric(test_file=ric_negatives, length=length, base_folder=base_folder, training_file=ric_positives, output="test_ric_negatives", folder=unique) os.remove(ric_negatives) #Read scores ric_positive_scores = functions.read_ric( filename=ric_positives_output) os.remove(ric_positives_output) ric_negative_scores = functions.read_ric( filename=ric_negatives_output) os.remove(ric_negatives_output) ric_value_fdr = functions.get_threshold_unique( positive = ric_positive_scores, negative = ric_negative_scores, optim = "FDR") ric_value_sen = functions.get_threshold_unique( positive = ric_positive_scores, negative = ric_negative_scores, optim = "SEN") #Do CRoSSeD