aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2019-04-08 09:33:33 +1000
committerJustin Bedo <cu@cua0.org>2019-04-08 09:33:33 +1000
commit001e834a4b8e660be8797690a2b0eb418b01fbbb (patch)
tree4201553068072c62f5f7deb6e155d7c721d3a0b5 /tools
parent51dbff37cc69737c47cd4c2c758bb252054497ad (diff)
grids: add function to include assemblies with annotated VCF
Diffstat (limited to 'tools')
-rw-r--r--tools/gridss-variants.nix10
-rw-r--r--tools/gridss.nix6
2 files changed, 16 insertions, 0 deletions
diff --git a/tools/gridss-variants.nix b/tools/gridss-variants.nix
index b564725..4f39b1e 100644
--- a/tools/gridss-variants.nix
+++ b/tools/gridss-variants.nix
@@ -111,4 +111,14 @@ rec {
gridss.assembly = assembly;
};
};
+
+ annotateAndAssemble = stage rec {
+ name = "gridss-annotateVariants-assemble";
+ buildCommand = ''
+ mkdir $out
+ ln -s ${annotate} $out/gridss.vcf
+ ln -s ${assembly} $out/gridss.bam
+ ln -s ${bionix.samtools.index indexAttrs assembly} $out/gridss.bam.bai
+ '';
+ };
}
diff --git a/tools/gridss.nix b/tools/gridss.nix
index 050a628..176bd34 100644
--- a/tools/gridss.nix
+++ b/tools/gridss.nix
@@ -53,6 +53,9 @@ rec {
*/
annotateVariants = exec (attrs: input: ((callBionix ./gridss-variants.nix attrs) input).annotate);
+ /* As annotateVariants except include assembly in output */
+ annotateAndAssemble = exec (attrs: input: ((callBionix ./gridss-variants.nix attrs) input).annotateAndAssemble);
+
/* Preprocess BAM files to extract SV reads and convert soft clips to split reads
Type: preprocessBam :: bam -> bam
*/
@@ -69,4 +72,7 @@ rec {
Type: [bam] -> GRIDSS result
*/
call = inputs: gridss.annotateVariants {} (map gridss.preprocessBam inputs);
+
+ /* As call but include assemblies in output */
+ callAndAssemble = inputs: gridss.annotateAndAssemble {} (map gridss.preprocessBam inputs);
}