def centroid_homfold_fast_prep(all_seqs, query, n, len_diff): ml.debug(fname()) assert n >= 1, "Number of sequences for centroid-fast must be greater then 0." if query.annotations['ambiguous']: msgfail = "Query sequence contains ambiguous characters. Can't use centroid-fast." ml.error(msgfail) raise AmbiguousQuerySequenceException(msgfail) nr_na_ld = BA_support.sel_seq_simple(all_seqs, query, len_diff) nr_na_ld_n = nr_na_ld[:int(n)] return nr_na_ld_n
def turbofold_fast(all_seqs, seqs2predict, query, cpu, n, turbofold_params, len_diff, pkey, sha1val): """Run Turbo-fast prediction - ambiguous sequences cannot be predicted with TurboFold - do not predict sequence twice - seqs2predict must be subset of all_seqs """ ml.debug(fname()) # this is backup (in rboAnalyzer this is handled on higher level) if query.annotations['ambiguous']: msgfail = "Query sequence contains ambiguous characters. Can't use Turbo-fast." ml.error(msgfail) raise exceptions.AmbiguousQuerySequenceException(msgfail) nr_na_ld = BA_support.sel_seq_simple(all_seqs, query, len_diff) return turbofold_ext_nr_fast(seqs2predict, nr_na_ld, cpu, n, turbofold_params, pkey, sha1val)