diff options
Diffstat (limited to 'tools/star-index.nix')
-rw-r--r-- | tools/star-index.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/star-index.nix b/tools/star-index.nix new file mode 100644 index 0000000..4bc8399 --- /dev/null +++ b/tools/star-index.nix @@ -0,0 +1,33 @@ +{ bionix +, gtf +, flags ? null +, extractSpliceSitesAttrs ? {} +, extractExonsAttrs ? {} +, overhang ? 100 +}: + +ref: + +with bionix; +with lib; +with types; + +assert (matchFiletype "star-index" { fa = _: true; } ref); + +stage { + name = "star-index"; + buildInputs = with pkgs; [ star ]; + buildCommand = '' + ln -s ${ref} ref.fa + mkdir $out + STAR --runMode genomeGenerate \ + --runThreadN $NIX_BUILD_CORES \ + --sjdbGTFfile ${gtf} \ + --genomeDir $out \ + --genomeFastaFiles ${ref} \ + --sjdbOverhang ${toString overhang} \ + ${optionalString (flags != null) flags} + ''; + passthru.multicore = true; + stripStorePaths = false; +} |