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

Sort by category #57

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Sort by category #57

wants to merge 2 commits into from

Conversation

AnneliektH
Copy link
Collaborator

Added --sort-by-category to clustermap1. Instead of clustering the rows (samples) we can sort them by a category (treatment, or something else).

@ctb ready for review

@@ -855,6 +855,10 @@ def __init__(self, subparser):
"--no-y-labels", action="store_true",
help="disable Y axis labels"
)
subparser.add_argument(
"--sort-by-category", action="store_true",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"--sort-by-category", action="store_true",
"--sort-rows-by-category", action="store_true",

You could imagine we might want to sort cols by category too ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(so having this be --sort-rows... leaves that option open - not that we need to implement it now)


# optional sorting samples by category
if args.sort_by_category:
query_d = manysearch_rows_to_index(rows, column_name='query_name')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks good! can you move into a separate function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants