clinical-timeline

by cBioPortal

master5408ab2  created March 1st 2017

other versions

59
Functions

fx
clinicalTimelineExporterremove
  • timeline
  • spec

Kind
function
Scope
instance

cleans up the HTML of the export-button

Arguments:

  1. timeline

    clinicalTimeline object

  2. specoptional, default:

    specification specific to the plugin

fx
clinicalTimelineExporterrun
  • timeline
  • spec

Kind
function
Scope
instance

runs the clinicalTimelineExporter plugin

Arguments:

  1. timeline

    clinicalTimeline object

  2. specoptional, default:

    specification specific to the plugin

fx
clinicalTimelineHelperLinesrun
  • timeline
  • spec

Kind
function
Scope
instance

runs the clinicalTimelineHelperLines plugin

Arguments:

  1. timeline

    clinicalTimeline object

  2. specoptional, default:

    specification specific to the plugin

fx
clinicalTimelineOverviewAxisrun
  • timeline
  • spec

Kind
function
Scope
instance

runs the clinicalTimelineOverviewAxis plugin

Arguments:

  1. timeline

    clinicalTimeline object

  2. specoptional, default:

    specification specific to the plugin

clinicalTimelineOverviewAxisrun~xScaleOverview

Kind
member
Scope
inner

scale for drawing the the overviewAxis and ticks in the specified width

clinicalTimelineOverviewAxisrun~xScaleOverviewZoomed

Kind
member
Scope
inner

scale to map the amount dragged on the zoomedWidth of original timeline to the overviewAxis width helps position the overview-rectangle correctly if original timeline dragged

clinicalTimelineOverviewAxisrun~xScaleRectangle

Kind
member
Scope
inner

scale to map the amount dragged on the overview-rectangle to the orignal timeline's zoomedWidth helps position the original-timeline correctly if the overview rectagle is dragged

fx
clinicalTimelineUtilgetDifferenceTicksDays
  • zoomLevel

Kind
function
Scope
static

calculates the the difference (in days) between ticks on x-axis based on current zoom level

Arguments:

  1. zoomLevel

    current zoom-level

Returns:

  1. difference between ticks on clinical-timeline

fx
clinicalTimelineUtilgetLowerBoundIndex
  • arr
  • ele

Kind
function
Scope
static

uses binary search to calculate the lower index of the indices between which the element(ele) lies in an array(arr)

Arguments:

  1. arr

    array to calculate index upon

  2. ele

    value of the element whose index has to be calculated

Returns:

  1. lower index

fx
clinicalTimelineUtilroundDown
  • numToRound
  • multiple

Kind
function
Scope
static

rounds down to the nearest multiple of a number

Arguments:

  1. numToRound

    number to round

  2. multiple

    nearest multiple of a number to round off to

Returns:

  1. rounded down number

fx
clinicalTimelineUtilroundUp
  • numToRound
  • multiple

Kind
function
Scope
static

rounds up to the nearest multiple of a number

Arguments:

  1. numToRound

    number to round

  2. multiple

    nearest multiple of a number to round off to

Returns:

  1. rounded up number

clinicalTimelineUtiltimelineConstants

Kind
member
Type
Scope
static

stores various contstants shared between different functions and plugins of clinical-timeline

fx
clinicalTimelineVerticalLineremove
  • timeline
  • spec

Kind
function
Scope
instance

cleans up the HTML of the verticalLine

Arguments:

  1. timeline

    clinicalTimeline object

  2. specoptional, default:

    specification specific to the plugin

fx
clinicalTimelineVerticalLinerun
  • timeline
  • spec

Kind
function
Scope
instance

runs the clinicalTimelineVerticalLine plugin

Arguments:

  1. timeline

    clinicalTimeline object

  2. specoptional, default:

    specification specific to the plugin

clinicalTimelineVerticalLinerun~hoverScale

Kind
member
Scope
inner

scale to map the coordinates hovered upon (according to the svg coordinates) to the clinical-timeline days

clinicalTimelineVerticalLinerun~tooltipOnVerticalLine

Kind
member
Scope
inner

Boolean to toggle the visibility of tooltips along with the vertical line

fx
clinicalTimelineZoomrun
  • timeline
  • spec

Kind
function
Scope
instance

runs the clinicalTimelineZoom plugin

Arguments:

  1. timeline

    clinicalTimeline object

  2. specoptional, default:

    specification specific to the plugin

fx
clinicalTimelineZoomrun~brushend

    Kind
    function
    Scope
    inner

    Add rectangular zoom selection zoom in after brush ends

    fx
    clinicalTimelineZoomrun~zoomExplanation
    • divId
    • svg
    • text
    • visibility
    • pos

    Kind
    function
    Scope
    inner

    adds textual explanation for the present current zoom state

    Arguments:

    1. divId

      divId for clinical-timeline

    2. svg

      clinical-timeline's svg object

    3. text

      explanation's text

    4. visibility

      css property to hide/show the explanation

    5. pos

      position of the explanation's text

    fx
    clinicalTimelineisDurationTrack

      Kind
      function
      Scope
      inner

      Checks wheter a timeline track contains timepoints with varying start and end dates.

      fx
      clinicalTimelinemergeTooltipTablesAtEqualTimepoint

        Kind
        function
        Scope
        inner

        Merge timepoints that have the same starting_time into one timepoint with multiple tooltip_tables

        fx
        clinicalTimelineroundUpDays

          Kind
          function
          Scope
          inner
          Deprecated
          use roundUp() and roundDown() in util.js

          No description available.

          fx
          clinicalTimelinetimeline

            Kind
            function
            Scope
            inner

            Publically accessible object returned by clinicalTimeline

            Static Members:

            fx
            clinicalTimelinetimeline.addPostTimelineHook
            • hook

            Kind
            function
            Scope
            static

            Add functions to postTimelineHooks i.e the code run everytime timeline() is called

            Arguments:

            1. hook

              Array of functions to be added to postTimelineHook

            Returns:

            1. clinicalTimeline object

            fx
            clinicalTimelinetimeline.computeZoomFactor
            • zoomLevel
            • minDays
            • maxDays
            • width

            Kind
            function
            Scope
            static

            Return zoomFactor by specifying what kind of zoomLevel on the x axis (e.g. years, days) is desired

            Arguments:

            1. zoomLevel

            2. minDays

            3. maxDays

            4. width

            Returns:

            1. zoomFactor

            fx
            clinicalTimelinetimeline.computeZoomLevel
            • minDays
            • maxDays
            • width

            Kind
            function
            Scope
            static

            Return zoomLevel in human comprehensible form by determining the width in pixels of a single day

            Arguments:

            1. minDays

            2. maxDays

            3. width

            Returns:

            1. zoomLevel

            fx
            clinicalTimelinetimeline.data
            • data

            Kind
            function
            Scope
            static

            Change the value of the variable allData of clinicalTimeline if argument data is provided, else return the existing value

            Arguments:

            1. data

            Returns:

            1. clinicalTimeline object

            fx
            clinicalTimelinetimeline.daysToTimeObject
            • dayCount

            Kind
            function
            Scope
            static

            Converts the dayCount (input time in days) to time object which contains the time in terms of days, months and years i.e 570 days become {y:1, m:6, d:25}

            Arguments:

            1. dayCount

            Returns:

            1. converted time object

            fx
            clinicalTimelinetimeline.divId
            • name

            Kind
            function
            Scope
            static

            Change the value of the variable divId of clinicalTimeline if argument name is provided, else return the existing value

            Arguments:

            1. name

            Returns:

            1. clinicalTimeline object

            fx
            clinicalTimelinetimeline.enableTrackTooltips
            • b

            Kind
            function
            Scope
            static

            Change the value of the variable enableTrackToolTips of clinicalTimeline if argument b is provided, else return the existing value

            Arguments:

            1. b

            Returns:

            1. clinicalTimeline object

            fx
            clinicalTimelinetimeline.formatTime
            • time
            • zoomLevel

            Kind
            function
            Scope
            static

            Formats and converts time according to the required zoomLevel i.e adds 'd' if time in days, 'm' if in months and 'y' if years

            Arguments:

            1. time

            2. zoomLevel

            Returns:

            1. formatted and converted time

            fx
            clinicalTimelinetimeline.getTickValues
            • minDays
            • maxDays
            • zoomLevel

            Kind
            function
            Scope
            static

            Computes and returns the tick values for placing the ticks for the timeline drawn

            Arguments:

            1. minDays

            2. maxDays

            3. zoomLevel

            Returns:

            1. tickValues

            fx
            clinicalTimelinetimeline.orderAllTooltipTables
            • rowkeys

            Kind
            function
            Scope
            static

            Order all tooltip tables by given array of row keys. Tooltip table rows with keys not included given rowkeys argument are appended to the end in alhpanumeric order.

            Arguments:

            1. rowkeys

            Returns:

            1. clinicalTimeline object

            fx
            clinicalTimelinetimeline.orderTrackTooltipTables
            • track
            • rowkeys

            Kind
            function
            Scope
            static

            Order tooltip tables in given track by given array of row keys. Tooltip table rows with keys not included given rowkeys argument are appended to the end in alhpanumeric order.

            Arguments:

            1. track

            2. rowkeys

            Returns:

            1. clinicalTimeline object

            fx
            clinicalTimelinetimeline.orderTracks
            • labels

            Kind
            function
            Scope
            static

            Order tracks by given array of label names. Tracks with label names not included in the sequence are appended to the end in alhpanumeric order.

            Arguments:

            1. labels

            Returns:

            1. clinicalTimeline object

            fx
            clinicalTimelinetimeline.overviewAxisWidth
            • w

            Kind
            function
            Scope
            static

            Change the value of the variable overviewAxisWidth of clinicalTimeline if argument w is provided, else return the existing value

            Arguments:

            1. w

            Returns:

            1. clinicalTimeline object

            fx
            clinicalTimelinetimeline.overviewX
            • x

            Kind
            function
            Scope
            static

            Change the value of the variable overviewX of clinicalTimeline if argument x is provided, else return the existing value

            Arguments:

            1. x

            Returns:

            1. clinicalTimeline object

            fx
            clinicalTimelinetimeline.pluginSetOrGetState
            • state

            Kind
            function
            Scope
            static

            Enable or disable a particular plugin based on the pluginId if the argument state is given, else return the existing state

            Arguments:

            1. state

            fx
            clinicalTimelinetimeline.plugins
            • plugins[

            Kind
            function
            Scope
            static

            Change the value of the variable plugins of clinicalTimeline if argument plugins is provided, else return the existing value

            Arguments:

            1. plugins[

            Returns:

            1. clinicalTimeline object

            fx
            clinicalTimelinetimeline.setTimepointsDisplay
            • track
            • display

            Kind
            function
            Scope
            static

            Set the display attribute for all timepoints with one tooltip_table on a given track.

            Arguments:

            1. track

            2. display

            Returns:

            1. clinicalTimeline object

            fx
            clinicalTimelinetimeline.sizeByClinicalAttribute
            • track
            • attr

            Kind
            function
            Scope
            static

            Set the size of each timepoint in a track based on the value of an attribute in the tooltip_tables.

            Arguments:

            1. track

            2. attr

            Returns:

            1. clinicalTimeline object

            fx
            clinicalTimelinetimeline.splitByClinicalAttributes
            • track
            • attr

            Kind
            function
            Scope
            static

            Split a track into multiple tracks based on the value of an attribute in the tooltip_tables. The attributes to attrs agument can be a single string or an array of strings. An array of strings splits the tracks sequentially.

            Arguments:

            1. track

            2. attr

            Returns:

            1. clinicalTimeline object

            fx
            clinicalTimelinetimeline.stackSlack

              Kind
              function
              Scope
              static

              Return the value of clinicalTimeline variable stackSlack

              Returns:

              1. clinicalTimeline object

              fx
              clinicalTimelinetimeline.toggleTrackCollapse
              • track

              Kind
              function
              Scope
              static

              Collapse or stack timepoints on given track

              Arguments:

              1. track

              Returns:

              1. clinicalTimeline object

              fx
              clinicalTimelinetimeline.translateX
              • x

              Kind
              function
              Scope
              static

              Change the value of the variable translateX of clinicalTimeline if argument x is provided, else return the existing value

              Arguments:

              1. x

              Returns:

              1. clinicalTimeline object

              fx
              clinicalTimelinetimeline.width
              • w

              Kind
              function
              Scope
              static

              Change the value of the variable width of clinicalTimeline if argument w is provided, else return the existing value

              Arguments:

              1. w

              Returns:

              1. clinicalTimeline object

              fx
              clinicalTimelinetimeline.zoomFactor
              • zFactor

              Kind
              function
              Scope
              static

              Change the value of the variable zoomFactor of clinicalTimeline if argument zFactor is provided, else return the existing value

              Arguments:

              1. zFactor

              Returns:

              1. clinicalTimeline object

              fx
              configCheckManagerremove
              • timeline
              • spec

              Kind
              function
              Scope
              instance

              cleans up the HTML of the configButton

              Arguments:

              1. timeline

                clinicalTimeline object

              2. specoptional, default:

                specification specific to the plugin

              fx
              configCheckManagerrun
              • timeline
              • spec

              Kind
              function
              Scope
              instance

              runs the configCheckManager plugin

              Arguments:

              1. timeline

                clinicalTimeline object

              2. specoptional, default:

                specification specific to the plugin

              fx
              configCheckManagerrun~configHandler
              • pluginId
              • bool

              Kind
              function
              Scope
              inner

              handle the selection or deselection of a plugin in the config button

              Arguments:

              1. pluginId

                id of the HTML's checkbox element for the plugin

              2. bool

                state of checkbox

              fx
              generatePDF

                Kind
                function
                Scope
                global

                Exports the clinical-timeline to PDF by converting the PNG generated by clinicalTimelineExporter.generatePNG to PDF

                fx
                trimClinicalTimelinerun
                • timeline
                • spec

                Kind
                function
                Scope
                instance

                runs the trimClinicalTimeline plugin

                Arguments:

                1. timeline

                  clinicalTimeline object

                2. specoptional, default:

                  specification specific to the plugin

                fx
                trimClinicalTimelinerun~clickHandlerKink

                  Kind
                  function
                  Scope
                  inner

                  Handles double clicking of the kinks in trimmed timeline by extending back the timeline and also handles coming back to trimmed timeline

                  fx
                  trimClinicalTimelinerun~getXPosAdjustedForKink
                  • pos

                  Kind
                  function
                  Scope
                  inner

                  returns updated x coordinate for the data elements according to th trimmed timeline

                  Arguments:

                  1. pos

                    starting time of the clinical timeline element

                  Returns:

                  1. updated x coordinate post-trimming