aboutsummaryrefslogtreecommitdiff
path: root/tools/fastp-check.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tools/fastp-check.nix')
-rw-r--r--tools/fastp-check.nix45
1 files changed, 23 insertions, 22 deletions
diff --git a/tools/fastp-check.nix b/tools/fastp-check.nix
index 06f00ae..9467cd9 100644
--- a/tools/fastp-check.nix
+++ b/tools/fastp-check.nix
@@ -1,10 +1,10 @@
{ bionix
, flags ? null
-} :
+}:
{ input1
, input2 ? null
-} :
+}:
with bionix;
with lib;
@@ -15,26 +15,27 @@ let
out =
stage {
- name = "fastp";
- buildInputs = [ pkgs.fastp ];
- outputs = [ "out" "fastq1" "json" ] ++ (if input2 != null then [ "fastq2" ] else []);
- buildCommand = ''
- mkdir -p $out
- fastp \
- ${optionalString (flags != null) flags} \
- -i ${fq input1} \
- -o fastq1.fq.gz \
- ${optionalString (input2 != null) ''
- -I ${fq input2} \
- -O fastq2.fq.gz \
+ name = "fastp";
+ buildInputs = [ pkgs.fastp ];
+ outputs = [ "out" "fastq1" "json" ] ++ (if input2 != null then [ "fastq2" ] else [ ]);
+ buildCommand = ''
+ mkdir -p $out
+ fastp \
+ ${optionalString (flags != null) flags} \
+ -i ${fq input1} \
+ -o fastq1.fq.gz \
+ ${optionalString (input2 != null) ''
+ -I ${fq input2} \
+ -O fastq2.fq.gz \
- cp fastq2.fq.gz $fastq2
- ''}
+ cp fastq2.fq.gz $fastq2
+ ''}
- cp fastq1.fq.gz $fastq1
- cp fastp.html $out
- cp fastp.json $json
- '';
+ cp fastq1.fq.gz $fastq1
+ cp fastp.html $out
+ cp fastp.json $json
+ '';
};
- fqgz = { filetype = filetype.gz (filetype.fastq {}); };
-in out // { fastq1 = out.fastq1 // fqgz; } // (if input2 != null then {fastq2 = out.fastq2 // fqgz; } else {})
+ fqgz = { filetype = filetype.gz (filetype.fastq { }); };
+in
+out // { fastq1 = out.fastq1 // fqgz; } // (if input2 != null then { fastq2 = out.fastq2 // fqgz; } else { })