diff --git a/modules/local/simpleaf_quant.nf b/modules/local/simpleaf_quant.nf index abb58404..53e0ccb2 100644 --- a/modules/local/simpleaf_quant.nf +++ b/modules/local/simpleaf_quant.nf @@ -39,7 +39,11 @@ process SIMPLEAF_QUANT { save_whitelist = "" if (!(args_list.any { it in ['-k', '--knee', '-e', '--expect-cells', '-f', '--forced-cells']} || meta.expected_cells)) { if (whitelist) { - unzip_whitelist = "gzip -dcf $whitelist > whitelist.uncompressed.txt" + if (whitelist.name.endsWith('.gz')) { + unzip_whitelist = "gzip -dcf $whitelist > whitelist.uncompressed.txt" + } else { + unzip_whitelist = "cp $whitelist whitelist.uncompressed.txt" + } unfiltered_command = "-u whitelist.uncompressed.txt" save_whitelist = "mv whitelist.uncompressed.txt ${prefix}_alevin_results/" } diff --git a/modules/local/star_align.nf b/modules/local/star_align.nf index 4b3df1e1..0b26e037 100644 --- a/modules/local/star_align.nf +++ b/modules/local/star_align.nf @@ -54,12 +54,18 @@ process STAR_ALIGN { // separate forward from reverse pairs def (forward, reverse) = reads.collate(2).transpose() """ + if [[ $whitelist == *.gz ]]; then + gzip -cdf $whitelist > whitelist.uncompressed.txt + else + cp $whitelist whitelist.uncompressed.txt + fi + STAR \\ --genomeDir $index \\ --readFilesIn ${reverse.join( "," )} ${forward.join( "," )} \\ --runThreadN $task.cpus \\ --outFileNamePrefix $prefix. \\ - --soloCBwhitelist <(gzip -cdf $whitelist) \\ + --soloCBwhitelist whitelist.uncompressed.txt \\ --soloType $protocol \\ --soloFeatures $star_feature \\ $other_10x_parameters \\