module Shuffle.Options
( ShuffleArguments (..)
, Shuffle
, shuffleArguments
) where
import Control.Monad.Logger
import Control.Monad.Trans.Reader
import Options.Applicative
data ShuffleArguments = ShuffleArguments
{ newickIqTreeFlag :: Bool
, nReplicates :: Int
, inFile :: FilePath }
type Shuffle = LoggingT (ReaderT ShuffleArguments IO)
shuffleArguments :: Parser ShuffleArguments
shuffleArguments = ShuffleArguments
<$> newickIqTree
<*> n
<*> file
newickIqTree :: Parser Bool
newickIqTree = switch $
long "newick-iqtree"
<> short 'i'
<> help "Use IQ-TREE Newick format (internal node labels are branch support values)"
n :: Parser Int
n = option auto $
long "replicates"
<> short 'n'
<> metavar "N"
<> value 1
<> help "Number of trees to generate"
file :: Parser FilePath
file = strArgument $
metavar "TREE-FILE"
<> help "File containing a Newick tree"