diff options
Diffstat (limited to 'tools/samtools-fixmate.nix')
-rw-r--r-- | tools/samtools-fixmate.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/samtools-fixmate.nix b/tools/samtools-fixmate.nix new file mode 100644 index 0000000..6cb31bb --- /dev/null +++ b/tools/samtools-fixmate.nix @@ -0,0 +1,25 @@ +{ bionix +, nixpkgs +, mateScore ? false +, flags ? null +}: + +input: + +with nixpkgs; +with lib; +with bionix.types; + +assert (matchFiletype "samtools-fixmate" { bam = _: true; } input); +assert (matchFileSorting "samtools-fixmate" { name = _: true; } input); + +stdenv.mkDerivation { + name = "samtools-fixmate"; + buildInputs = [ samtools ]; + buildCommand = '' + samtools fixmate \ + ${optionalString mateScore "-m"} \ + ${optionalString (flags != null) flags} -O bam ${input} $out + ''; + passthru.filetype = input.filetype; +} |