aboutsummaryrefslogtreecommitdiff
path: root/examples/ex-tnpair
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2021-10-29 17:39:01 +1100
committerJustin Bedo <cu@cua0.org>2021-10-29 17:39:01 +1100
commitbac9248a5e08e8afdf5485a6e27cfe72e1ca5090 (patch)
tree8719a280b56122017d46b582cd3da8547dd3f548 /examples/ex-tnpair
parentab809b8c77efdad9fb54d3591a0193a1cbe888d1 (diff)
treewide reformatting and simplification
- simplify with statix - reformat with nixpkgs-fmt
Diffstat (limited to 'examples/ex-tnpair')
-rw-r--r--examples/ex-tnpair/cluster.nix14
-rw-r--r--examples/ex-tnpair/default.nix3
-rw-r--r--examples/ex-tnpair/tnpair.nix33
3 files changed, 29 insertions, 21 deletions
diff --git a/examples/ex-tnpair/cluster.nix b/examples/ex-tnpair/cluster.nix
index 8d54995..5d4e1de 100644
--- a/examples/ex-tnpair/cluster.nix
+++ b/examples/ex-tnpair/cluster.nix
@@ -4,11 +4,12 @@ let
bionix = import <bionix> {
overlays = [
(_: super:
- super."${if tmpDir == null then "slurm" else "qsub"}" {
- ppn = 24;
- mem = 7;
- walltime = "3:00:00";
- } // super.lib.optionalAttrs (tmpDir != null) { inherit tmpDir; })
+ super."${if tmpDir == null then "slurm" else "qsub"}"
+ {
+ ppn = 24;
+ mem = 7;
+ walltime = "3:00:00";
+ } // super.lib.optionalAttrs (tmpDir != null) { inherit tmpDir; })
(self: super:
with super; {
@@ -27,4 +28,5 @@ let
})
];
};
-in import ./. { inherit bionix; }
+in
+import ./. { inherit bionix; }
diff --git a/examples/ex-tnpair/default.nix b/examples/ex-tnpair/default.nix
index f9581f8..65a2265 100644
--- a/examples/ex-tnpair/default.nix
+++ b/examples/ex-tnpair/default.nix
@@ -45,6 +45,7 @@ let
fetch = s: mapAttrs (_: fetchFastQGZ) s.inputs;
-in import ./tnpair.nix {
+in
+import ./tnpair.nix {
inherit pair fetch bionix;
}
diff --git a/examples/ex-tnpair/tnpair.nix b/examples/ex-tnpair/tnpair.nix
index 9e6befe..414a391 100644
--- a/examples/ex-tnpair/tnpair.nix
+++ b/examples/ex-tnpair/tnpair.nix
@@ -1,4 +1,4 @@
-{bionix ? import <bionix> {}, pair, fetch}:
+{ bionix ? import <bionix> { }, pair, fetch }:
with bionix;
with lib;
@@ -13,7 +13,7 @@ let
fetch
(align { preset = "sr"; ref = ref.grch38.seq; flags = "-R'@RG\\tID:${s.type}\\tSM:${s.type}'"; })
(sort { nameSort = true; })
- (fixmate {})
+ (fixmate { })
(sort { })
(markdup { })
];
@@ -28,21 +28,26 @@ let
bams = mapAttrs (_: preprocess) pair;
- variants = let
- somatic = strelka.callSomatic { } bams; in mapAttrs (_: flip pipe [
- (compression.uncompress { })
- (snpeff.annotate { db = ref.grch38.snpeff.db; })
- dropErrors
- (snpeff.dbnsfp { dbnsfp = ref.grch38.snpeff.dbnsfp; })
- ]) {
- "snvs.vcf" = somatic.snvs;
- "indels.vcf" = somatic.snvs;
- "germline.vcf" = strelka.call { } [bams.normal];
- };
+ variants =
+ let
+ somatic = strelka.callSomatic { } bams; in
+ mapAttrs
+ (_: flip pipe [
+ (compression.uncompress { })
+ (snpeff.annotate { inherit (ref.grch38.snpeff) db; })
+ dropErrors
+ (snpeff.dbnsfp { inherit (ref.grch38.snpeff) dbnsfp; })
+ ])
+ {
+ "snvs.vcf" = somatic.snvs;
+ "indels.vcf" = somatic.snvs;
+ "germline.vcf" = strelka.call { } [ bams.normal ];
+ };
cnvs = cnvkit.callCNV { } { normals = [ bams.normal ]; tumours = [ bams.tumour ]; };
-in linkOutputs {
+in
+linkOutputs {
inherit variants;
alignments = linkOutputs (mapAttrs' (n: nameValuePair (n + ".bam")) bams);
cnvkit = cnvs;