Skip to content

Commit

Permalink
try new sort
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisAta committed Jul 12, 2024
1 parent ce782dd commit e274cfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@
import argparse
from collections import defaultdict
import logging
import random

import pandas as pd

from mgnify_pipelines_toolkit.constants.tax_ranks import _SILVA_TAX_RANKS, _PR2_TAX_RANKS

logging.basicConfig(level=logging.DEBUG)
random.seed(12)

def parse_args():
parser = argparse.ArgumentParser()
Expand Down Expand Up @@ -238,6 +236,7 @@ def generate_asv_count_dict(asv_dict):
res_dict['count'].append(count)

res_df = pd.DataFrame.from_dict(res_dict)
res_df = res_df.sort_values(by='asv', ascending=True)
res_df = res_df.sort_values(by='count', ascending=False)

return res_df
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
- path: "sample_concat.txt_pr2_asv_krona_counts.txt"
md5sum: 5b9ee7fe1109d728ab18a95c232b0c1b
- path: "sample_concat.txt_asv_read_counts.tsv"
md5sum: e449c65abb1706d770de36b90f4a0333
md5sum: f195ac10c5ed58ea5e5fa91955554da7

0 comments on commit e274cfa

Please sign in to comment.