Commit 5f74a8a5 authored by Loïc Chapron's avatar Loïc Chapron

fix tsv error import

parent 9144bad9
......@@ -588,9 +588,9 @@ parseTsv' bs = (V.toList . V.map tsv2doc . snd) <$> readTsvLazyBS Comma bs
parseTsv' :: BL.ByteString -> Either Text [HyperdataDocument]
parseTsv' bs = do
let
result = case readTsvLazyBS Comma bs of
Left _err -> readTsvLazyBS Tab bs
Right res -> Right res
result = case (testCorrectFile bs) of
Left _err -> Left _err
Right del -> readTsvLazyBS del bs
V.toList . V.map tsv2doc . snd <$> result
parseTsvC :: BL.ByteString
......@@ -598,9 +598,9 @@ parseTsvC :: BL.ByteString
parseTsvC bs =
(\(_h, rs) -> (fromIntegral $ V.length rs, yieldMany rs .| mapC tsv2doc)) <$> eResult
where
eResult = case readTsvLazyBS Comma bs of
Left _err -> readTsvLazyBS Tab bs
Right res -> Right res
eResult = case (testCorrectFile bs) of
Left _err -> Left _err
Right del -> readTsvLazyBS del bs
------------------------------------------------------------------------
-- Tsv v3 weighted for phylo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment