示例#1
0
def main():
    user_home = find_home_dir()
    project_dp = os.path.join(user_home, 'pdb')
    uni_dp = os.path.join(project_dp, 'uni_data')
    tsv_dp = os.path.join(project_dp, 'tsv_data')
    working_dp = os.path.join(project_dp, 'working')

    dirs = ProjectFolders(
        user_home=user_home,
        project_home=project_dp,
        uni_data=uni_dp,
        tsv_data=tsv_dp,
        working=working_dp
    )
    create_folders(dirs)

    fetch_and_write_files(dirs)
    initial_filtering(dirs)
    fetcher = UniProtFetcher(dirs)
    fetcher.fetch_fasta_files()
    second_filtering(dirs)
    final_filtering(dirs)
    uniprot_composite(dirs)
    print("Processing finished successfully.")
    return None
示例#2
0
 def _generate_dir_names(self, project_name='pdb'):
     user_home = find_home_dir()
     project_dp = os.path.join(user_home, 'pdb')
     uni_dp = os.path.join(project_dp, 'uni_data')
     tsv_dp = os.path.join(project_dp, 'tsv_data')
     working_dp = os.path.join(project_dp, 'working')
     self.dirs = ProjectFolders(
         user_home=user_home,
         project_home=project_dp,
         uni_data=uni_dp,
         tsv_data=tsv_dp,
         working=working_dp
     )
     return None
示例#3
0
def _create_logfile_path(log_file_name):
    """Create a path name for a log handler in user home."""
    home_dp = find_home_dir()
    log_path = os.path.join(home_dp, log_file_name)
    return log_path