Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gzip error #382

Merged
merged 4 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion modules/local/simpleaf_quant.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
}
Expand Down
8 changes: 7 additions & 1 deletion modules/local/star_align.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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 \\
Expand Down
Loading