Skip to content

Commit

Permalink
Ensure that only directories get picked up for sample names
Browse files Browse the repository at this point in the history
Fix bug where pipeline stalls if there are any loose files under project directory
  • Loading branch information
mcmero committed Mar 26, 2024
1 parent bb47b96 commit ea5cf6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workflow/rules/archive.smk
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ rule archive_complete:
shell:
"""
transfer_path={params.data_dir}/{wildcards.project}/{params.transfer_dir}
samples=`ls {params.data_dir}/{wildcards.project}/ | grep -v _transfer`
samples=`find {params.data_dir}/{wildcards.project} -type d -maxdepth 1 -depth 1 -exec basename {{}} \; | grep -v _transfer`
for sample in $samples; do
count_file_regex=`echo -e ".*\/{wildcards.project}_${{sample}}_[pod5|bam|fast|reports].*_list\.txt"`
count_files=`find $transfer_path -type f -regex $count_file_regex`
Expand Down

0 comments on commit ea5cf6b

Please sign in to comment.