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

Set individual exponent with .json or .tsv. #52

Open
ACastanza opened this issue Mar 14, 2022 · 7 comments
Open

Set individual exponent with .json or .tsv. #52

ACastanza opened this issue Mar 14, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@ACastanza
Copy link
Collaborator

ACastanza commented Mar 14, 2022

The current behavior is to use a constant as the exponent for weighting the K-S or AUC calculation. Under certain circumstances it may be desirable to set this exponent on a per-gene basis.

To do so, it might be useful to allow this parameter to alternatively accept a json file containing a key-value pair where each gene(key) is assigned the exponent(value) that should be used when weighting that gene.

Ideally the current behavior to allow a constant for standard usage would be preserved as well.

@KwatMDPhD
Copy link
Member

KwatMDPhD commented Mar 14, 2022

exponent = number | .tsv of the same shape as the feature_x_sample_x_(numbner|metric).tsv, where corresponding feature_x_sample_x_exponent.tsv applies to feature_x_sample_x_(...).tsv.

@KwatMDPhD KwatMDPhD self-assigned this Mar 14, 2022
@KwatMDPhD
Copy link
Member

| .json feature-to-exponent (this is useful as you said for people who have a saved weighting system.)

@ACastanza
Copy link
Collaborator Author

ACastanza commented Mar 14, 2022

exponent = number | .tsv of the same shape as the feature_x_sample_x_(numbner|metric).tsv, where corresponding feature_x_sample_x_exponent.tsv applies to feature_x_sample_x_(...).tsv.

In most cases I think we would only need one possible exponent for each gene, so it would be more the shape of the gene_x_metric_score matrix, so just a two column file where the first column is the gene and the second column is the weighting exponent to use for that gene.

I suppose this might be different for ssGSEA where maybe you'd want the ability to set a different exponent for different samples, but I think if that were to be the case the samples could probably be run separately.

@ACastanza
Copy link
Collaborator Author

| .json feature-to-exponent (this is useful as you said for people who have a saved weighting system.)

I don't actually have a preference for using TSV or json for this, I'd just suggested json because you seemed to like using that structure, and in python it has some benefits in its easy conversion to dict

@KwatMDPhD
Copy link
Member

This is more involved than expected. Do you think this is something people can do in pre-rank fashion? They can make their vector is whatever way they wish?

@ACastanza
Copy link
Collaborator Author

I don't think manually applying it to preranked data would really do what I'd want it to do

@KwatMDPhD
Copy link
Member

Got it. Will make it happen. Excited to see your use case!

@KwatMDPhD KwatMDPhD added the enhancement New feature or request label Jul 12, 2022
@KwatMDPhD KwatMDPhD changed the title Feature Request: Dynamically set weighting exponenet using Key:Value pair json Set individual exponent with .json. Aug 1, 2023
@KwatMDPhD KwatMDPhD changed the title Set individual exponent with .json. Set individual exponent with .json or .tsv. Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants