diff --git a/bioflow_insight_cli/main.py b/bioflow_insight_cli/main.py index e62a8c50c4fc3225d6b644b0e02ba16f65e3c7b1..4cae70dad8a2f051cd562fefb4acb2a6ee6d69eb 100644 --- a/bioflow_insight_cli/main.py +++ b/bioflow_insight_cli/main.py @@ -16,9 +16,18 @@ from src.workflow import Workflow default=False, is_flag=True, help='' - 'When processes and subworkflows are duplicated in the workflows by the \'include as\' option, ' - 'this option will duplicate the procedures in the graph output.', + 'When processes and subworkflows are duplicated in the workflow by the \'include as\' option, ' + 'this option will duplicate the task in the graph output.', ) + +@click.option( + '--processes-to-remove', + 'processes_2_remove', + required=False, + help='' + 'List of processes which are to be removed from the different structural representations (format "process1, process2, ...").', +) + @click.option( '--render-graphs', 'render_graphs', @@ -36,13 +45,13 @@ from src.workflow import Workflow 'authors', required=False, help='' - 'Authors of workflow (format "author1, author2, ..."),' + 'Authors of workflow (format "author1, author2, ..."), ' 'extracted otherwise (in the case of a Git repo).', ) @click.option('--keywords', 'keywords', required=False, help='Keywords of workflow (fomat "keyword1, keyword2, ..."), extracted otherwise (in the case of a Git repo).') @click.option('--description', 'description', required=False, help='Description of workflow, extracted otherwise (in the case of a Git repo).') -@click.option('--date-published', 'datePublished', required=False, help='Publication date ("yyyy-mm-dd"), extracted otherwise (in the case of a Git repo).') +@click.option('--date-published', 'datePublished', required=False, help='Publication date (format "yyyy-mm-dd"), extracted otherwise (in the case of a Git repo).') @click.option('--license', 'license', required=False, help='License of workflow, extracted otherwise (in the case of a Git repo).') @click.option('--creative-work-status', 'creativeWorkStatus', required=False, help='Creative work status of workflow, extracted otherwise (in the case of a Git repo).') diff --git a/src/workflow.py b/src/workflow.py index 372bb998b4032ca54317dff180716db0d46a820a..5f726f1fc149ea33b3a87ce3a5490c0864a02e5e 100644 --- a/src/workflow.py +++ b/src/workflow.py @@ -14,7 +14,7 @@ class Workflow: name = None, datePublished=None, description=None, license = None, creativeWorkStatus = None, authors = None, version = None, keywords = None, producer = None, - publisher = None): + publisher = None, processes_2_remove = None): self.nextflow_file = Nextflow_File( file, duplicate=duplicate, @@ -33,6 +33,7 @@ class Workflow: self.keywords = keywords self.producer = producer self.publisher = publisher + self.processes_2_remove = processes_2_remove self.log = "" self.fill_log() self.address = "" @@ -213,5 +214,10 @@ class Workflow: self.nextflow_file.initialise() self.initialise_rocrate() - def generate_all_graphs(self, render_graphs = True, processes_2_remove = []): - self.nextflow_file.generate_all_graphs(render_graphs = render_graphs, processes_2_remove = processes_2_remove) + def generate_all_graphs(self, render_graphs = True): + tab_processes_2_remove = [] + if(self.processes_2_remove!=None): + temp = self.processes_2_remove.split(",") + for t in temp: + tab_processes_2_remove.append(t.strip()) + self.nextflow_file.generate_all_graphs(render_graphs = render_graphs, processes_2_remove = tab_processes_2_remove)