aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2018-11-22 10:43:54 +1100
committerJustin Bedo <cu@cua0.org>2018-11-22 10:43:54 +1100
commit24ee2349c16f159f2627665938fd76d599055a9a (patch)
tree54a5bce88dc1403f67f58457c2b27882bc32d193
parent90dd48b019ff7bf9e74d202c1deace6a0896cde5 (diff)
gridss: fix configure file optional string error
-rw-r--r--tools/gridss-annotateVariants.nix2
-rw-r--r--tools/gridss-callVariants.nix2
-rw-r--r--tools/gridss-collectMetrics.nix2
-rw-r--r--tools/gridss-computeSamTags.nix2
-rw-r--r--tools/gridss-extractSVReads.nix11
-rw-r--r--tools/gridss-identifyVariants.nix10
-rw-r--r--tools/gridss-softClipsToSplitReads.nix4
7 files changed, 16 insertions, 17 deletions
diff --git a/tools/gridss-annotateVariants.nix b/tools/gridss-annotateVariants.nix
index 33992c4..4422cd6 100644
--- a/tools/gridss-annotateVariants.nix
+++ b/tools/gridss-annotateVariants.nix
@@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
INPUT_VCF=input.vcf \
OUTPUT_VCF=out.vcf \
WORKING_DIR=$TMPDIR/ \
- ${optionalString config ("CONFIGURATION_FILE=" + gridssConfig config)} \
+ ${optionalString (config != null) ("CONFIGURATION_FILE=" + gridssConfig config)} \
TMP_DIR=$TMPDIR/
mv out.vcf $out
diff --git a/tools/gridss-callVariants.nix b/tools/gridss-callVariants.nix
index dc978fa..9afaf65 100644
--- a/tools/gridss-callVariants.nix
+++ b/tools/gridss-callVariants.nix
@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
WORKER_THREADS=$NIX_BUILD_CORES \
TMP_DIR=. \
WORKING_DIR=. \
- ${optionalString config ("CONFIGURATION_FILE=" + gridssConfig config)} \
+ ${optionalString (config != null) ("CONFIGURATION_FILE=" + gridssConfig config)} \
REFERENCE_SEQUENCE="ref.fa" \
${concatMapStringsSep " " (i: "INPUT=\"${i}\"") inputs} \
OUTPUT="$out/gridss.vcf" \
diff --git a/tools/gridss-collectMetrics.nix b/tools/gridss-collectMetrics.nix
index c1909f1..38bacc6 100644
--- a/tools/gridss-collectMetrics.nix
+++ b/tools/gridss-collectMetrics.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
mkdir $out
java -Xmx1G -cp ${bionix.gridss.jar} \
gridss.analysis.CollectGridssMetrics \
- ${optionalString config ("CONFIGURATION_FILE=" + gridssConfig config)} \
+ ${optionalString (config != null) ("CONFIGURATION_FILE=" + gridssConfig config)} \
I=${input}\
O=$out/input \
AS=true \
diff --git a/tools/gridss-computeSamTags.nix b/tools/gridss-computeSamTags.nix
index 5b19a3a..ebcc5b8 100644
--- a/tools/gridss-computeSamTags.nix
+++ b/tools/gridss-computeSamTags.nix
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
REFERENCE_SEQUENCE=ref.fa \
WORKING_DIR=$TMP_DIR \
TMP_DIR=$TMP_DIR \
- ${optionalString config ("CONFIGURATION_FILE=" + gridssConfig config)} \
+ ${optionalString (config != null) ("CONFIGURATION_FILE=" + gridssConfig config)} \
I=${input} \
O=$out \
AS=true
diff --git a/tools/gridss-extractSVReads.nix b/tools/gridss-extractSVReads.nix
index e3ed1cc..b5ceffb 100644
--- a/tools/gridss-extractSVReads.nix
+++ b/tools/gridss-extractSVReads.nix
@@ -27,16 +27,17 @@ stdenv.mkDerivation rec {
ln -s ${bionix.samtools.faidx faidxAttrs ref} ref.fa.fai
ln -s ${bionix.samtools.dict dictIndexAttrs ref} ref.fa.dict
ln -s ${input} input.bam
- mkdir $out
+ for f in ${bionix.gridss.collectMetrics collectMetricsAttrs input}/* ; do
+ ln -s $f
+ done
java -Dsamjdk.create_index=true \
-cp ${bionix.gridss.jar} gridss.ExtractSVReads \
REFERENCE_SEQUENCE=ref.fa \
I=input.bam \
- O=$out/input.sv.bam \
- METRICS_OUTPUT=$out/input.sv_metrics \
- INSERT_SIZE_METRICS=$out/input.insert_size_metrics \
+ O=$out \
UNMAPPED_READS=${if unmappedReads then "true" else "false"} \
- ${optionalString config ("CONFIGURATION_FILE=" + gridssConfig config)} \
+ ${optionalString (config != null) ("CONFIGURATION_FILE=" + gridssConfig config)} \
MIN_CLIP_LENGTH=${toString minClipLength}
'';
+ passthru.filetype = input.filetype;
}
diff --git a/tools/gridss-identifyVariants.nix b/tools/gridss-identifyVariants.nix
index 16982e2..c91de00 100644
--- a/tools/gridss-identifyVariants.nix
+++ b/tools/gridss-identifyVariants.nix
@@ -42,26 +42,24 @@ assert (homoRef);
stdenv.mkDerivation rec {
name = "gridss-identifyVariants";
- buildInputs = [ jre ];
+ buildInputs = [ jre samtools ];
buildCommand = ''
ln -s ${ref} ref.fa
ln -s ${bionix.samtools.faidx faidxAttrs ref} ref.fa.fai
for f in ${bionix.bwa.index bwaIndexAttrs ref}/*; do
ln -s $f
done
- ${concatMapStringsSep "\n" (linkInput extractSVReads extractSVReadsAttrs) inputs}
+ ${concatMapStringsSep "\n" (linkSV) inputs}
+ ${linkSV assembly}
${concatMapStringsSep "\n" (linkInput collectMetrics collectMetricsAttrs) inputs}
${linkInput collectMetrics collectMetricsAttrs assembly}
- ASSBASE=$(basename ${assembly})
- ln -s ${assembly} $ASSBASE.gridss.working/$ASSBASE.sv.bam
- ln -s ${bionix.samtools.index {} assembly} $ASSBASE.gridss.working/$ASSBASE.sv.bai
java -Xmx4g -Dsamjdk.create_index=true \
-cp ${jar} gridss.IdentifyVariants \
REFERENCE_SEQUENCE=ref.fa \
${concatMapStringsSep " " (i: "INPUT='${i}'") inputs} \
ASSEMBLY=${assembly} \
OUTPUT_VCF=out.vcf \
- ${optionalString config ("CONFIGURATION_FILE=" + gridssConfig config)} \
+ ${optionalString (config != null) ("CONFIGURATION_FILE=" + gridssConfig config)} \
WORKING_DIR=$TMPDIR/ \
TMP_DIR=$TMPDIR/
diff --git a/tools/gridss-softClipsToSplitReads.nix b/tools/gridss-softClipsToSplitReads.nix
index 5fce894..1f9c8b4 100644
--- a/tools/gridss-softClipsToSplitReads.nix
+++ b/tools/gridss-softClipsToSplitReads.nix
@@ -34,8 +34,8 @@ stdenv.mkDerivation rec {
I=${input} \
O=$out \
${optionalString alignerStreaming "ALIGNER_STREAMING=true"} \
- ${optionalString config ("CONFIGURATION_FILE=" + gridssConfig config)} \
+ ${optionalString (config != null) ("CONFIGURATION_FILE=" + bionix.gridss.gridssConfig config)} \
WORKER_THREADS=$NIX_BUILD_CORES
'';
- passthru.filetype = filetype.bam { ref = ref; sort = sorting.none {}; }
+ passthru.filetype = filetype.bam { ref = ref; sorting = matchFileSorting "grids-softClipsToSplitReads" { coord = _: input.sorting; name = _: sort.none {}; none = _: input.sorting;} input;};
}