Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
metaclade2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Riccardo Vicedomini
metaclade2
Commits
9f209829
Commit
9f209829
authored
Feb 15, 2020
by
Riccardo Vicedomini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input SGE parameters are now handled
parent
aa4b9770
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
10 deletions
+29
-10
metaclade2
metaclade2
+29
-10
No files found.
metaclade2
View file @
9f209829
...
@@ -35,7 +35,7 @@ NTHREADS=1
...
@@ -35,7 +35,7 @@ NTHREADS=1
NJOBS
=
16
NJOBS
=
16
function
print_usage
()
{
function
print_usage
()
{
echo
-en
"
\n
USAGE:
${
CMD_NAME
}
-i <input_fasta> [options]
\n
"
echo
-en
"
\n
USAGE:
${
CMD_NAME
}
-i <input_fasta>
-N <name>
[options]
\n
"
echo
-en
"
\n
"
echo
-en
"
\n
"
echo
-en
" MANDATORY OPTIONS:
\n
echo
-en
" MANDATORY OPTIONS:
\n
-i, --input <path>
\t
Input file of AA sequences in FASTA format
\n
-i, --input <path>
\t
Input file of AA sequences in FASTA format
\n
...
@@ -56,18 +56,26 @@ function print_usage() {
...
@@ -56,18 +56,26 @@ function print_usage() {
"
| column
-t
-s
$'
\t
'
"
| column
-t
-s
$'
\t
'
echo
-en
"
\n
"
echo
-en
"
\n
"
echo
-en
" OTHER OPTIONS:
\n
echo
-en
" OTHER OPTIONS:
\n
--SGE
\t
Run MetaCLADE jobs on a SGE HPC environment
\n
-t, --threads <num>
\t
Number of threads for each job (default:
${
NTHREADS
}
)
\n
-j, --jobs <num>
\t
Number of jobs to be created (default:
${
NJOBS
}
)
\n
-j, --jobs <num>
\t
Number of jobs to be created (default:
${
NJOBS
}
)
\n
-t, --threads <num>
\t
Number of threads for each job (default:
${
NTHREADS
}
)
\n
-h, --help
\t
Print this help message
\n
-h, --help
\t
Print this help message
\n
-V, --version
\t
Print version
\n
"
| column
-t
-s
$'
\t
'
-V, --version
\t
Print version
\n
"
| column
-t
-s
$'
\t
'
echo
-en
"
\n
"
echo
-en
"
\n
"
echo
-en
" SGE OPTIONS:
\n
--sge
\t
Run MetaCLADE jobs on a SGE HPC environment
\n
--pe <name>
\t
Parallel environment to use (mandatory)
\n
--queue <name>
\t
Name of a specific queue where jobs are submitted
\n
--time-limit <hh:mm:ss>
\t
Time limit for submitted jobs formatted as hh:mm:ss
\n
\t
where hh, mm, ss represent hours, minutes, and seconds respectively
\n
\t
(e.g., use --time-limit 2:30:00 for setting a limit of 2h and 30m)
\n
"
| column
-t
-s
$'
\t
'
echo
-en
"
\n
"
}
}
# retrieve provided arguments
# retrieve provided arguments
opts
=
"i:N:ad:D:e:E:W:t:j:hV"
opts
=
"i:N:ad:D:e:E:W:t:j:hV"
longopts
=
"input:,name:,arch,domain-list:,domain-file:,evalue-cutoff:,evalue-cutconf:,work-dir,
SGE,threads:,jobs:,help,version
"
longopts
=
"input:,name:,arch,domain-list:,domain-file:,evalue-cutoff:,evalue-cutconf:,work-dir,
threads:,jobs:,help,version,sge,pe:,queue:,time-limit:
"
ARGS
=
$(
getopt
-o
"
${
opts
}
"
-l
"
${
longopts
}
"
-n
"
${
CMD_NAME
}
"
--
"
${
@
}
"
)
ARGS
=
$(
getopt
-o
"
${
opts
}
"
-l
"
${
longopts
}
"
-n
"
${
CMD_NAME
}
"
--
"
${
@
}
"
)
if
[
$?
-ne
0
]
||
[
$#
-eq
0
]
;
then
# do not change the order of this test!
if
[
$?
-ne
0
]
||
[
$#
-eq
0
]
;
then
# do not change the order of this test!
print_usage
print_usage
...
@@ -108,9 +116,6 @@ while [ -n "${1}" ]; do
...
@@ -108,9 +116,6 @@ while [ -n "${1}" ]; do
shift
shift
MCLADE_WORKDIR
=
${
1
}
MCLADE_WORKDIR
=
${
1
}
;;
;;
--SGE
)
MCLADE_USESGE
=
true
;;
-t
|
--threads
)
-t
|
--threads
)
shift
shift
NTHREADS
=
${
1
}
NTHREADS
=
${
1
}
...
@@ -127,6 +132,21 @@ while [ -n "${1}" ]; do
...
@@ -127,6 +132,21 @@ while [ -n "${1}" ]; do
print_version
print_version
exit
0
exit
0
;;
;;
--sge
)
MCLADE_USESGE
=
true
;;
--pe
)
shift
SGE_PENAME
=
${
1
}
;;
--queue
)
shift
SGE_QUEUE
=
${
1
}
;;
--time-limit
)
shift
SGE_TIMELIM
=
${
1
}
;;
--
)
--
)
shift
shift
break
break
...
@@ -185,7 +205,7 @@ check_cmds "python3"
...
@@ -185,7 +205,7 @@ check_cmds "python3"
# Validate SGE parameters
# Validate SGE parameters
if
[
"
${
MCLADE_USESGE
}
"
=
true
]
;
then
if
[
"
${
MCLADE_USESGE
}
"
=
true
]
;
then
if
[
-z
${
SGE_PENAME
}
]
;
then
if
[
-z
${
SGE_PENAME
}
]
;
then
print_error
"you must set a parallel environment name with -P|--p
arallel-env option along with the --SGE
option"
print_error
"you must set a parallel environment name with -P|--p
e option along with the --sge
option"
exit
1
exit
1
fi
fi
if
[
!
-z
${
SGE_QUEUE
}
]
;
then
if
[
!
-z
${
SGE_QUEUE
}
]
;
then
...
@@ -238,8 +258,7 @@ if [ "${MCLADE_USESGE}" = true ] ; then
...
@@ -238,8 +258,7 @@ if [ "${MCLADE_USESGE}" = true ] ; then
# submit filter jobs
# submit filter jobs
print_status
"submitting filter ijobs"
print_status
"submitting filter ijobs"
unset
pidarr
unset
pidarr
;
pidarr
=()
pidarr
=()
for
i
in
$(
seq 1
${
NJOBS
})
;
do
for
i
in
$(
seq 1
${
NJOBS
})
;
do
f
=
"
${
MCLADE_WORKDIR
}
/jobs/1_filter/
${
MCLADE_JOBNAME
}
_
${
i
}
.sh"
f
=
"
${
MCLADE_WORKDIR
}
/jobs/1_filter/
${
MCLADE_JOBNAME
}
_
${
i
}
.sh"
# run a qsub job for each non-empty script
# run a qsub job for each non-empty script
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment