fix: making the TSSDistance behaviour consistent#806
fix: making the TSSDistance behaviour consistent#806DSuveges wants to merge 1 commit intoEnsembl:release/115from
Conversation
jamie-m-a
left a comment
There was a problem hiding this comment.
Hi @DSuveges
I'm fine with having this plugin use absolute distance for upstream, but we generally do not alter default behaviour where possible (people build things in to pipelines, changing defaults can have impacts). So I would suggest that both_direction retains it's original return of upstream having a negative sign. Then, instead of having the signed_distance param, swap this for absolute_distance. Then both_direction + absolute_distance would = TSSDistance => abs($dist)
|
Hi @jamie-m-a , thanks for the review! Actually I 100% agree, the reason behind the above default implementation was to mimic how the transcript |
The problem
Currently if users extract distances from TSS for both directions (
-plugin TSSDistance,both_direction=1), the value of downstream distances are negative. This behaviour is not consistent how distance is reported, where all reported distance is positive irrespective if the variant is up or downstream.This PR allows users to provide and extra parameter to the
TSSDistanceplugin (signed_distance=1), which would allow for negative values, otherwise (by default) only positive distance is returned.Testing
I picked
"chr4:1804392 G/A", a missense variant for testing, which has a downstream position from the TSS of the overlapping gene. What I got with different runs:--plugin TSSDistance: no tss distance is in the output, as the default behaviour prevents that.--plugin TSSDistance,both_direction=1:"tssdistance": 11099positive distance however downstream position.--plugin TSSDistance,both_direction=1,signed_distance=1:"tssdistance": -11099,the distance value is signed.Please take a look and let me know if there's something wrong with my thought process.