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: ...@@ -50,6 +50,7 @@ Run _contig_info_ without option to read the following documentation:
-r residue content statistics for each contig sequence instead of -r residue content statistics for each contig sequence instead of
global statistics global statistics
-t tab-delimited output -t tab-delimited output
-h prints this help and exits
``` ```
## Examples ## Examples
......
...@@ -32,7 +32,11 @@ ...@@ -32,7 +32,11 @@
# = VERSIONS = # # = 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 option -r #
# + adding trap when interrupting script # # + adding trap when interrupting script #
# # # #
...@@ -70,7 +74,7 @@ ...@@ -70,7 +74,7 @@
# ================ # # ================ #
# # # #
# # # #
if [ "$1" = "-?" ] || [ $# -lt 1 ] if [ "$1" == "-h" ] || [ $# -lt 1 ]
then then
echo -e "\n\033[1m contig_info v$VERSION $COPYRIGHT\033[0m"; echo -e "\n\033[1m contig_info v$VERSION $COPYRIGHT\033[0m";
cat <<EOF cat <<EOF
...@@ -86,25 +90,14 @@ then ...@@ -86,25 +90,14 @@ then
-r residue content statistics for each contig sequence instead of -r residue content statistics for each contig sequence instead of
global statistics global statistics
-t tab-delimited output -t tab-delimited output
-h prints this help and exits
EOF EOF
exit ; [ "$1" == "-h" ] && exit 0 || exit 1 ;
fi fi
# # # #
############################################################################################################# #############################################################################################################
#############################################################################################################
# #
# ================ #
# = CONSTANTS = #
# ================ #
# #
# = temp directory ======================================================================================= #
# #
TEMP_DIR=${TMPDIR:-/tmp};
# #
#############################################################################################################
############################################################################################################# #############################################################################################################
# # # #
# ================ # # ================ #
...@@ -112,11 +105,10 @@ fi ...@@ -112,11 +105,10 @@ fi
# ================ # # ================ #
# # # #
# = randomfile() ========================================================================================= # # = randomfile() ========================================================================================= #
# returns a random file name within /tmp/ # # creates a random file within $TEMP_DIR and returns its name #
# # # #
randomfile() { randomfile() {
rdmf=$TEMP_DIR/$RANDOM; while [ -e $rdmf ]; do rdmf=$TEMP_DIR/$RANDOM ; done echo $(mktemp -t -p ${TMPDIR:-/tmp}) ;
echo $rdmf ;
} }
# # # #
############################################################################################################# #############################################################################################################
......
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