Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
contig_info
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
Container Registry
Model registry
Operate
Environments
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
GIPhy
contig_info
Commits
834a263c
Commit
834a263c
authored
4 years ago
by
Alexis CRISCUOLO
⚫
Browse files
Options
Downloads
Patches
Plain Diff
2.01
parent
0039402f
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
contig_info.sh
+14
-20
14 additions, 20 deletions
contig_info.sh
with
14 additions
and
20 deletions
contig_info.sh
+
14
−
20
View file @
834a263c
...
...
@@ -70,12 +70,13 @@
#############################################################################################################
# #
# ================ #
# =
MANUAL
= #
# =
FUNCTIONS
= #
# ================ #
# #
# = mandoc() ============================================================================================= #
# prints the doc #
# #
if
[
"
$1
"
==
"-h"
]
||
[
$#
-lt
1
]
then
mandoc
()
{
echo
-e
"
\n\0
33[1m contig_info v
$VERSION
$COPYRIGHT
\0
33[0m"
;
cat
<<
EOF
...
...
@@ -93,16 +94,7 @@ then
-h prints this help and exits
EOF
[
"
$1
"
==
"-h"
]
&&
exit
0
||
exit
1
;
fi
# #
#############################################################################################################
#############################################################################################################
# #
# ================ #
# = FUNCTIONS = #
# ================ #
}
# #
# = randomfile() ========================================================================================= #
# creates a random file within $TEMP_DIR and returns its name #
...
...
@@ -118,6 +110,8 @@ randomfile() {
#### INITIALIZING PARAMETERS AND READING OPTIONS ####
#### ####
#############################################################################################################
if
[
$#
-lt
1
]
;
then
mandoc
;
exit
1
;
fi
export
LC_ALL
=
C
;
MIN_CONTIG_LGT
=
1
;
...
...
@@ -125,15 +119,15 @@ GENOME_SIZE=0;
RES_CONTENT
=
false
;
TSVOUT
=
false
;
while
getopts
m:g:tr option
while
getopts
m:g:tr
h
option
do
case
$option
in
m
)
MIN_CONTIG_LGT
=
$OPTARG
;;
g
)
GENOME_SIZE
=
$OPTARG
;;
r
)
RES_CONTENT
=
true
;;
t
)
TSVOUT
=
true
;;
:
)
echo
"option
$OPTARG
: missing argument"
;
exit
1
;;
\?
)
echo
"
$OPTARG
: option invalide"
;
exit
1
;;
m
)
MIN_CONTIG_LGT
=
$OPTARG
;;
g
)
GENOME_SIZE
=
$OPTARG
;;
r
)
RES_CONTENT
=
true
;;
t
)
TSVOUT
=
true
;;
h
)
mandoc
;
exit
0
;;
\?
)
mandoc
;
exit
1
;;
esac
done
if
!
[[
$MIN_CONTIG_LGT
=
~ ^[0-9]+
$
]]
;
then
echo
" incorrect value (option -m):
$MIN_CONTIG_LGT
"
>
&2
;
exit
1
;
fi
...
...
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