forked from AlbertsenLab/mmlong
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mmlong.sh
executable file
·69 lines (54 loc) · 2.2 KB
/
mmlong.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
# mmlong toolbox
# By Søren Karst and Rasmus Kirkegaard
# Version
MMLONG_VERSION=0.1.2
################################################################################
### Preparation ----------------------------------------------------------------
################################################################################
### Description ----------------------------------------------------------------
USAGE="$(basename "$0") [-h] [ name ...]
-- mmlong v. ${MMLONG_VERSION}: workflows and tools for short and long
read microbial metagenomics.
where:
-h Show this help text.
name Name of tool.
... Commands for tool.
Workflows:
* hybrid-metaflow: Metagenomic long read assembly and binning from
using short and long read data.
* short-metaflow: Metagenomic assembly and binning from short
read data.
* bin-reassembly: Reassembly of metagenome bins using unicycler.
Tools:
* miniasm-racon: Long read assembly with miniasm and racon polishing.
* readcoverage: Read mapping and read coverage estimation.
* links: Read mapping and detection of putative links between
scaffolds in an assembly.
* basic-annotation: Basic annotation of genomic data includes calling
and classification of essential genes and 16S rRNA
gene.
For help with a specific tool type: mmlong <name> -h
"
### Terminal Arguments ---------------------------------------------------------
# Import user arguments
while getopts ':hz' OPTION; do
case $OPTION in
h) echo "$USAGE"; exit 1;;
:) printf "missing argument for -$OPTARG\n" >&2; exit 1;;
\?) printf "invalid option for -$OPTARG\n" >&2; exit 1;;
esac
done
TOOL=$1
TOOL_ARG="${*:2}"
# Check missing arguments
if [ -z "${TOOL}" ]; then printf "\n No tool selected!\n\n"; echo "$USAGE"; exit 1; fi;
if [ -z "${TOOL_ARG}" ]; then
printf "\n No arguments provided to $TOOL!\n\n"
TOOL_ARG="-h"
fi
# Paths
SCRIPT_PATH=`readlink ${BASH_SOURCE[0]}`
export MMLONG_DIR=${SCRIPT_PATH%/*}
### Call tool ------------------------------------------------------------------
$MMLONG_DIR/mmlong_tools/mmlong_$TOOL $TOOL_ARG