

Template ( id, allele_type, peptide, MHC_class, chain_seq, anchors, pdb_path, pdb ) # Add to MHCII data if MHC_class = 'II' : self. Enter value for id and pdb_path' ) # Add to MHCI data if MHC_class = 'I' : self. pdb_path: (str) path to pdb file pdb: (Bio.PDB) Biopython PBD object ''' if not id : if not pdb_path or not pdb : raise ValueError ( 'Structure id or path of. MHC class I typically has 2 anchors, while MHC class II typically has 4. def add_structure ( self, id, allele_type, peptide = '', MHC_class = 'I', chain_seq =, anchors =, pdb_path = False, pdb = False ): ''' Add a single structure to the database Args: id: (str) PDB identifier allele_type: (lst) list of MHC alleles (or allele) peptide: (str) peptide sequence MHC_class: (str) either 'I' or 'II' denoting MHC class I and MHC class II respectively chain_seq: (lst) list of chain sequence(s) for the M and N (Alpha and Beta) chain respectively anchors: (lst) list of integers specifying which residue(s) of the peptide should be fixed as an anchor during the modelling. update_ref_sequences () print ( 'Database correctly generated' ) save ( save ) #Download and parse HLA and MHC sequences reference data if update_ref_sequences : self. MHCII_data = templ except : print ( 'something went wrong parsing %s ' % id ) if save : self. _clean_MHCII_file ( pdb_id = id, data_dir = data_dir ) if templ != None : self. MHCI_data = templ except : pass # Construct the MHCII database if MHCII : # Parse all MHCII files for id in self. _clean_MHCI_file ( pdb_id = id, data_dir = data_dir ) if templ != None : self.
#Star stable database pandora crack download#
download_data ( download = download, data_dir = data_dir ) # Construct the MHCI database if MHCI : # Parse all MHCI files for id in self. Defaults to True Returns: Database object ''' # Download the data self.

update_ref_sequences (bool): If True, downloads and parse reference sequence strcutres.

download (bool): If True, download the structures data from IMGT. Download, clean and add all structures Args: save (str/bool): Filename of database, can be False if you don't want to save the database data_dir (str): Path of data directory. PANDORA_data, MHCI = True, MHCII = True, download = True, update_ref_sequences = True ): '''construct_database(self, save, data_dir = PANDORA.PANDORA_data, MHCI=True, MHCII=True, download=True, update_ref_sequences=True) Construct the database. def construct_database ( self, save, data_dir = PANDORA. parse_pMHCII_pdb ( pdb_id, indir = data_dir + '/PDBs/IMGT_retrieved/IMGT3DFlatFiles', outdir = data_dir + '/PDBs/pMHCII', bad_dir = data_dir + '/PDBs/Bad/pMHCII' ) Returns a list of bad PDBs""" return Database_functions. parse_pMHCI_pdb ( pdb_id, indir = data_dir + '/PDBs/IMGT_retrieved/IMGT3DFlatFiles', outdir = data_dir + '/PDBs/pMHCI', bad_dir = data_dir + '/PDBs/Bad/pMHCI' ) def _clean_MHCII_file ( self, pdb_id, data_dir ): """ Clean all MHCII structures. download_ids_imgt ( 'MH2', data_dir = data_dir, out_tsv = 'all_MHII_IDs.tsv' ) def _clean_MHCI_file ( self, pdb_id, data_dir ): """ Clean all MHCI structures""" return Database_functions. download_ids_imgt ( 'MH1', data_dir = data_dir, out_tsv = 'all_MHI_IDs.tsv' ) self. download_unzip_imgt_structures ( data_dir = data_dir, del_inn_files = True, del_kabat_files = True ) self. PANDORA_data, download = True ): """download_data(self, data_dir = PANDORA.PANDORA_data, download = True) Download all MHC structures and get a two lists that contains all MHCI and MHCII IDs respectively""" if download : print ( 'Downloading structures. Def download_data ( self, data_dir = PANDORA.
