From eeacd0ba75c77d7bf68c998f6fcb2081151fbcdc Mon Sep 17 00:00:00 2001 From: DnlRKorn <6885702+DnlRKorn@users.noreply.github.com> Date: Fri, 26 Jul 2024 16:41:36 -0400 Subject: [PATCH] Set filenames to be based on object settings in all functions loadHistoneMap.py --- parsers/yeast/src/loadHistoneMap.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/parsers/yeast/src/loadHistoneMap.py b/parsers/yeast/src/loadHistoneMap.py index 617462e7..84859adc 100644 --- a/parsers/yeast/src/loadHistoneMap.py +++ b/parsers/yeast/src/loadHistoneMap.py @@ -275,9 +275,8 @@ def fetch_histone_data(self, "CTD:increases_abundance_of"] self.logger.debug('Histone Modifications Mapped to GO Terms!') - csv_fname = f"HistonePTM2GO.csv" histonePTM2GO_df = pd.DataFrame.from_dict(histonePTM2GO) - histonePTM2GO_df.to_csv(os.path.join(output_directory, csv_fname), encoding="utf-8-sig", index=False) + histonePTM2GO_df.to_csv(os.path.join(output_directory, self.histone_mod_to_go_term_file_name), encoding="utf-8-sig", index=False) for chr in chromosome_lengths.keys(): m = int(chromosome_lengths[chr]) for i in range(m): # Create loci nodes for chromosomes @@ -303,7 +302,7 @@ def fetch_histone_data(self, data['histoneMod'].append(ptm) genomelocidf = pd.DataFrame(data) self.logger.debug('Histone Modifications Loci Collected!') - genomelocidf.to_csv(os.path.join(output_directory, HISTONE_LOCI_FILE), encoding="utf-8-sig", index=False) + genomelocidf.to_csv(os.path.join(output_directory, self.histone_mod_list_file_name), encoding="utf-8-sig", index=False) if not generate_gene_mapping: return @@ -336,5 +335,4 @@ def fetch_histone_data(self, genomelocidf = genomelocidf.merge(just_windows, how='inner', on=['chromosomeID', 'start', 'end', 'loci']) self.logger.debug(f"Histone Modifications Mapping Complete!") - csv_f3name = f"HistoneMod2Gene.csv" - genomelocidf.to_csv(os.path.join(output_directory, csv_f3name), encoding="utf-8-sig", index=False) + genomelocidf.to_csv(os.path.join(output_directory, self.histone_mod_to_gene_file_name), encoding="utf-8-sig", index=False)