Skip to content

Commit

Permalink
add reporting of num contigs to anvi-show-collections-and-bins
Browse files Browse the repository at this point in the history
  • Loading branch information
ivagljiva committed Jan 24, 2025
1 parent 0937cc5 commit f3fa750
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/anvi-show-collections-and-bins
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,16 @@ def main(args):
"http://merenlab.org/2016/06/22/anvio-tutorial-v2/#anvi-import-collection)")

for source in collections.collections_dict:
num_contigs = 0
for bin_name, split_list in collections.get_collection_dict(source).items():
contig_set = set([x.split("_split")[0] for x in split_list])
num_contigs += len(contig_set)

run.warning('', header = 'Collection: "%s"' % source, lc = 'green')
run.info('Collection ID', source)
run.info('Number of bins', collections.collections_dict[source]['num_bins'])
run.info('Number of splits described', collections.collections_dict[source]['num_splits'])
run.info('Number of contigs described', num_contigs)
run.info('Bin names', ', '.join(sorted(collections.collections_dict[source]['bin_names'].split(','))), nl_after = 2)


Expand Down

0 comments on commit f3fa750

Please sign in to comment.