Skip to content

Commit

Permalink
fix: rename bins with SID
Browse files Browse the repository at this point in the history
  • Loading branch information
rroutsong committed Jul 29, 2024
1 parent 4f9e7f1 commit 4f382f0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions workflow/rules/DNA.smk
Original file line number Diff line number Diff line change
Expand Up @@ -420,14 +420,15 @@ rule metawrap_binning:
-x {params.max_perc_contam}
cp -r {params.tmp_binref_dir}/* {params.bin_dir}
for this_bin in `find {params.bin_dir} -type f -regex ".*/bin.[0-9][0-9]?[0-9]?.fa";
do
fn = ${$(basename $this_bin)%.*}
to = $(dirname $this_bin)/{wildcards.name}_$fn
mv $mw_bin $to
bold=$(tput bold)
normal=$(tput sgr0)
for this_bin in `find {params.bin_dir} -type f -regex ".*/bin.[0-9][0-9]?[0-9]?.fa"`; do
fn=$(basename $this_bin)
to=$(dirname $this_bin)/{wildcards.name}_$fn
echo "relabeling ${{bold}}$fn${{normal}} to ${{bold}}{wildcards.name}_$fn${{normal}}"
mv $this_bin $to
done
touch {output.bin_breadcrumb}
chmod -R 775 {params.bin_dir}
"""
Expand Down

0 comments on commit 4f382f0

Please sign in to comment.