Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Add alluvial plots to summary stats script #23

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

rjcorb
Copy link
Contributor

@rjcorb rjcorb commented Nov 29, 2023

Purpose/implementation Section

What scientific question is your analysis addressing?

Closes #20. This PR updates 02-summary_stats.R script to add alluvial plot showing concordance between predicted ancestry, reported race, and reported ethnicity in PBTA ancestry cohort.

What was your approach?

  • formatted metadata df for alluvial plotting
  • generated plot without legends
  • created three separate "legend-only" plots for predicted_ancestry, race, and ethnicity, and used cowplot() to arrange these with the alluvial plot

What GitHub issue does your pull request address?

#20

Directions for reviewers. Tell potential reviewers what kind of feedback you are

soliciting.

Which areas should receive a particularly close look?

Please review new code for formatting data and generating alluvial plot.

Is there anything that you want to discuss further?

The current code for creating group-specific legends is a bit cumbersome, so any recommendations on how to streamline this are welcome!

Is the analysis in a mature enough form that the resulting figure(s) and/or table(s) are

ready for review?

Yes

Results

What types of results are included (e.g., table, figure)?

What is your summary of the results?

Reproducibility Checklist

  • The dependencies required to run the code in this pull request have been added to the
    project Dockerfile.

Documentation Checklist

  • This analysis module has a README and it is up to date.
  • The analytical code is documented and contains comments.

@rjcorb rjcorb requested a review from zzgeng November 29, 2023 16:45
@jharenza
Copy link
Collaborator

Nice plot! I might also suggest writing out the predicted ancestries maybe with abbreviations in parentheses in the legend since every other legend group has them written out

Copy link

@zzgeng zzgeng left a comment

Choose a reason for hiding this comment

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

Ohh I leave the comment in wrong PR . Approving

@rjcorb rjcorb merged commit 49c10d5 into main Nov 30, 2023
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updated analysis: add alluvial plots for predicted ancestry vs. reported race, ethnicity
3 participants