bioshake-0.1.0.0: Bioinformatics pipelines with shake

Safe HaskellNone
LanguageHaskell2010

Bioshake.TH

Description

Bioshake is built on a lot of instantiation and template haskell can be used to derive instances for the most common types of processes. In particular, this module provides TH functions for handling either single or multithreaded processes with single or multiple outputs (of the same type). Most things fit into these categories.

Synopsis

Documentation

makeSingleTypes Source #

Arguments

:: Name

The type to generate instances for

-> [Name]

A list of absolute Bioshake.Tags. The first of these must be of the form IsEXT as it is used to generate the extension of the output. Examples include IsVCF, IsBam, and IsSam. The Is part is stripped and the lower case remainder used for the extension. These tags will hold on outputs produced by this action.

-> [Name]

Transitive tags. If these hold on the input then they transit to the output.

-> DecsQ 

Generate instances of Pathable and for all the tags associated with the output (both transitive Bioshake.Tags and absolute Bioshake.Tags) for actions that produce a single output file. Transitive Bioshake.Tags are those that if they exist on the input then they will exist on the output (e.g., a Sorted input may result in a Sorted output because the action does not reorder things). Absolute Bioshake.Tags are those that hold on all outputs of the action. These include the file type (e.g., IsBam).

makeMultiTypes Source #

Arguments

:: Name

The type to generate instances for

-> [Name]

A list of absolute Bioshake.Tags. The first of these must be of the form IsEXT as it is used to generate the extension of the output. Examples include IsVCF, IsBam, and IsSam. The Is part is stripped and the lower case remainder used for the extension. These tags will hold on outputs produced by this action.

-> [Name]

Transitive tags. If these hold on the input then they transit to the output.

-> DecsQ 

Same as makeSingleTypes but for actions that produce an output file for each input file.

makeCluster :: Name -> [Name] -> Name -> Q [Dec] Source #

class Args a where Source #

Minimal complete definition

args

Methods

args :: a -> [String] Source #

Instances

Args String Source # 

Methods

args :: String -> [String] Source #

Args [String] Source # 

Methods

args :: [String] -> [String] Source #

class CArgs a where Source #

Minimal complete definition

cmdArgs

Methods

cmdArgs :: [String] -> a Source #

Instances

CArgs [String] Source # 

Methods

cmdArgs :: [String] -> [String] Source #

CArgs (Cmd ()) Source # 

Methods

cmdArgs :: [String] -> Cmd () Source #

(Args a, CArgs r) => CArgs (a -> r) Source # 

Methods

cmdArgs :: [String] -> a -> r Source #

type (|->) a b = a Source #

data CmdF a where Source #

Constructors

CmdF :: [String] -> a -> CmdF a 
MemLimit :: Int -> Cmd () -> a -> CmdF a 
FinallyF :: Cmd () -> IO () -> a -> CmdF a 

Instances

Functor CmdF Source # 

Methods

fmap :: (a -> b) -> CmdF a -> CmdF b #

(<$) :: a -> CmdF b -> CmdF a #

CArgs (Cmd ()) Source # 

Methods

cmdArgs :: [String] -> Cmd () Source #

cmdFinally :: Cmd () -> IO () -> Cmd () Source #

memLimit :: Int -> Cmd () -> Cmd () Source #

run :: CArgs a => a |-> Cmd () Source #