def determineBestComboFromString(self, best_combo_string, combos,
                                     processed_arguments):
        gene_lists = processed_arguments.gene_lists
        combine_gene_lists = processed_arguments.rsen_config.combine_gene_lists
        analysis_type = processed_arguments.analysisType()
        static_features = processed_arguments.static_features
        for combo in combos:
            feature_set_string = GeneListComboUtility.generateFeatureSetString(
                combo, gene_lists, combine_gene_lists, analysis_type,
                static_features)
            if GeneListComboUtility.combosAreEquivalent(
                    feature_set_string, best_combo_string):
                return combo

        raise ValueError(
            "Unable to determine feature set from given combo gene list and feature file combo: "
            + best_combo_string +
            ".\n Please make sure all gene lists and feature files in the combo "
            + "are present in the drug folder.")
 def determineSpecificCombos(self, all_combos):
     specific_combos = self.inputs.specific_combos
     selected_combos = {}
     for specific_combo in specific_combos:
         for combo in all_combos:
             combo_string = self.generateFeatureSetString(combo)
             if specific_combo == combo_string and selected_combos.get(combo_string) is None:
                 selected_combos[combo_string] = combo
             else:
                 equivalent_combos = GeneListComboUtility.combosAreEquivalent(combo_string, specific_combo)
                 if equivalent_combos and selected_combos.get(combo_string) is None:
                     selected_combos[combo_string] = combo
     selected_combo_names = SafeCastUtil.safeCast(selected_combos.keys(), list)
     if len(selected_combo_names) < len(specific_combos):
         self.log.warning("Not all specified combos were available in this data folder.\n"
                          "Specified combos: %s\n Selected combos: %s", specific_combos, selected_combo_names)
     else:
         self.log.info("Only running analysis on following combos:\n %s", selected_combo_names)
     return SafeCastUtil.safeCast(selected_combos.values(), list)