Skip to content

Commit

Permalink
fixed gz-output selection in genoconvert
Browse files Browse the repository at this point in the history
  • Loading branch information
stschiff committed Nov 22, 2024
1 parent ca7ebd3 commit f0a63ec
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/Poseidon/CLI/Genoconvert.hs
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,12 @@ convertGenoTo outFormat onlyGeno outPath removeOld outPlinkPopMode outZip pac =
++ if outZip then "(gzipped):" else ":"
-- compile file names paths
let outName = getPacName . posPacNameAndVersion $ pac
(outInd, outSnp, outGeno) <- case (outFormat, outZip) of
("EIGENSTRAT", False) -> return
(outName <.> ".ind", outName <.> ".snp" , outName <.> ".geno" )
("EIGENSTRAT", True ) -> return
(outName <.> ".ind", outName <.> ".snp.gz", outName <.> ".geno.gz")
("PLINK", False) -> return
(outName <.> ".fam", outName <.> ".bim" , outName <.> ".bed" )
("PLINK", True ) -> return
(outName <.> ".fam", outName <.> ".bim.gz", outName <.> ".bed.gz" )
let gz = "gz"
(outInd, outSnp, outGeno) <- case outFormat of
"EIGENSTRAT" -> return
(outName <.> ".ind", outName <.> ".snp" <.> gz, outName <.> ".geno" <.> gz)
("PLINK" -> return
(outName <.> ".fam", outName <.> ".bim" <.> gz, outName <.> ".bed" <.> gz)
_ -> liftIO . throwIO . PoseidonGenericException $
"Illegal outFormat " ++ outFormat ++
". Only Outformats EIGENSTRAT or PLINK are allowed at the moment"
Expand Down

0 comments on commit f0a63ec

Please sign in to comment.