Skip to content

Commit 850f4c1

Browse files
committed
added print
1 parent 5dbf7c4 commit 850f4c1

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

scripts/tasks_retrival/Reactome_tasks_creation.py

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def create_top_level_task(
141141
"-n",
142142
type=click.STRING,
143143
help="name for the specific task",
144-
default="Pathways",
144+
default="Pathways HGNC",
145145
)
146146
@click.option(
147147
"--allow-downloads",
@@ -156,13 +156,24 @@ def create_top_level_task(
156156
default=None,
157157
)
158158
@click.option(
159-
"--top-pathways-file",
159+
"--pathways-relation-file",
160160
type=click.STRING,
161161
help="The location of the ReactomePathwaysRelation file available at https://reactome.org/download-data",
162162
default=None,
163163
)
164+
@click.option(
165+
"--verbose/--quite",
166+
"-v/-q",
167+
is_flag=True,
168+
default=True,
169+
)
164170
def main(
165-
main_task_directory, task_name, allow_downloads, pathways_file, top_pathways_file
171+
main_task_directory,
172+
task_name,
173+
allow_downloads,
174+
pathways_file,
175+
pathways_relation_file,
176+
verbose,
166177
):
167178

168179
reactom_url = (
@@ -172,17 +183,20 @@ def main(
172183
pathways_file = verify_source_of_data(
173184
pathways_file, url=reactom_url, allow_downloads=allow_downloads
174185
)
175-
top_pathways_file = verify_source_of_data(
176-
top_pathways_file, url=TOP_PATHWAYS_URL, allow_downloads=allow_downloads
186+
pathways_relation_file = verify_source_of_data(
187+
pathways_relation_file, url=TOP_PATHWAYS_URL, allow_downloads=allow_downloads
177188
)
178189
df_path = pd.read_csv(pathways_file, index_col="Pathway identifier")
179190

180191
hierarchies_df = pd.read_csv(
181-
top_pathways_file, delimiter="\t", header=0, names=["parent", "child"]
192+
pathways_relation_file, delimiter="\t", header=0, names=["parent", "child"]
182193
)
183194
symbols, outcomes = create_top_level_task(hierarchies_df, df_path)
184195
dump_task_definitions(symbols, outcomes, main_task_directory, task_name)
185-
196+
if verbose:
197+
print(
198+
f"{task_name} was created at {main_task_directory} shaped {outcomes.shape}"
199+
)
186200
return
187201

188202

0 commit comments

Comments
 (0)