mobie / spatial-transcriptomics-example-project

An example project for spatial transcriptomics data
0 stars 0 forks source link

SpotDisplay class #2

Open tischi opened 2 years ago

tischi commented 2 years ago

Hi @constantinpape,

I think it would make sense for SpotDisplay to extend AnnotationDisplay:

public abstract class AnnotationDisplay< A extends Annotation > extends AbstractDisplay< AnnotationType< A > >
{
    // Serialization
    protected String lut = LUTs.GLASBEY;
    protected String colorByColumn;
    protected Double[] valueLimits;
    protected boolean showScatterPlot = false;
    protected String[] scatterPlotAxes = new String[]{ ColumnNames.ANCHOR_X, ColumnNames.ANCHOR_Y };
    protected List< String > tables; // column chunks to display
    protected boolean showTable = true;
    protected boolean showAsBoundaries = false;
    protected float boundaryThickness = 1.0F;
    protected int randomColorSeed = 42;

Do you envision to also support all those field in the JSON spec of spotDisplay?

tischi commented 2 years ago

do we want to add a selectedSpotIds?

constantinpape commented 2 years ago

I think it would make sense for SpotDisplay to extend AnnotationDisplay:

Yes, I agree.

protected boolean showAsBoundaries = false; protected float boundaryThickness = 1.0F;

These two don't make sense for spots. All the others do make sense.

do we want to add a selectedSpotIds?

Yes!

tischi commented 2 years ago

These two don't make sense for spots. All the others do make sense.

  1. I am not so sure. I can be nice to see what's behind a spot. I think this can be very useful for visual QC to see whether there actually is a spot signal "inside" the spot.

  2. I think we need something to specify how large the spots should be rendered. Maybe spotRadius?

constantinpape commented 2 years ago
  1. I am not so sure. I can be nice to see what's behind a spot. I think this can be very useful for visual QC to see whether there actually is a spot signal "inside" the spot.

Ok, that's a good point. We can keep the showAsBoundaries and boundaryThickness then.

2. I think we need something to specify how large the spots should be rendered. Maybe spotRadius?

Yep, I also just thought about this. spotRadius is a good name for it.

constantinpape commented 2 years ago

And I guess spotRadius is given in physical units?!

tischi commented 2 years ago

I would say so, yes, in the units of the project.

constantinpape commented 2 years ago

@tischi: here is the schema for the spot display: https://github.com/mobie/mobie.github.io/blob/mobie3/schema/view.schema.json#L356-L431