biosff 0.3.7 → 0.3.7.1
raw patch · 4 files changed
+43/−3 lines, 4 files
Files
- biosff.cabal +2/−1
- src/FClip/Options.hs +35/−0
- src/FRecover/Main.hs +5/−1
- src/Flower/Options.hs +1/−1
biosff.cabal view
@@ -1,5 +1,5 @@ Name: biosff-Version: 0.3.7+Version: 0.3.7.1 Synopsis: Library and executables for working with SFF files Description: The library contains the functionality for reading and writing SFF files (sequencing data from 454 and Ion Torrent). It duplicates@@ -65,6 +65,7 @@ Executable fclip Main-Is: Main.hs+ Other-Modules: Options if flag(fclip) Buildable: True else
+ src/FClip/Options.hs view
@@ -0,0 +1,35 @@+{-# LANGUAGE DeriveDataTypeable #-}++module Options where++import System.Console.CmdArgs++data Opts = Opts + { trimKey :: Bool+ , trimAdapter :: Bool+ , trim :: Bool+ , filterEmpty :: Bool+ , output :: FilePath+ , input :: FilePath+ } deriving (Data,Typeable, Show, Eq)++opts :: Opts+opts = Opts+ { trimKey = False &= help "Trim only the TCAG key sequence" &= name "k"+ , trim = False &= help "Trim quality using clipping information" &= name "t"+ , trimAdapter = False &= help "Trim quality using adapter information" &= name "a"+ , filterEmpty = False &= help "Filter out reads that are empty after trimming" &= name "E"+ , output = def &= help "SFF file to write" &= name "o"+ , input = def &= args &= typFile+ } + &= summary "fclip (biosff v0.3.7.1) - Extract information from SFF files" + &= program "fclip"++getArgs :: IO Opts+getArgs = do+ o <- cmdArgs opts + -- todo: option checking+ return o++ +
src/FRecover/Main.hs view
@@ -7,7 +7,11 @@ import System.Environment (getArgs) main :: IO ()-main = mapM_ recoverFile =<< getArgs+main = do + xs <- getArgs+ if null xs + then error "frecover (biosff 0.3.7.1) - try to repair broken SFF files.\nUsage: frecover file.sff [file.sff]" + else do mapM_ recoverFile xs where recoverFile f = writeSFF (f++"_recovered") =<< recoverSFF f -- perhaps we should use writeSFF' instead, since it goes back -- to update the header with number of reads written?
src/Flower/Options.hs view
@@ -47,7 +47,7 @@ , text = def &= help "Output SFF information as text (default)" &= typFile &= name "T" &= optdef , inputs = def &= args &= typFile } - &= summary "flower (biosff v0.3.7) - Extract information from SFF files" + &= summary "flower (biosff v0.3.7.1) - Extract information from SFF files" &= program "flower" getArgs :: IO Opts