Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GRIS
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
Contributor 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
Julien GUGLIELMINI
GRIS
Commits
7689c82d
Commit
7689c82d
authored
3 years ago
by
Julien GUGLIELMINI
Browse files
Options
Downloads
Patches
Plain Diff
Better log
parent
9ddd4fda
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wGRR
+19
-18
19 additions, 18 deletions
wGRR
with
19 additions
and
18 deletions
wGRR
+
19
−
18
View file @
7689c82d
...
...
@@ -5,16 +5,13 @@
trap
'rm -rf "$tmp"'
EXIT
export
LC_ALL
=
C
SECONDS
=
0
readonly
VERSION
=
0.4
bold
=
$(
tput bold
)
normal
=
$(
tput sgr0
)
display_usage
()
{
echo
"
$(
echo
${
ZSH_ARGZERO
}
|
awk
'BEGIN{FS="/"}{print $NF}'
)
version
${
VERSION
}
"
echo
"
wGRR
version
${
VERSION
}
"
echo
"
${
bold
}
USAGE:
${
normal
}
$ZSH_ARGZERO
-f <fasta_file> [OPTIONS]"
echo
""
echo
"
${
bold
}
MANDATORY PARAMETERS:
${
normal
}
"
...
...
@@ -56,7 +53,7 @@ fi
# print version
if
[
"
$1
"
=
"-v"
]
||
[
"
$1
"
=
"--version"
]
;
then
echo
"
$(
echo
${
ZSH_ARGZERO
}
|
awk
'BEGIN{FS="/"}{print $NF}'
)
version
${
VERSION
}
"
;
echo
"
wGRR
version
${
VERSION
}
"
;
exit
0
;
fi
...
...
@@ -147,26 +144,18 @@ if [[ $OUT == "N.O.O.U.T" ]] ; then
OUT
=
$(
basename
$tmp
)
fi
echo
"[INFO] --
$(
echo
${
ZSH_ARGZERO
}
|
awk
'BEGIN{FS="/"}{print $NF}'
)
version
${
VERSION
}
"
echo
"[INFO] -- The command is:"
echo
"[INFO] --
$ZSH_ARGZERO
$@
"
#################################
########### TO DO ###############
#################################
## Check dependencies
if
[[
!
-f
wGRR.awk
]]
;
then
echo
"[ERROR] -- awk script wGRR.awk not found."
exit
1
fi
## Get partition (if sbatch) or check nproc (if local/Check number of threads
if
[[
$SLURM_JOBID
!=
""
]]
;
then
PARTITION
=
$(
squeue
-j
$SLURM_JOBID
-o
"%P"
-h
)
BATCHFLAG
=
$(
squeue
-j
$SLURM_JOBID
--Format
=
batchflag
-h
|
awk
'{print $1}'
)
fi
echo
"[INFO] -- wGRR version
${
VERSION
}
"
if
[[
$BATCHFLAG
==
0
]]
;
then
echo
"[INFO] -- The command is:"
echo
"[INFO] -- ./wGRR
$@
"
if
[[
$THREADS
-gt
$(
nproc
)
]]
;
then
echo
"[ERROR] -- You required
$THREADS
threads but your machine has
$(
nproc
)
cores."
exit
1
...
...
@@ -176,6 +165,8 @@ if [[ $BATCHFLAG == 0 ]] ; then
module load openmpi
fi
else
echo
"[INFO] -- The command is:"
echo
"[INFO] --
$(
scontrol show job
${
SLURM_JOBID
}
|
awk
'/ +Command/{n=split($0,a,"=");print a[n]}'
)
"
if
[[
!
-f
wGRR_mem.awk
]]
;
then
if
[[
$ARRAYSIZE
>
10000
]]
;
then
echo
"[ERROR] -- awk script wGRR_mem.awk not found."
...
...
@@ -184,6 +175,16 @@ else
fi
fi
if
[[
!
-f
wGRR.awk
]]
;
then
echo
"[ERROR] -- awk script wGRR.awk not found."
exit
1
fi
if
[[
!
-f
wGRR_worker.zsh
]]
;
then
echo
"[ERROR] -- awk script wGRR_worker.zsh not found."
exit
1
fi
## Check awk
if
!
AWKEXE
=
$(
command
-v
gawk
)
;
then
if
!
AWKEXE
=
$(
command
-v
awk
)
;
then
...
...
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