Spaces:
				
			
			
	
			
			
		Sleeping
		
	
	
	
			
			
	
	
	
	
		
		
		Sleeping
		
	File size: 2,415 Bytes
			
			| c2a02c6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | import os
from pathlib import Path
def manage_files(mode):
    if mode== 1:
        path_to_input_files = Path('input_files')
        path_to_domains = path_to_input_files / 'domains.txt'
        swiss_model_path = path_to_input_files / 'INDEX.json'
        fisher_path = path_to_input_files / 'significant_domains.txt'
        path_to_interfaces = path_to_input_files / 'H_sapiens_interfacesHQ.txt'
        
        path_to_output_files = Path('out_files/pdb')
        os.makedirs(path_to_output_files / 'pdb_structures/', exist_ok=True)
        os.makedirs(path_to_output_files / 'alignment_files/', exist_ok=True)
        os.makedirs(path_to_output_files / 'swissmodel_structures/', exist_ok=True)
        os.makedirs(path_to_output_files / 'modbase_structures/', exist_ok=True)
        os.makedirs(path_to_output_files / 'modbase_structures_individual/', exist_ok=True)
        os.makedirs(path_to_output_files / 'freesasa_files/', exist_ok=True)
        os.makedirs(path_to_output_files / '3D_alignment/', exist_ok=True)
        path_to_alignment_files = path_to_output_files / 'alignment_files'
        path_3D_alignment = path_to_output_files / '3D_alignment'
        path_to_freesasa = path_to_output_files / 'freesasa_files'
        buffer = path_to_output_files / 'file_buffer.txt'
        outpath = path_to_output_files / 'feature_vector.txt'
        return path_to_input_files, path_to_output_files, path_to_domains,fisher_path, path_to_interfaces, buffer
    elif mode == 2:
        path_to_input_files = Path('input_files')
        path_to_domains = path_to_input_files / 'domains.txt'
        fisher_path = path_to_input_files / 'significant_domains.txt'
        alphafold_summary = path_to_input_files / 'alphafold_summary.txt'
        path_to_interfaces = path_to_input_files / 'H_sapiens_interfacesHQ.txt'
        # Unzip before using
        alphafold_path = Path(path_to_input_files/'alphafold_structures')
        path_to_output_files = Path('out_files/alphafold')
        os.makedirs(path_to_output_files, exist_ok=True)
        os.makedirs(path_to_output_files / 'freesasa_files', exist_ok=True)
        os.makedirs(path_to_output_files / 'alignment_files', exist_ok=True)
        os.makedirs(path_to_output_files / '3D_alignment', exist_ok=True)
        return path_to_input_files,path_to_output_files, path_to_domains, fisher_path, path_to_interfaces, alphafold_path, alphafold_summary
 | 
