statonlab / tripal_manage_analyses

GNU General Public License v3.0
0 stars 1 forks source link

first exon not drawn in master glyph? #88

Open bradfordcondon opened 5 years ago

bradfordcondon commented 5 years ago

Screen Shot 2019-04-01 at 2 26 09 PM

bradfordcondon commented 5 years ago

Object for mrna specific glyph {x: "1517090", y: "1517383", description: "GB48241-RA-exon001", level: 0} Object passed in for glyph of glyphs:

{x: "1517090", y: "1517383", description: "GB48241-RA-exon001", level: 0}

so the coordinatse are identical. The offsets are also identical. D3 can be a finicky library, for some reason its getting cut off on one and not the other.


    //Safely set offset to not expand beyond the scaffold.

    $offset_start = $coordinates['local:fmin'] - min(1000, $coordinates['local:fmin']);
    $offset_end = $coordinates['local:fmax'] + min(1000, (strlen($sequence) - $coordinates['local:fmax']));

    $child_draw['parameters'] = [
      'offset' => [
        'start' => $offset_start,
        'end' => $offset_end,
      ],

if we mess with the offset, we can get the far CDS to draw, so its just being cut off. perhaps the longer name is the problem?

without the extra offset, it is there, just not drawn:

Screen Shot 2019-04-01 at 3 16 29 PM

the gene's fmin is 1511414 and fmax is 1517383. thats what we use for the offset.

The cut off exon is 1517090-1517383 ... right up to the edge, but it should still be included.

Also if we scroll over to the right, the exon is drawn.

Its likely the only real solution to this is by zooming out more, in which case, we need to also draw the gene boundaries on both glyphs.