Skip to content
Permalink
9b258c6d1f
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
19 lines (14 sloc) 499 Bytes
import csv
import os
class ResultSaver:
def __init__(self, results, organism, tissue, wd):
print("Save results to File !")
self.path = ""
if tissue:
self.path = os.path.join(wd+"/"+organism+"_filtered.gtf")
else:
self.path = os.path.join(wd+"/"+organism+".gtf")
with open(self.path, "w") as file:
write_it = csv.writer(file, delimiter='\t')
for line in results:
write_it.writerow(line)