Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pydr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container 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
FSL
pydr
Commits
66e860c1
Commit
66e860c1
authored
1 year ago
by
Fidel Alfaro Almagro
Browse files
Options
Downloads
Patches
Plain Diff
Changing the way python is used in the creation of the system call
parent
6c732fc6
No related branches found
Branches containing commit
Tags
0.1.4
Tags containing commit
1 merge request
!6
Changing the way python is used in the creation of the system call
Pipeline
#23316
passed
1 year ago
Stage: fsl-ci-build
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pydr/__init__.py
+1
-1
1 addition, 1 deletion
pydr/__init__.py
pydr/dr.py
+3
-2
3 additions, 2 deletions
pydr/dr.py
with
4 additions
and
3 deletions
pydr/__init__.py
+
1
−
1
View file @
66e860c1
#!/usr/bin/env python
#!/usr/bin/env python
__version__
=
'
0.1.
3
'
__version__
=
'
0.1.
4
'
This diff is collapsed.
Click to expand it.
pydr/dr.py
+
3
−
2
View file @
66e860c1
#!/usr/bin/env python
#!/usr/bin/env python
import
os
import
os
import
sys
import
math
import
math
import
nibabel
as
nb
import
nibabel
as
nb
import
numpy
as
np
import
numpy
as
np
...
@@ -274,7 +275,7 @@ def dr(files, grp_maps, workdir, submit_to_cluster=True):
...
@@ -274,7 +275,7 @@ def dr(files, grp_maps, workdir, submit_to_cluster=True):
# generate DR jobs
# generate DR jobs
PYTHON_BIN
=
os
.
getenv
(
'
PYTHON_BIN
'
,
default
=
'
python
'
)
PYTHON_BIN
=
sys
.
executable
with
open
(
f
'
{
workdir
}
/logs/dr_commands.txt
'
,
'
w
'
)
as
fpr
:
with
open
(
f
'
{
workdir
}
/logs/dr_commands.txt
'
,
'
w
'
)
as
fpr
:
df
=
pd
.
read_csv
(
files
)
df
=
pd
.
read_csv
(
files
)
...
@@ -312,7 +313,7 @@ def dr(files, grp_maps, workdir, submit_to_cluster=True):
...
@@ -312,7 +313,7 @@ def dr(files, grp_maps, workdir, submit_to_cluster=True):
if
not
submit_to_cluster
:
if
not
submit_to_cluster
:
with
open
(
f
'
{
workdir
}
/logs/dr_commands.txt
'
,
'
r
'
)
as
fpr
:
with
open
(
f
'
{
workdir
}
/logs/dr_commands.txt
'
,
'
r
'
)
as
fpr
:
for
command
in
fpr
.
readlines
():
for
command
in
fpr
.
readlines
():
logger
.
info
(
'
'
.
join
(
command
)
)
logger
.
info
(
command
)
output
=
run
(
command
)
output
=
run
(
command
)
print
(
output
)
print
(
output
)
...
...
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