Skip to content

Commit

Permalink
gtdbtk, fix py env + chmod pigz
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony-xy-Liu committed May 2, 2023
1 parent 55d0ad5 commit d24ef55
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@

__pycache__
cache

/lib/limes_x
2 changes: 1 addition & 1 deletion logistics/extract_mg-reads/setup/setup.smk
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ rule compile_pigz:
"""
tar -xf {input} && mv pigz pigz_lib \
&& cd pigz_lib && make \
&& cp pigz ../ && cd ../ && rm -rf pigz_lib \
&& chmod +x pigz && cp pigz ../ && cd ../ && rm -rf pigz_lib \
&& rm {input}
"""
2 changes: 1 addition & 1 deletion metagenomics/metagenomic_assembly/setup/setup.smk
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ rule compile_pigz:
"""
tar -xf {input} && mv pigz pigz_lib \
&& cd pigz_lib && make \
&& cp pigz ../ && cd ../ && rm -rf pigz_lib \
&& chmod +x pigz && cp pigz ../ && cd ../ && rm -rf pigz_lib \
&& rm {input}
"""
7 changes: 2 additions & 5 deletions metagenomics/metagenomic_binning/lib/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ def fail(msg: str):
assert isinstance(r, Path), f"expected path for reads, got {type(r)} for {r}"
zipped_reads.append(r)

# rtype = context.manifest[READ_TYPE]
# assert isinstance(rtype, str), f"invalid read type: {rtype}"
# _, read_type = rtype.split(':')

name = context.manifest[SAMPLE]
assert isinstance(name, str), f"name wasn't a str: {name}"

Expand All @@ -77,11 +73,12 @@ def fail(msg: str):
else:
single = True

# https://github.com/bxlab/metaWRAP/issues/254
# does not handle interleaved
special_read_type = " "
if single:
special_read_type = "--single-end"
if paired and single:
# https://github.com/bxlab/metaWRAP/issues/254
reads = [r for r in reads if not str(r).split(".")[-2].endswith("_2")]

#################################################################################
Expand Down
2 changes: 1 addition & 1 deletion metagenomics/metagenomic_binning/setup/setup.smk
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ rule compile_pigz:
"""
tar -xf {input} && mv pigz pigz_lib \
&& cd pigz_lib && make \
&& cp pigz ../ && cd ../ && rm -rf pigz_lib \
&& chmod +x pigz && cp pigz ../ && cd ../ && rm -rf pigz_lib \
&& rm {input}
"""

Expand Down
1 change: 1 addition & 0 deletions metagenomics/taxonomy_on_bin/lib/gtdbtk.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def gtdbtk_procedure(context: JobContext, SAMPLE, BINS, GTDBTK_WS, GTDBTK_TAX, C

code = context.shell(f"""\
mkdir -p {temp_dir}
PYTHONPATH=""
singularity run -B {",".join(binds)} {container} \
gtdbtk classify_wf -x {ext} \
--cpus {params.threads} --pplacer_cpus {int(min(params.threads, params.mem_gb//(40+1)))} \
Expand Down
2 changes: 1 addition & 1 deletion metagenomics/taxonomy_on_bin/setup/setup.smk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ rule get_image:
CONTAINER
shell:
"""
singularity build {output} docker://quay.io/txyliu/gtdbtk
singularity build {output} docker://ecogenomic/gtdbtk:2.2.6
"""

# check url if change version
Expand Down

0 comments on commit d24ef55

Please sign in to comment.