Ejemplo n.º 1
0
    def run_CalculateRMSD(self):
        """
        Get the PDB input files and run the calculation
        @type self: koala.CalculateRMSD.CalculateRMSD
        """
        try:
            self.path_runs.set_path_execute()
            self.path_runs.set_execution_directory()

            if self.opts.compressedFile == '1':

                inputFiles = self.opts.inputPdbs.split(",")

                for input_f in inputFiles:
                    if zipfile.is_zipfile(input_f):
                        extract_zip_file(input_f, self.path_runs.get_path_execution())
                    else:
                        try:
                            inF = gzip.GzipFile(input_f, 'rb')
                            f = inF.read()
                            inF.close()
                            if f:
                                extract_gz_file(input_f, self.path_runs.get_path_execution())
                        except Exception, e:
                            raise Exception("The input file could not be read.\n%s" % e)
            else:
    def run_SortByFront(self):
        """
        Run the 2PG Sort algorithm to calculate the Pareto fronts and sorting
        @type self: koala.SortByFront.SortByFront
        """

        self.path_runs.set_path_execute()
        self.path_runs.set_execution_directory()

        copy_necessary_files(
            self.path_runs.get_path_execute(),
            self.path_runs.get_path_execution(),
            self.framework.get_framework())

        self.framework.set_parameter(
                'objective_analisys_dimo_source',
                '/home/%s/programs/dimo/DIMO2' % get_logged_user())
        self.framework.set_parameter('Local_Execute', self.path_runs.get_path_execution())
        self.framework.set_parameter(
                'Path_Gromacs_Programs',
                get_path_gromacs())
        self.framework.set_parameter(
                'NativeProtein',
                '%s1VII.pdb' % self.path_runs.get_path_execution())

        NumberObjective, Fitness_Energy = format_fitness(self.opts.inputFitness)

        self.framework.set_parameter('NumberObjective', NumberObjective)
        self.framework.set_parameter('Fitness_Energy', Fitness_Energy)

        create_configuration_file(
            self.path_runs.get_path_execution(), self.framework)

        config = 'configuration.conf'

        if self.opts.compressedFile == '1':

            inputFiles = self.opts.inputPDBs.split(",")

            for input_f in inputFiles:
                if zipfile.is_zipfile(input_f):
                    extract_zip_file(input_f, self.path_runs.get_path_execution())
                else:
                    try:
                        inF = gzip.GzipFile(input_f, 'rb')
                        f = inF.read()
                        inF.close()
                        if f:
                            extract_gz_file(input_f, self.path_runs.get_path_execution())
                    except Exception, e:
                        raise Exception("The input file could not be read.\n%s" % e)
Ejemplo n.º 3
0
    def run_MergePDB(self):
        """
        Get the input PDB files and run to merge
        @type self: koala.MergePDB.MergePDB
        """

        self.path_runs.set_path_execute()
        self.path_runs.set_execution_directory()

        if self.opts.compressedFile == '1':
            if zipfile.is_zipfile(opts.inputPDBs):
                extract_zip_file(opts.inputPDBs, self.path_runs.get_path_execution())
            else:
                try:
                    inF = gzip.GzipFile(opts.inputPDBs, 'rb')
                    f = inF.read()
                    inF.close()
                    if f:
                        extract_gz_file(opts.inputPDBs, self.path_runs.get_path_execution())
                except Exception, e:
                    raise Exception("The input file could not be read.\n%s" % e)
Ejemplo n.º 4
0
    def build_rankingDominance(self):
        """
        Create the 2PG Sort configuration file and build the dominance
        @type self: koala.DominanceRanking.DominanceRanking
        """

        self.path_runs.set_path_execute()
        self.path_runs.set_execution_directory()

        copy_necessary_files(
            self.path_runs.get_path_execute(),
            self.path_runs.get_path_execution(),
            self.framework.get_framework())

        self.framework.set_parameter(
                    'objective_analisys_dimo_source',
                    '/home/%s/programs/dimo/DIMO2' % get_logged_user())
        self.framework.set_parameter('Local_Execute', self.path_runs.get_path_execution())
        self.framework.set_parameter('Path_Gromacs_Programs', get_path_gromacs())
        self.framework.set_parameter(
            'NativeProtein', '%s1VII.pdb' % self.path_runs.get_path_execution())

        self.combinations = format_fitness(self.opts.inputFitness, self.opts.toolname)

        if self.opts.compressedFile == '1':

            inputFiles = self.opts.inputPDBs.split(",")

            for input_f in inputFiles:
                if zipfile.is_zipfile(input_f):
                    extract_zip_file(input_f, self.path_runs.get_path_execution())
                else:
                    try:
                        inF = gzip.GzipFile(input_f, 'rb')
                        f = inF.read()
                        inF.close()
                        if f:
                            extract_gz_file(input_f, self.path_runs.get_path_execution())
                    except Exception, e:
                        raise Exception("The input file could not be read.\n%s" % e)