示例#1
0
文件: hotspot.py 项目: jlaw9/TRI_Dev
    def run(self, number=0):
        if number == 0:
            number = hotspothist_mongo.get_next_number()
        else:
            if not hotspothist_mongo.is_hotspot_hist(number):
                self.__log_not_hotspot_number()
                sys.exit(1)
        hotspothist_mongo.add_new_hist(number)
        hotspot_dir = self.__ensure_directory(number)

        if not hotspothist_mongo.has_loaded_hotspots(number):

            if not self.__has_complete_hotspot_vcfs(hotspot_dir):
                # CREATING HOTSPOT FILE
                self.create_hotspot_file(hotspot_dir)

                print "Perform hotspotting"
                print "Load hotspot"

            # ANNOTATING
            annotate = Annotate()
            annovar_input = self.create_annovar_input(hotspot_dir)
            annovar_output = annotate.annotate_hotspot(annovar_input)
            annotate.save_annotations(annovar_output)