mgnify-pipelines-toolkit 1.2.1__py3-none-any.whl → 1.2.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mgnify-pipelines-toolkit might be problematic. Click here for more details.

@@ -300,23 +300,24 @@ def main():
300
300
  if paired_end:
301
301
  rev_fr.close()
302
302
 
303
- ref_db = ""
304
-
305
- if len(taxa_df.columns) == 9:
306
- tax_assignment_dict = make_tax_assignment_dict_silva(taxa_df, asv_dict)
307
- ref_db = "silva"
308
- elif len(taxa_df.columns) == 10:
309
- tax_assignment_dict = make_tax_assignment_dict_pr2(taxa_df, asv_dict)
310
- ref_db = "pr2"
311
-
312
- with open(f"./{sample}_{amp_region}_{ref_db}_asv_krona_counts.txt", "w") as fw:
313
- for tax_assignment, count in tax_assignment_dict.items():
314
- fw.write(f"{count}\t{tax_assignment}\n")
315
-
316
- asv_count_df = generate_asv_count_dict(asv_dict)
317
- asv_count_df.to_csv(
318
- f"./{sample}_{amp_region}_asv_read_counts.tsv", sep="\t", index=False
319
- )
303
+ if asv_dict: # if there are matches between taxonomic and ASV annotations
304
+ ref_db = ""
305
+
306
+ if len(taxa_df.columns) == 9:
307
+ tax_assignment_dict = make_tax_assignment_dict_silva(taxa_df, asv_dict)
308
+ ref_db = "silva"
309
+ elif len(taxa_df.columns) == 10:
310
+ tax_assignment_dict = make_tax_assignment_dict_pr2(taxa_df, asv_dict)
311
+ ref_db = "pr2"
312
+
313
+ with open(f"./{sample}_{amp_region}_{ref_db}_asv_krona_counts.txt", "w") as fw:
314
+ for tax_assignment, count in tax_assignment_dict.items():
315
+ fw.write(f"{count}\t{tax_assignment}\n")
316
+
317
+ asv_count_df = generate_asv_count_dict(asv_dict)
318
+ asv_count_df.to_csv(
319
+ f"./{sample}_{amp_region}_asv_read_counts.tsv", sep="\t", index=False
320
+ )
320
321
 
321
322
 
322
323
  if __name__ == "__main__":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mgnify_pipelines_toolkit
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: Collection of scripts and tools for MGnify pipelines
5
5
  Author-email: MGnify team <metagenomics-help@ebi.ac.uk>
6
6
  License: Apache Software License 2.0
@@ -1,7 +1,7 @@
1
1
  mgnify_pipelines_toolkit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  mgnify_pipelines_toolkit/analysis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  mgnify_pipelines_toolkit/analysis/amplicon/classify_var_regions.py,sha256=W0ob9z_8sjrB1Ck48Ac-_5Vw2kyoRFalcxhrR6KSXpI,20196
4
- mgnify_pipelines_toolkit/analysis/amplicon/make_asv_count_table.py,sha256=soTewFddtebW-EcejGh9whs3cBLWJrGCYdPc0KukoAw,8756
4
+ mgnify_pipelines_toolkit/analysis/amplicon/make_asv_count_table.py,sha256=ohguvrMSg7GuiiZ5aHj1DvCnfThKFUG4s13LUSMM0mo,8892
5
5
  mgnify_pipelines_toolkit/analysis/amplicon/mapseq_to_asv_table.py,sha256=BLqhflblUegCvuQic16PrFXfIXlFWmGkmWJyl4wJoLQ,5040
6
6
  mgnify_pipelines_toolkit/analysis/amplicon/primer_val_classification.py,sha256=Bmc4Yu8inpT6AVTG1zwxp9F9mknIDLY33-UuFdaZuq0,3756
7
7
  mgnify_pipelines_toolkit/analysis/amplicon/remove_ambiguous_reads.py,sha256=Wu4tRtuRkgd3hoeuwPl_E5ghxIW7e_1vrcvFGWv_U4A,3173
@@ -42,9 +42,9 @@ mgnify_pipelines_toolkit/schemas/schemas.py,sha256=pyDZvCuWbwccQF0D7c5BN1vv36wQd
42
42
  mgnify_pipelines_toolkit/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
43
  mgnify_pipelines_toolkit/utils/fasta_to_delimited.py,sha256=lgYIR1S4crURY7C7nFtgE6QMV4u4zCNsUrVkcRnsEEo,3996
44
44
  mgnify_pipelines_toolkit/utils/get_mpt_version.py,sha256=aS9bWrC9CP7tpxoEVg6eEYt18-pmjG7fJl5Mchz4YOU,798
45
- mgnify_pipelines_toolkit-1.2.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
46
- mgnify_pipelines_toolkit-1.2.1.dist-info/METADATA,sha256=CIH7XH5WIzQMc0e2MfYFlWCnV1hokgYaQskYsfobzao,5775
47
- mgnify_pipelines_toolkit-1.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
- mgnify_pipelines_toolkit-1.2.1.dist-info/entry_points.txt,sha256=d7r4_VUS1hWNMnTJOy8u2kTRSFcy-sDN5NLRUXz-IhU,3041
49
- mgnify_pipelines_toolkit-1.2.1.dist-info/top_level.txt,sha256=xA_wC7C01V3VwuDnqwRM2QYeJJ45WtvF6LVav4tYxuE,25
50
- mgnify_pipelines_toolkit-1.2.1.dist-info/RECORD,,
45
+ mgnify_pipelines_toolkit-1.2.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
46
+ mgnify_pipelines_toolkit-1.2.2.dist-info/METADATA,sha256=MRDDDp1xhJhoIc-rU1IKWASfleAvFXsJLyhaoG8FLUg,5775
47
+ mgnify_pipelines_toolkit-1.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
+ mgnify_pipelines_toolkit-1.2.2.dist-info/entry_points.txt,sha256=d7r4_VUS1hWNMnTJOy8u2kTRSFcy-sDN5NLRUXz-IhU,3041
49
+ mgnify_pipelines_toolkit-1.2.2.dist-info/top_level.txt,sha256=xA_wC7C01V3VwuDnqwRM2QYeJJ45WtvF6LVav4tYxuE,25
50
+ mgnify_pipelines_toolkit-1.2.2.dist-info/RECORD,,