34d621b7f00c1cd42f34eeae1443c24563786fc3,anvio/tables/hmmhits.py,TablesForHMMHits,populate_search_tables,#TablesForHMMHits#Any#,69

Before Change


                                                           target_files_dict["%s:CONTIG" % alphabet],
                                                           rna_alphabet=True if alphabet=="RNA" else False)

        commander = HMMer(target_files_dict, num_threads_to_use=self.num_threads_to_use)

        for source in sources:
            alphabet, context = utils.anvio_hmm_target_term_to_alphabet_and_context(sources[source]["target"])

            kind_of_search = sources[source]["kind"]
            domain = sources[source]["domain"]
            all_genes_searched_against = sources[source]["genes"]
            hmm_model = sources[source]["model"]
            reference = sources[source]["ref"]
            noise_cutoff_terms = sources[source]["noise_cutoff_terms"]

            hmm_scan_hits_txt = commander.run_hmmscan(source,
                                                      alphabet,
                                                      context,
                                                      kind_of_search,
                                                      domain,
                                                      len(all_genes_searched_against),
                                                      hmm_model,
                                                      reference,
                                                      noise_cutoff_terms)

            if not hmm_scan_hits_txt:
                search_results_dict = {}
            else:
                parser = parser_modules["search"]["hmmscan"](hmm_scan_hits_txt, alphabet=alphabet, context=context)
                search_results_dict = parser.get_search_results()

            if not len(search_results_dict):
                run.info_single("The HMM source "%s" returned 0 hits. SAD (but it"s stil OK)." % source, nl_before=1)


            if context == "CONTIG":
                // we are in trouble here. because our search results dictionary contains no gene calls, but contig
                // names that contain our hits. on the other hand, the rest of the code outside of this if statement
                // expects a `search_results_dict` with gene callers id in it. so there are two things we need to do

After Change


        for source in sources:
            threads = []
            for i in range(self.num_threads_to_use):
                new_thread = Thread(target=hmm_worker, args=(i, source))
                new_thread.start()
                threads.append(new_thread)

            for t in threads:
                t.join()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: merenlab/anvio
Commit Name: 34d621b7f00c1cd42f34eeae1443c24563786fc3
Time: 2019-08-23
Author: ozcanesen@gmail.com
File Name: anvio/tables/hmmhits.py
Class Name: TablesForHMMHits
Method Name: populate_search_tables


Project Name: sony/nnabla
Commit Name: f68bcbab2f5126e8dfdac2fd58bca5bcab41785b
Time: 2018-08-06
Author: Yoshiyuki.Kobayashi@jp.sony.com
File Name: python/src/nnabla/utils/cli/cli.py
Class Name:
Method Name: main


Project Name: erikbern/ann-benchmarks
Commit Name: 845a5692cd16a152572e8818dbdecfd5d7a7764a
Time: 2017-12-09
Author: mail@erikbern.com
File Name: ann_benchmarks/runner.py
Class Name:
Method Name: run_docker


Project Name: haotianteng/Chiron
Commit Name: cb40dd779e1f3a7ca23ea25edd03ddaca9472838
Time: 2018-04-29
Author: neven.miculinic@gmail.com
File Name: chiron/chiron_eval.py
Class Name:
Method Name: evaluation