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

Define umap point size when creating cell type umaps #756

Merged
merged 2 commits into from
Apr 29, 2024

Conversation

allyhawkins
Copy link
Member

In #755 I made a fix to the UMAP point sizes variable that used the global value for a variable as the default for the function. I did that because I didn't see that variable defined anywhere in the report that uses that function, but it's defined in the main and supplemental report. With that change we need to actually define the point size when calling the functions to plot UMAPs. Otherwise, we get a failure when plotting a UMAP, since point_size isn't defined. So here, I'm just adding those lines. We could revert the change I made in #755, but I think this is more specific and easier to track what's being defined where, something that tripped me up when I was going back and making fixes in #755.

Copy link
Member

@jashapiro jashapiro left a comment

Choose a reason for hiding this comment

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

I think this change is mostly fine, but I find it confusing that the umap_point_size and umap_facet_point_size are not defined in this file. I don't think it is the worst thing, as I know this is an included file, but it is a bit strange. I wonder if we shouldn't have a comment up at the top describing what this file is & requires.

I also think you may want to change the change from #755: Specifically I would change

point_size = point_size,

to have a defined default, or don't specify one at all. So either
point_size = 1, or just point_size,

@allyhawkins
Copy link
Member Author

I think this change is mostly fine, but I find it confusing that the umap_point_size and umap_facet_point_size are not defined in this file. I don't think it is the worst thing, as I know this is an included file, but it is a bit strange. I wonder if we shouldn't have a comment up at the top describing what this file is & requires.

I agree with this sentiment about it being confusing that the point sizes are defined in the other two files rather than here. I updated this to define the point sizes only in the file that is actually using that variable. So this moves it out of main_qc_report.rmd and celltypes_supplemental_report.rmd and instead defines those values in umap_qc.rmd and celltypes_qc.rmd.

I also updated the functions in celltypes_qc.rmd to set the default point sizes to 1. And then I added a comment to the beginning of the celltypes_qc.rmd that the report is intended to be included as a child report in the main and supplemental reports.

Copy link
Member

@jashapiro jashapiro left a comment

Choose a reason for hiding this comment

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

LGTM

@allyhawkins allyhawkins merged commit 65738c9 into main Apr 29, 2024
4 checks passed
@allyhawkins allyhawkins deleted the allyhawkins/define-umap-point-sizes branch April 29, 2024 17:38
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