Skip to content
Snippets Groups Projects
Commit 0039402f authored by Alexis  CRISCUOLO's avatar Alexis CRISCUOLO :black_circle:
Browse files

2.01

parent 07e3a168
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,7 @@ Run _contig_info_ without option to read the following documentation:
-r residue content statistics for each contig sequence instead of
global statistics
-t tab-delimited output
-h prints this help and exits
```
## Examples
......
......@@ -32,7 +32,11 @@
# = VERSIONS = #
# ============ #
# #
VERSION=2.0.210315ac #
VERSION=2.01.210324ac #
# + modified temp file creation using TMPDIR variable #
# + adding option -h #
# #
# VERSION=2.0.210315ac #
# + adding option -r #
# + adding trap when interrupting script #
# #
......@@ -70,7 +74,7 @@
# ================ #
# #
# #
if [ "$1" = "-?" ] || [ $# -lt 1 ]
if [ "$1" == "-h" ] || [ $# -lt 1 ]
then
echo -e "\n\033[1m contig_info v$VERSION $COPYRIGHT\033[0m";
cat <<EOF
......@@ -86,25 +90,14 @@ then
-r residue content statistics for each contig sequence instead of
global statistics
-t tab-delimited output
-h prints this help and exits
EOF
exit ;
[ "$1" == "-h" ] && exit 0 || exit 1 ;
fi
# #
#############################################################################################################
#############################################################################################################
# #
# ================ #
# = CONSTANTS = #
# ================ #
# #
# = temp directory ======================================================================================= #
# #
TEMP_DIR=${TMPDIR:-/tmp};
# #
#############################################################################################################
#############################################################################################################
# #
# ================ #
......@@ -112,11 +105,10 @@ fi
# ================ #
# #
# = randomfile() ========================================================================================= #
# returns a random file name within /tmp/ #
# creates a random file within $TEMP_DIR and returns its name #
# #
randomfile() {
rdmf=$TEMP_DIR/$RANDOM; while [ -e $rdmf ]; do rdmf=$TEMP_DIR/$RANDOM ; done
echo $rdmf ;
echo $(mktemp -t -p ${TMPDIR:-/tmp}) ;
}
# #
#############################################################################################################
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment