Giter Club home page Giter Club logo

Comments (5)

ACEnglish avatar ACEnglish commented on July 22, 2024 1

Hello,

It took a while, but I finally found time to build this. The next release will have a collapse flag for--median-info. It adds three new info fields:

##INFO=<ID=CollapseStart,Number=1,Type=Integer,Description="Median start position of collapsed variants">
##INFO=<ID=CollapseEnd,Number=1,Type=Integer,Description="Median end position of collapsed variants">
##INFO=<ID=CollapseSize,Number=1,Type=Integer,Description="Median size of collapsed variants">

Note that I didn't test this extensively. So let me know how it goes.

from truvari.

ACEnglish avatar ACEnglish commented on July 22, 2024

Hello,

I'm happy to hear you find Truvari useful.

This is an interesting request. My first reaction is to say no, we won't do that exactly as described. Because truvari doesn't use any sequencing information, I don't feel like it really has the authority to change variant representations. And if we opened the door to changing variants, we'd maybe want to consider options like weighing the median breakpoints based on variant depth or AF. How that information is stored in a VCF can get really messy and I can imagine it becomes a huge development burden. Additionally, one of my main design goals is to have inputs/outputs be cleanly traceable (e.g. every variant representation given to collapse ends up either in the output VCF or the collapsed (i.e. removed) output VCF). So, if Truvari creates brand new variant representations, it gets a little tricky to figure out how to make that traceable - not to mention making it cleanly compatible across all the variant representations possible (e.g. what would the 'median' insertions's ALT sequence be?). Everyone's VCFs look a little different and I don't want to add more expectations on what their VCFs look like nor do I want to add more noise to that mix.

Having said that, I do think it may be reasonable to collect the median information and supplement the output VCF's INFO fields with it. Then, if users are interested in changing their variants, Truvari can help them work it out while taking on none of the variant representation responsibility. An initial design would be to add something like INFO/Median[Start/End/Len] which could be calculated beside INFO/NumCollapsed in the code.

Please let me know what you think of this idea of adding Median annotations.

Have a great day,
~/Adam English

from truvari.

lgmgeo avatar lgmgeo commented on July 22, 2024

Thank you so much for your detailed answer, that makes sense to me!

Indeed, adding INFO/Median[Start/End/Len] could be really helpful to explore data from large cohorts.
May I request to also add the minimum start and maximum end in the cluster INFO/[MinStart/MaxEnd]?

Thank you very much for Truvari,

Have a great week-end,

Véronique

from truvari.

ACEnglish avatar ACEnglish commented on July 22, 2024

Sounds good. I'm going to use this ticket to track the development so feel free to unsubscribe to the notifications.

I was close to cutting a v4.0.0 release with a bunch of changes so I'll use the weekend to figure out if I want to get this in for 4.0 or the inevitable 4.1.

Dev notes:

  • add header definitions of new fields in truvari.collapse.edit_header.
  • populate the INFO fields inside truvari.collapse.annotate_entry
  • clean up the interface for annotate_entry since passing a parameter per-INFO isn't ideal
  • make a new method collapse_boundaries or calculate_position that takes the kept entry and the set of collapsed entries to return the Start/End/Len ranges which will need to be passed to annotate_entry.
  • can call the new method inside truvari.collapse.output_writer
  • this change will break probably all of repo_utils/sub_tests/collapse.sh, so will need to update VCFs in repo_utils/answer_key/collapse

from truvari.

lgmgeo avatar lgmgeo commented on July 22, 2024

Great!
Thank you

from truvari.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.