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

Ready for Figure generation #9

Closed
3 tasks done
josiahseaman opened this issue Jan 28, 2020 · 15 comments
Closed
3 tasks done

Ready for Figure generation #9

josiahseaman opened this issue Jan 28, 2020 · 15 comments
Assignees

Comments

@josiahseaman
Copy link
Member

josiahseaman commented Jan 28, 2020

Even more immediate than JBrowse issues 2-8 is the need to get Figures for our paper. Since the browser context won't be in the paper, we need to focus on just the rendering window. We can manually input things like start and stop #4 by editing the code.

  • Adjacent connectors drawn (this will show whether the path is present)
  • Vertical Compression: Never show rows that are not present in the current view window
  • Vertical Compression: Stack all the participants to the top of each component to show the proportion that participates in a Link (on by default)
@subwaystation
Copy link
Member

@josiahseaman Could you please explain the first point? I understand it as a duplicate of #2?
Thanks!

@subwaystation subwaystation self-assigned this Jan 30, 2020
@subwaystation
Copy link
Member

subwaystation commented Jan 30, 2020

Ah it just came to my mind, what you meant with adjacent connectors.
So we will need the connectors and still an indication, where the paths starts, right?
Because the connectors only follow a path, but don't indicate the starting or ending bin of a path.

@josiahseaman
Copy link
Member Author

100% height of a component = 100% of the individuals which participate in the component. That way LinkColumn height to be proportional. eg. 20% or 5% of population has this SV.

@subwaystation
Copy link
Member

I think we also need:
100% height of a component = 100% of paths in the whole pangenome?
So people can have an idea of the SV regarding all paths crossing the component and all paths in the pangenome.

@josiahseaman
Copy link
Member Author

Adjacent connections will show that a path is present in the component, even when it doesn't have any SVs. Without vertical compression, that does give you an indication of where a path starts or stops (kinda). But with vertical compression on (no SV phase) that per-row information is not visible. We could include a special connector symbol for beginning and end, but I think #2 is a low priority.

josiahseaman added a commit that referenced this issue Jan 31, 2020
…t in the Viewport. So now even 2,000+ paths will fit and there's no blank unused space.
josiahseaman added a commit that referenced this issue Jan 31, 2020
…t in the Viewport. So now even 2,000+ paths will fit and there's no blank unused space.
josiahseaman added a commit that referenced this issue Jan 31, 2020
…res LinkColumn used for adjacent connections #9
@subwaystation
Copy link
Member

subwaystation commented Feb 3, 2020

I am seeing really weird stuff happening when visualizing ./data/sebastian.Athaliana.all.50000.w100000.schematic.json when checking out 71217e3.

Screenshot from 2020-02-03 13-45-52
There is a rectangle directly under download. A link arrow is drawn, but no link column, etc.
Maybe

visibleHeight(){
is a problem?

@subwaystation
Copy link
Member

When taking a look at ./data/sebastian.Athaliana.all.50000.w100000.schematic.1D.json I get some weird output, too.

image

@subwaystation
Copy link
Member

subwaystation commented Feb 3, 2020

Ok, I fixed this via d0261fb. I suspect, that we might run into other issues related to .....departures.length - 1 vs. departures.length in our code.

Screenshot from 2020-02-03 15-23-16

Still need to adjust the width of the adjacent connectors.

@subwaystation
Copy link
Member

@josiahseaman As you can see here, the width of the adjacent connectors is too wide. Removing *2 in

width={this.props.binsPerPixel * 2}
takes care of that.
But then the x-coords of most! components and links does not fit anymore. We need to move a component to the left, if we have drawn any connectors. If not, we should not move them.
See e.g. between the 4th and 5th component in the picture above. The space there is one binsPerPixel smaller compared to when a connector was drawn between two components.

@josiahseaman
Copy link
Member Author

Adjacent connectors have been added as the last LinkColumn in departures. That's why I added departures.length - 1. The same could probably be done for arrivals as well. Since this is to reflect a change in the data, any old data not updated to the current format (generated by component_segmentation after 35807d427a07816e6efdec98bac330701899eaad) will render wrong.

Adjacent connectors should be our column padding size, not binsPerPixel. Sorry, I didn't know where that came from. So that we don't run into this in the future, I think I'll introduce a JSON version number which the program checks and raises an error if the data was produced in a different version than what it's expecting. That'll keep us from getting our data files crossed.

@ekg may want to do the same thing if there's any plans to update the ODGI bin output.

@ekg
Copy link

ekg commented Feb 3, 2020 via email

@josiahseaman
Copy link
Member Author

That's a very interesting point! Wouldn't their co-occurrence in a Path cause them to be linked? If they weren't connected to anything, wouldn't the sort move them to the end or beginning?

josiahseaman added a commit that referenced this issue Feb 3, 2020
This reverts commit d0261fb.  Commit was made due to lack of communication and introduces some hard to debug errors.
josiahseaman added a commit that referenced this issue Feb 3, 2020
josiahseaman added a commit that referenced this issue Feb 3, 2020
…erRow so that they don't always need to be one pixel tall. This should help sixref not look so squished.
josiahseaman added a commit that referenced this issue Feb 3, 2020
…lumn(). Refactored leftXStart to simplify code.
@subwaystation
Copy link
Member

Adjacent connectors have been added as the last LinkColumn in departures. That's why I added departures.length - 1. The same could probably be done for arrivals as well. Since this is to reflect a change in the data, any old data not updated to the current format (generated by component_segmentation after 35807d427a07816e6efdec98bac330701899eaad) will render wrong.

Adjacent connectors should be our column padding size, not binsPerPixel. Sorry, I didn't know where that came from. So that we don't run into this in the future, I think I'll introduce a JSON version number which the program checks and raises an error if the data was produced in a different version than what it's expecting. That'll keep us from getting our data files crossed.

@ekg may want to do the same thing if there's any plans to update the ODGI bin output.

So I raised a false flag by testing with malformed data....... sorry!

@josiahseaman
Copy link
Member Author

Thanks for spotting that. I'm sorry I didn't communicate the data format change more clearly. I've learned my Lesson. I think I'll work on the Histogram feature next, but this would be much more effective with a Toggle Input for the user to turn on and off vertical compression. @subwaystation would you like to try your hand at getting a toggle connected to store.useVerticalCompression?

josiahseaman added a commit that referenced this issue Feb 4, 2020
josiahseaman added a commit that referenced this issue Feb 4, 2020
…ppy with the behavior of componentDidMount containing resetRenderStats
@josiahseaman
Copy link
Member Author

All 3 features that I wanted for this issue are now in master. Mobx state updates could certainly be cleaner, but it meets our MVP needs. Matrix will be a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants