diff options
Diffstat (limited to 'tools/bowtie-align.nix')
-rw-r--r-- | tools/bowtie-align.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/bowtie-align.nix b/tools/bowtie-align.nix index 8df3dba..cca12a2 100644 --- a/tools/bowtie-align.nix +++ b/tools/bowtie-align.nix @@ -3,6 +3,7 @@ , bamOutput ? true , flags ? null , indexAttrs ? { } +, RG ? { } }: { input1 @@ -29,7 +30,9 @@ stage { fi bowtie2 -x ${bionix.bowtie.index indexAttrs ref}/ref ${optionalString (flags != null) flags} --threads $cores \ ${if input2 != null then "-1 " + fq input1 + " -2 " + fq input2 else "-U " + fq input1} \ - | samtools sort -n \ + ${optionalString (RG ? ID) '' + --rg-id ${RG.ID} ${concatMapAttrsStringsSep " " (k: v: "--rg ${k}:${v}") (filterAttrs (k: _: k != "ID") RG)} \ + ''} \ ${optionalString bamOutput "| samtools view -b"} \ > $out ''; |