cafferychen777 / ggpicrust2

Make Picrust2 Output Analysis and Visualization Easier
https://cafferychen777.github.io/ggpicrust2/
Other
91 stars 11 forks source link

pathway_heatmap cannot reorder #90

Open gaimingle10 opened 4 months ago

gaimingle10 commented 4 months ago

Dear Dr. Chen,

I want to reorder the pathway name by their classes belonging to. But it is not useful. Here is the code I used.

p1<-pathway_heatmap(
abundance = abundance %>%
right_join(
daa_annotated_sub_method_results_df02 %>% dplyr::select(feature, pathway_map),
by = c("function." = "feature")
) %>%
filter(function. %in% feature_with_p_0.05$feature) %>%
dplyr::select(-function.) %>%
column_to_rownames("pathway_map")%>%
dplyr::arrange(pathway_class), # I used dyplyr::arrange to order here metadata = map,
group = "Environment"
)

cafferychen777 commented 4 months ago

Dear @gaimingle10,

Thank you for reaching out and providing the details of the issue you're encountering. From the code snippet you've shared, it seems like you are trying to reorder the pathway names based on their respective classes within your heatmap.

To assist you more effectively, it would be beneficial to have a closer look at your dataset. Could you please send the relevant data files, specifically the abundance, daa_annotated_sub_method_results_df02, feature_with_p_0.05, and map objects? Having access to this data will allow me to understand the structure and content of your datasets, enabling me to provide a more accurate and tailored solution to your problem.

You can send the files via email or through any secure file transfer service you prefer. Once I have the data, I'll be able to delve into the issue more deeply and suggest a more precise solution.

Thank you for your cooperation, and I look forward to resolving this issue for you.

Best regards, Chen YANG