diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/samtools-view.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/samtools-view.nix b/tools/samtools-view.nix index e1ca0a8..35a3fcb 100644 --- a/tools/samtools-view.nix +++ b/tools/samtools-view.nix @@ -13,7 +13,7 @@ with types; assert (matchFiletype "samtools-view" { bam = _: true; sam = _: true; cram = _: true; } input); let - outfmtR = if outfmt != null then outfmt input else input.filetype; + outfmtR = if outfmt != null then (if builtins.typeOf outfmt == "string" then { "bam" = toBam; "cram" = toCram; "sam" = toSam; }."${outfmt}" else outfmt) input else input.filetype; fa = ref: matchFiletype "samtools-view-ref" { fa = _: ref; } ref; outfmtFlags = matchFiletype "samtools-view-outfmt" { bam = _: "-O BAM"; sam = _: "-O SAM"; cram = x: "-O CRAM -T ${fa x.ref}"; } {filetype = outfmtR;}; in stage { |