def _gen_table(self, output_folder, prefixs, combine, program, log): '''generate the promoter table''' log.write("Running gen_promoter_table.py to generate promoter " "table which is useful for sRNA prediction.\n") log.write("The following files are generated:\n") if combine: strains = prefixs + ["allfasta"] else: strains = prefixs for strain in strains: tss_file = os.path.join(self.tss_path, strain + "_TSS.gff") if (program.lower() == "both") or ( program.lower() == "meme"): for folder in os.listdir(os.path.join(output_folder, strain, "MEME")): csv_file = os.path.join(output_folder, strain, "MEME", folder, "meme.csv") gen_promoter_table(os.path.join(output_folder, strain, "MEME", folder, "meme.txt"), csv_file, tss_file, "meme") log.write("\t" + csv_file + "\n") if (program.lower() == "both") or ( program.lower() == "glam2"): for folder in os.listdir(os.path.join(output_folder, strain, "GLAM2")): csv_file = os.path.join(output_folder, strain, "GLAM2", folder, "glam2.csv") gen_promoter_table(os.path.join(output_folder, strain, "GLAM2", folder, "glam2.txt"), csv_file, tss_file, "glam2") log.write("\t" + csv_file + "\n")
def _gen_table(self, output_folder, prefixs, combine, program): '''generate the promoter table''' if combine: strains = prefixs + ["allfasta"] else: strains = prefixs for strain in strains: tss_file = os.path.join(self.tss_path, strain + "_TSS.gff") if (program.lower() == "both") or ( program.lower() == "meme"): for folder in os.listdir(os.path.join(output_folder, strain, "MEME")): gen_promoter_table(os.path.join(output_folder, strain, "MEME", folder, "meme.txt"), os.path.join(output_folder, strain, "MEME", folder, "meme.csv"), tss_file, "meme") if (program.lower() == "both") or ( program.lower() == "glam2"): for folder in os.listdir(os.path.join(output_folder, strain, "GLAM2")): gen_promoter_table(os.path.join(output_folder, strain, "GLAM2", folder, "glam2.txt"), os.path.join(output_folder, strain, "GLAM2", folder, "glam2.csv"), tss_file, "glam2")
def _gen_table(self, output_folder, prefixs, combine): if combine: strains = prefixs + ["allfasta"] else: strains = prefixs for strain in strains: for folder in os.listdir(os.path.join(output_folder, strain)): tss_file = os.path.join(self.tss_path, strain + "_TSS.gff") gen_promoter_table( os.path.join(output_folder, strain, folder, "meme.txt"), os.path.join(output_folder, strain, folder, "meme.csv"), tss_file)
def _gen_table(self, output_folder, prefixs, combine): if combine: strains = prefixs + ["allfasta"] else: strains = prefixs for strain in strains: for folder in os.listdir(os.path.join(output_folder, strain)): tss_file = os.path.join(self.tss_path, strain + "_TSS.gff") gen_promoter_table(os.path.join(output_folder, strain, folder, "meme.txt"), os.path.join(output_folder, strain, folder, "meme.csv"), tss_file)