#! /usr/bin/env bash

if [[ -z "$1" ]]; then
cat <<EOF

Print the usage information for LepMap3/LepAnchor modules. 
Should be used in main project directory.
Module names are case-sensitive.

[usage]:  params <module name>
[example]:  usage OrderMarkers2

LepMap3 modules:
- ParentCall2
- Filtering2
- SeparateChromosomes2
- JoinSingles2All
- OrderMarkers2 

LepAnchor modules:
- Map2Bed
- CleanMap
- PlaceAndOrientContigs

EOF
  exit 1
fi

if [[ $1 == "Map2Bed" || $1 == "CleanMap" || $1 == "PlaceAndOrientContigs" ]]; then
  java -cp $CONDA_PREFIX/bin/ $1 2>&1
else
  java -cp $CONDA_PREFIX/bin/ $1 2>&1 |  tail -n +2
fi
