Skip to content

Commit

Permalink
Fixed: "No Module named bin Error" V2
Browse files Browse the repository at this point in the history
  • Loading branch information
basti committed Dec 4, 2018
1 parent 2dee4f6 commit 38c9bae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bin/Modules/SaveResults.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

class ResultSaver:

def __init__(self, results, organism, tissue):
def __init__(self, results, organism, tissue, wd):

print("Save results to File !")
self.path = ""
if tissue:
self.path = os.path.join("./"+organism+"_filtered.gtf")
self.path = os.path.join(wd, "/"+organism+"_filtered.gtf")
else:
self.path = os.path.join("./"+organism+".gtf")
self.path = os.path.join(wd, "./"+organism+".gtf")

with open(self.path, "w") as file:
write_it = csv.writer(file, delimiter='\t')
Expand Down
6 changes: 3 additions & 3 deletions bin/RegGTFExtractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ def main_script(org, wd, tissuetype=None):
ense = Ensembl(org, wd)
print("Getting Unique Results")
unique_filter = UniqueFilter(ense.get_gtf(), ucsc.get_gtf(), tissuetype)
ResultSaver(unique_filter.get_results(), org, tissuetype)
ResultSaver(unique_filter.get_results(), org, tissuetype, wd)


if __name__ == '__main__':
parser = argparse.ArgumentParser(description='GTF-Generator from UCSC Table Browser and Ensembl Regulatory Build' )
parser.add_argument('organism', help='Source organism [ homo_sapiens or mus_musculus ]', action='store', nargs='?', type=str)
parser.add_argument('--tissue', help='Tissue- or Celltype(s)', action='store', nargs='*', type=str)
parser.add_argument('--wd', help='Working directory. default: "."', default=".", action='store', type=str)
parser.add_argument('--wd', help='Working directory. default: "."', action='store', nargs='*', type=str)
args = vars(parser.parse_args())
if args["organism"]:
#print(args["tissue"])
print("Working Dir: " + args["wd"])
main_script(args["organism"], args["wd"], args["tissue"])
else:
print("No Arguments found -> See ./RegGTFExtractor.py -h for help.")
Expand Down

0 comments on commit 38c9bae

Please sign in to comment.