diff options
author | Justin Bedo <cu@cua0.org> | 2018-10-25 08:02:20 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2018-10-25 08:02:20 +1100 |
commit | 99ee99c490cc109b78986181ee1be4ce1cd0c0ed (patch) | |
tree | c909b5e3d151b6542b243c261593ad4a223132f2 /lib | |
parent | 92b4ea2ddac572f8bd830858132956829d92a734 (diff) |
Improve type safety of samtools-merge
Diffstat (limited to 'lib')
-rw-r--r-- | lib/types.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/types.nix b/lib/types.nix index 2e5adca..4dbc6ff 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -38,7 +38,8 @@ rec { toBam = matchFiletype "bam2cram" { bam = filetype.bam; sam = filetype.bam; cram = filetype.bam; }; toSam = matchFiletype "bam2cram" { bam = filetype.sam; sam = filetype.sam; cram = filetype.sam; }; - matchSorting = sym: y: let f = x: match x.sorting (defError (idst sym) y sort); in matchFiletype sym { bam = f; sam = f; cram = f; }; + matchSorting = sym: y: x: match x.sorting (defError (idst sym) y sort); + matchFileSorting = sym: y: let f = matchSorting sym y; in matchFiletype sym { bam = f; sam = f; cram = f; }; sort = make-type "sort" { none = {}; coord = {}; |