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 issue #5 - GL-file-association-table #6

Merged
merged 1 commit into from
Jun 14, 2024
Merged
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
8 changes: 4 additions & 4 deletions bin/GL-gen-file-associations-table
Original file line number Diff line number Diff line change
Expand Up @@ -512,13 +512,13 @@ def gen_and_write_out_metagenomics_filenames_table(unique_filename_prefixes, map

if os.path.exists(bins_dir + output_prefix + f"bins-overview_{assay_suffix}.tsv"):
bins_overview = [file_prefix + output_prefix + f"bins-overview_{assay_suffix}.tsv"]
bins_dir_files = [file for file in os.listdir(bins_dir) if file.endswith(".fasta")]
bins_zip_files = [file for file in os.listdir(bins_dir) if file.endswith(".zip")]
else:
bins_overview = [""]

if os.path.exists(MAGs_dir + output_prefix + f"MAGs-overview_{assay_suffix}.tsv"):
MAGs_overview = [file_prefix + output_prefix + f"MAGs-overview_{assay_suffix}.tsv"]
MAGs_dir_files = [file for file in os.listdir(MAGs_dir) if file.endswith(".fasta")]
MAGs_zip_files = [file for file in os.listdir(MAGs_dir) if file.endswith(".zip")]
else:
MAGs_overview = [""]

Expand Down Expand Up @@ -605,12 +605,12 @@ def gen_and_write_out_metagenomics_filenames_table(unique_filename_prefixes, map
curr_read_mapping = [""]

if bins_overview[0] == file_prefix + output_prefix + f"bins-overview_{assay_suffix}.tsv":
curr_bins = bins_overview + [file_prefix + file for file in bins_dir_files if file.startswith(sample)]
curr_bins = bins_overview + [file_prefix + file for file in bins_zip_files if file.startswith(sample)]
else:
curr_bins = [""]

if MAGs_overview[0] == file_prefix + output_prefix + f"MAGs-overview_{assay_suffix}.tsv":
curr_MAGs = MAGs_overview + [file_prefix + file for file in MAGs_dir_files if file.startswith(sample)] + MAG_KO_files_list
curr_MAGs = MAGs_overview + [file_prefix + file for file in MAGs_zip_files if file.startswith(sample)] + MAG_KO_files_list
else:
curr_MAGs = [""]

Expand Down