Skip to content

Commit

Permalink
fixed path issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas DEPUYDT committed Oct 1, 2021
1 parent 6d49792 commit a0e38c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# pycache
scripts/__pycache__
7 changes: 4 additions & 3 deletions scripts/preprocess_go_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
def extend_annotations(go_file, out_file, go_obo):

# extend predictions
os.system("scripts/extend_go.py {} {} > tmp/intermediate_go_file1.tmp".format(go_file, go_obo))
os.system("{}/extend_go.py {} {} > tmp/intermediate_go_file1.tmp".format(scripts_dir, go_file, go_obo))

# filter BP terms
os.system("scripts/filter_go_category.py tmp/intermediate_go_file1.tmp biological_process {} > tmp/intermediate_go_file2.tmp".format(go_obo))
os.system("{}/filter_go_category.py tmp/intermediate_go_file1.tmp biological_process {} > tmp/intermediate_go_file2.tmp".format(scripts_dir, go_obo))

# drop 'biological_process'
os.system("grep -v 'GO:0008150' tmp/intermediate_go_file2.tmp > tmp/intermediate_go_file3.tmp")
Expand All @@ -23,7 +23,7 @@ def extend_annotations(go_file, out_file, go_obo):


def calculate_IC(go_file, out_file):
os.system("scripts/calculate_ICu_per_GO.py {} > {}".format(go_file, out_file))
os.system("{}/calculate_ICu_per_GO.py {} > {}".format(scripts_dir, go_file, out_file))


def addIC(go_gene, go_ic, out_file):
Expand Down Expand Up @@ -51,6 +51,7 @@ def addIC(go_gene, go_ic, out_file):
if __name__ == '__main__':


scripts_dir = os.path.abspath(argv[0])
go_file = argv[1]
go_gene_ic = argv[2]

Expand Down

0 comments on commit a0e38c5

Please sign in to comment.