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

After sorted by one of sample annotations, is main plot sorted by mutation by that annotation #1075

Open
wangzunq opened this issue Nov 21, 2024 · 9 comments

Comments

@wangzunq
Copy link

Describe the issue
So I want the oncoplot cluster by cohort, which has A, B,C and is one of sample annotations. Also, I want to still keep gene sorted by mutation frequency as well as sample sorted by mutation frequency in each cohort as well. So it looks like a waterfall for each cohort.
The question is: when I choose sortbyAnnotation(cohort) will the order per cohort is sorted by sample level mutation frequency(meaning the samples in each cohort is sorted independently according to mutation frequency)
Thank you for clarifying.

@wangzunq
Copy link
Author

Any help is appreciated. I try to do manually to retrieve sample names that first sorted by cohort and within each to count occurrences of sample names to get the sample_order. Also, gene freq is calculated as a whole and sorted descending regardless of cohort. But it doesn’t seem like a waterfall for each cohort. Why is that?

@wangzunq
Copy link
Author

I know gene order isn’t same if sorted by frequency for each cohort. Is there a way to make it look like a waterfall for each cohort

@PoisonAlien
Copy link
Owner

Hi,

Sorry for the delay. Could you please post an example image of what you expect and how it is being shown?

@wangzunq
Copy link
Author

I just did and got the sample order. Default is good to go! But it takes a bit time backend sorting algorithms figuring out, I think sort by annotation and within each cluster it is sorted by gene mutation frequency. And I did manually with this sample order and compared with default it is exactly same. I just have to make sure other plots are following same order. Such as Gistic oncoplot.

@wangzunq
Copy link
Author

Actually still different. Could you help provide the back end script that did sample order sorting? Given the df with Hugo_Symbol, tumor_bar_code, cohort. I really need the sample order is when it is automatically sorted by oncoplot. Thanks for help

@PoisonAlien
Copy link
Owner

Hi,

I still have trouble understanding the issue here. If you want the oncoplot columns to be in a specific order, try the sampleOrder argument.

@wangzunq
Copy link
Author

wangzunq commented Dec 17, 2024 via email

@PoisonAlien
Copy link
Owner

Hi,

Here is the internal function that creates the sorted onco-matrix.

@wangzunq
Copy link
Author

wangzunq commented Dec 17, 2024 via email

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

No branches or pull requests

2 participants