Exemplo n.º 1
0
    def coord_runner(self):
        df_mt = read_csv(self.mt_csv_dir)
        df_mt[['POSITION']] = df_mt[['POSITION']].astype(str)
        for rosetta_mut_tag in os.listdir(self.mut_pdb_dir):
            pdbid, wtaa, chain, pos, _, mtaa = rosetta_mut_tag.split('_')
            mutant_tag = '_'.join([pdbid, wtaa, chain, pos, mtaa])
            try:
                ph, T, ddg = df_mt.loc[
                    (df_mt.PDB == pdbid) & (df_mt.WILD_TYPE == wtaa) &
                    (df_mt.CHAIN == chain) & (df_mt.POSITION == pos) &
                    (df_mt.MUTANT == mtaa),
                    ['PH', 'TEMPERATURE', 'DDG']].values[0, :]
                thermo = str(ph) + ' ' + str(T)
            except:
                print('[ERROR] mutation %s index failed in %s' %
                      (mutant_tag, self.mt_csv_dir))
                sys.exit(1)

            for k_neighbor in self.k_neighborlst:
                for center in self.centerlst:
                    self.run_cal_wild(mutant_tag, k_neighbor, center, thermo,
                                      ddg)
                    self.run_cal_mutant(rosetta_mut_tag, mutant_tag,
                                        k_neighbor, center, thermo, ddg)

        check_qsub(tag='coord_%s' % self.dataset_name,
                   sleep_time=self.sleep_time)
Exemplo n.º 2
0
 def run_ref(self):
     '''refine mdl0 file'''
     ref_tag = 'rosetta_ref_%s' % self.dataset_name
     qsub_ref(self.homedir, self.refdir, self.outpath_pdb_mdl0,
              self.outpath_ref, ref_tag)
     check_qsub(tag=ref_tag, sleep_time=self.sleep_time)
     self.ref_tagdirlst = [
         self.outpath_ref + '/' + x for x in os.listdir(self.outpath_ref)
     ]
Exemplo n.º 3
0
 def mCSM_runner(self):
     for class_num in self.class_numlst:
         for center in self.centerlst:
             for maximum in self.maximumlst:
                 for step in self.steplst:
                     self.run_wild_mCSM(class_num, center, maximum, step)
                     self.run_mutant_mCSM(class_num, center, maximum, step)
     check_qsub(tag='mCSM_%s' % self.dataset_name,
                sleep_time=self.sleep_time)
Exemplo n.º 4
0
 def run_mut(self):
     mt_csv_dir_rewrite = '%s/%s.csv' % (
         self.outpath_global, self.dataset_name)  ## the rewrite mt_csv
     mut_tag = 'rosetta_mut_%s' % self.dataset_name
     qsub_mut(self.homedir, self.mutdir, self.outpath_ref, self.outpath_mut,
              mt_csv_dir_rewrite, mut_tag)
     check_qsub(tag=mut_tag, sleep_time=self.sleep_time)
     self.mut_tagdirlst = [
         self.outpath_mut + '/' + x for x in os.listdir(self.outpath_mut)
     ]
Exemplo n.º 5
0
 def run_psiblast(self):
     wild_tag = 'psiblast_%s_wt' % self.dataset_name
     mutant_tag = 'psiblast_%s_mt' % self.dataset_name
     blast_tag = 'psiblast_%s' % self.dataset_name
     qsub_wild(app=self.appdir,
               libdir=self.libdir,
               seq_path=self.wild_seq_path,
               qsubid_prefix=wild_tag)
     qsub_mutant(app=self.appdir,
                 libdir=self.libdir,
                 seq_path=self.mutant_seq_path,
                 qsubid_prefix=mutant_tag)
     check_qsub(tag=blast_tag, sleep_time=self.sleep_time)