Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BioFlow-Insight
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shareFAIR
BioFlow-Insight
Commits
a34c9b51
Commit
a34c9b51
authored
4 months ago
by
George Marchment
Browse files
Options
Downloads
Patches
Plain Diff
What looks like a stable version
parent
4df87025
No related branches found
No related tags found
No related merge requests found
Pipeline
#14380
failed with stage
in 2 minutes and 25 seconds
Changes
4
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/block.py
+1
-1
1 addition, 1 deletion
src/block.py
src/call.py
+16
-8
16 additions, 8 deletions
src/call.py
src/executor.py
+8
-2
8 additions, 2 deletions
src/executor.py
src/workflow.py
+295
-227
295 additions, 227 deletions
src/workflow.py
with
320 additions
and
238 deletions
src/block.py
+
1
−
1
View file @
a34c9b51
...
...
@@ -19,7 +19,7 @@ class Block(Root):
#This method returns returns all the conditions above the block
#Basically everything which needs to be true for the block to exist
def
get_all_conditions
(
self
,
conditions
=
{}
):
def
get_all_conditions
(
self
,
conditions
):
conditions
[
self
.
condition
]
=
''
self
.
origin
.
get_all_conditions
(
conditions
=
conditions
)
return
conditions
...
...
This diff is collapsed.
Click to expand it.
src/call.py
+
16
−
8
View file @
a34c9b51
...
...
@@ -42,6 +42,9 @@ class Call(Executor):
def
add_to_emits
(
self
,
emitted
):
self
.
emits
.
append
(
emitted
)
def
get_later_emits
(
self
):
return
self
.
emits
def
__str__
(
self
):
return
f
"
Call_
{
id
(
self
)
}
"
...
...
@@ -78,22 +81,26 @@ class Call(Executor):
#Case the param is an operation
elif
(
param
.
get_type
()
==
"
Operation
"
):
#If it's an artificial operation -> we don't need to do anything
if
(
not
param
.
get_artificial_status
()):
code
=
code
.
replace
(
param
.
get_code
(
get_OG
=
True
),
param_new_name
)
lines
=
param
.
simplify_code
().
split
(
'
\n
'
)
if
(
len
(
lines
)
==
1
):
new_bit
=
f
"
{
param_new_name
}
=
{
lines
[
0
]
}
"
else
:
head
=
'
\n
'
.
join
(
lines
[:
-
1
])
new_bit
=
f
"
{
head
}
\n
{
param_new_name
}
=
{
lines
[
-
1
]
}
"
code
=
code
.
replace
(
tag_to_add
,
f
"
{
tag_to_add
}
\n
{
new_bit
}
"
)
code
=
code
.
replace
(
param
.
get_code
(
get_OG
=
True
),
param_new_name
)
lines
=
param
.
simplify_code
().
split
(
'
\n
'
)
if
(
len
(
lines
)
==
1
):
new_bit
=
f
"
{
param_new_name
}
=
{
lines
[
0
]
}
"
else
:
head
=
'
\n
'
.
join
(
lines
[:
-
1
])
new_bit
=
f
"
{
head
}
\n
{
param_new_name
}
=
{
lines
[
-
1
]
}
"
code
=
code
.
replace
(
tag_to_add
,
f
"
{
tag_to_add
}
\n
{
new_bit
}
"
)
#Case Channel
elif
(
param
.
get_type
()
==
"
Channel
"
):
raise
Exception
(
"
This shouldn
'
t happen
"
)
None
elif
(
param
.
get_type
()
==
"
Emitted
"
):
None
else
:
print
(
param
)
raise
Exception
(
"
This shouldn
'
t happen
"
)
index
+=
1
return
code
.
replace
(
tag_to_add
,
""
).
strip
()
...
...
@@ -166,6 +173,7 @@ class Call(Executor):
channels
=
[
channel
]
from
.operation
import
Operation
ope
=
Operation
(
f
"
{
param
}
"
,
self
)
ope
.
set_as_artificial
()
for
channel
in
channels
:
channel
.
add_sink
(
self
)
ope
.
add_element_origins
(
channel
)
...
...
This diff is collapsed.
Click to expand it.
src/executor.py
+
8
−
2
View file @
a34c9b51
...
...
@@ -31,6 +31,14 @@ class Executor(Nextflow_Building_Blocks):
def
get_list_name_processes
(
self
):
return
self
.
origin
.
get_list_name_processes
()
def
get_all_conditions
(
self
):
if
(
self
.
origin
.
get_type
()
==
"
Root
"
):
return
[]
elif
(
self
.
origin
.
get_type
()
==
"
Block
"
):
conditions
=
{}
return
self
.
origin
.
get_all_conditions
(
conditions
)
else
:
return
self
.
origin
.
get_all_conditions
()
def
get_subworkflow_from_name
(
self
,
name
):
...
...
@@ -93,8 +101,6 @@ class Executor(Nextflow_Building_Blocks):
def
get_executors
(
self
):
return
self
.
origin
.
get_executors
()
def
get_condition
(
self
):
return
self
.
condition
def
add_element_to_elements_being_called
(
self
,
element
):
self
.
origin
.
add_element_to_elements_being_called
(
element
)
...
...
This diff is collapsed.
Click to expand it.
src/workflow.py
+
295
−
227
View file @
a34c9b51
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment