Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add CellAssign process #479
Add CellAssign process #479
Changes from 4 commits
f255997
ead459e
3d7c1c9
474d8de
61b1b6f
6ee6043
4ada0c8
88039d7
9de11fc
09565d1
d686b60
3c2715c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason we didn't have this before is because it is encoded in the rds file of the SingleR model. Since the cellassign input is just a tsv, we don't have that info.
When we pass along the SingleR results, that also should have the reference name in the output
.rds
file. Since we have to read that in anyway to get the full results tables we want to add to the output, we will have that information and don't need to pass it separately through the workflow.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just noting i'll circle back to this suggestion after final.final discussion in the PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was a bit confused: the reference name was being parsed out of the file name:
scpca-nf/bin/classify_SingleR.R
Line 78 in 67e175b
Looking back at #402, it seems like we added that variable to the table mostly for convenience, but we could have parsed it out of the file name. It seems like we are using a shorthand at the moment, but the full file name (less
.tsv
) should probably be included as the name (i.e. "PanglaoDB-blood" rather than "blood"). In nextflow this can be done withfile("path/my_model.tsv").baseName
which strips both the directory and the extension.And fun addition, if we want to do the same string parsing for the singler model files, which end with "_model.rds", we could do:
file("path/my_model.tsv").baseName - '_model'
which is so odd, but it works. If you want to be safer, use a little regex instead:file("path/my_model.tsv").baseName - ~'_model$'
. Yes, you can make a regex by just adding a ~ before a quote. Groovy is so strange, but kind of cool sometimes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My current suggestion is to punt this to a separate PR: it isn't really part of getting the cellassign process done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noting updating these to remove the singler_reference_name as well.