-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat(qtls): flagging trans QTL credible sets #973
Conversation
This PR depends on merging #946 |
…//github.com/opentargets/gentropy into 3718-flag-trans-qtls-in-credible-set-dataset
src/gentropy/dataset/study_locus.py
Outdated
.groupby("studyLocusId") | ||
.agg( | ||
# If any of the tags of a locus is in trans position, the QTL is considered trans: | ||
f.array_contains(f.collect_set("isTagTrans"), True).alias("isTransQtl") |
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.
Here it states that the QTL is considered trans if at least one tag is trans, but in the PR description it's mentioned that a QTL is considered trans when all tagging variants are trans?
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.
Yes, thank you for finding this discrepancy. I have changed my mind, but haven't updated the description.
_df=( | ||
spark.createDataFrame(self.GENE_DATA, self.GENE_COLUMNS).select( | ||
f.struct( | ||
"strand", |
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 first strand
seems redundant
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.
Oh, yes, you are totally right.
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 PR adds a function to flag trans qtls during study locus validation. All makes sense!
@vivienho thank you for reviewing the PR! I have addressed both comments. If the tests are all passing, I'll merge the branch. |
✨ Context
QTL credible stets can be in trans or in cis position respective to the relative location of the measured gene. A QTL credible set is considered trans if:
A newly introduced boolean column is added to studyLocus schema. This column is nulls for credible sets of gwas (non-qtl) studies.