Skip to content

Commit

Permalink
Address PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
scanon committed Jul 31, 2024
1 parent b39ef6f commit 88df41f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
5 changes: 2 additions & 3 deletions Docker/Dockerfile_vis
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ RUN \
micromamba clean -y -a

ENV PATH="${PATH}:/opt/conda/envs/$conda_env/bin"
# eval "$(micromamba shell hook --shell bash )" && \
# micromamba activate $conda_env && \
RUN \

\RUN \
pip3 install hmmer==0.1.0 pymupdf==1.22.5 && \
chmod 775 /opt/conda/envs/$conda_env/lib/python3.7/site-packages/microbeannotator/pipeline/*.py && \
ln -s /opt/conda/envs/$conda_env/lib/python3.7/site-packages/microbeannotator/pipeline/ko_mapper.py /opt/conda/envs/$conda_env/bin/ && \
Expand Down
13 changes: 5 additions & 8 deletions Docker/create_tarfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ def get_contig_faa(line, contig_id):
if line.startswith(">"):
file_id = line[1:].rstrip().split()[0]
contig_id = "_".join(file_id.split("_")[0:-2])
contig_prefix = "-".join(file_id.split("-")[0:2])
if contig_prefix.startswith("nmdc:") and len(contig_ids) > 0 and \
contig_prefix not in contig_ids[0]:
print(f"{contig_prefix} not part of {contig_ids[0]}," +
"Please check the mapping file.", file=sys.stderr)
sys.exit(1)
return contig_id


Expand Down Expand Up @@ -239,10 +233,13 @@ def create_tarfiles(bin_dirs):
"""
This parallelize the creation of the tar files
"""
def error_cb(e):
raise e

p = Pool(threads)
for bin_dir in bin_dirs:
p.apply_async(create_tar_file, args=(bin_dir, ),
error_callback=raise)
error_callback=error_cb)
p.close()
p.join()

Expand Down Expand Up @@ -282,4 +279,4 @@ def create_tarfiles(bin_dirs):
print("Generating Krona Plot")
krona_plot(ko_result, prefix)
print("Generating zip")
create_tarfiles(bin_dirs)
create_tarfiles(bin_dirs, threads)

0 comments on commit 88df41f

Please sign in to comment.