-
Notifications
You must be signed in to change notification settings - Fork 5
Lollipop ‐ mds3
Same configurations may be applied for both official and custom tracks.
runpp({
tklst:[
// track from an official dataset
{type:'mds3', dslabel:'GDC', … },
// custom track with client-side data
{type:'mds3', name:'custom tk', custom_data:[ … ], … },
// custom track with server-side vcf file
{type:'mds3', name:'', vcf:{file:'path/to/vcf.gz'}},
]
})
Optional.
If provided:
- The track loads from a server-side official dataset available from this genome, identified by the dslabel value.
- Tk.mds{} contents are copied from the server-side dataset.
If missing:
- It’s a custom dataset. The data source can still be server-side, e.g. from a bcf file.
- Tk.mds{} contents can be defined through runpp() arguments.
Optional. If present, allow to enable rims over skewer dots.
List of LD data tracks
Auto-created to interpolate r2 value to a color
If set, indicates the track is overlaying LD r2 value for all variants against a selected one.
mOverlay = {
ldtkname: 'name of the overlaying track'
m: {chr,pos,ref,alt,ssm_id} // the selected variant
data: [ {pos,alleles,r2} ] // r2 values for variants from the view range
}
Data types renderable in the “skewer” track, including SNV/indels, and fusion/SV breakpoints.
A red box is rendered over the dot of a highlighted data point.
Value is a string of comma-separated variant names (amino acid changes) or SSM id, depending on attribute name. Values are case sensitive. Example
Required when “dslabel” is missing. Supply ad-hoc variant list from client side
Required. Value=1 for sequence variants, e.g. SNV or indels Value=2 for SV/fusion breakpoints.
Required. Pos is 0-based.
Optional. Provides REF and ALT alleles of a mutation.
Optional. Decides the rendering color of a variant
Optional. Provides content for a text label for a variant.
Optional. Value is expected to be a non-negative integer.
Optional. If “sample” is used, it will be renamed to “sample_id”. .sample_id is the hardcoded attribute for sample identifier. If sample_id is set but occurrence is missing, mds3 will dynamically group samples together for the same
Samples[] array is created when samples are aggregated. Each element is: { sample_id, }
Optional. To be displayed in single variant panel.
htmlSections=[
{ key:STR, html:'xxx'},
Example:
{
gene1:'PAX5', chr1:'chr9', pos1:37002646, strand1:'-',
gene2:'JAK2', chr2:'chr9', pos2:5081726, strand2:'+',
dt:2,
class:'Fuserna'
}
Optional. Provide a click handler on snv/indel data points (dots rendered in a “skewer” track). In such case it will highlight the “kick” cover of the clicked dot (red border, bigger size), which won’t happen otherwise.
Optional. Define one or more methods to render the “skewer” track.
skewerModes:[
{
type:'numeric',
byAttribute:'lpv', label:'-log10(p-value)', inuse:true, axisheight:100
},
{
type:'numeric',
byAttribute:'value2', label:'other numbers', axisheight:200
},
]
Below “nm” is a short-hand of a method, an element in this array.
Required. Value must be one of following string
- type="skewer"
- Display a skewer graph. An object will be automatically added to skewerModes[] array if this type is missing.
- type="numeric"
- Project variants on a numerical vertical axis.
Numeric mode data method One of the following has to be set for type=”numeric”
To check the given attribute on a variant m{} for numeric value. E.g. if byAttribute=”occurrence”, then m.occurrence will be the numeric value. If the resulting value is not a number, the data point will be placed at the bottom of the Y axis.
Optional. Defines axis height for numeric mode. Default 150.
If true, will print integer values in the left-side Y axis.
Optional. Provide a label to show on Y axis. If missing, show “Numeric value”.
If true, indicates this method is in use.
Optional. Take variant object m as argument.
Custom data point shapes are only available for numeric mode.
Available shapes are
-
filledCircle: ●
-
emptyCircle: ○
-
filledVerticalRectangle: ▮
-
emptyVerticalRectangle: ▯
-
filledTriangle: ▲
-
emptyTriangle: △
-
filledSquare: ■
-
emptySquare: □
If no shape is specified, the data point is rendered as a filled in circle, ●
Optional. Allows to show the name/count of each shape in the legend. Example:
legend: {
customShapeLabels: {
filledCircle: "Serine",
filledTriangle: "Threonine",
emptyCircle: "Tyrosine"
}
}
Provide a JSON object to be used when querying GDC API.
tk.filter0 = {
"op": "and",
"content": [{
"op": "in",
"content": {
"field": "cases.primary_site",
"value": ["breast", "bronchus and lung"]
}
}]
}
When PP is embedded in the GDC Analysis Tools Framework, “filter0” is used to pass an external filter (e.g. cohort filter constructed in ATF) to PP. PP mds3 client code simply passes this JSON object to PP backend for API queries.
Important: “filter0” is invisible, read-only, and used as-is, as mds3 does not compute/modify/visualize it.
A PP filter object, to filter down samples represented in this track. This is used in tandem with filter0. Mds3 will compute, modify, and visualize filterObj.
If set, allow to select samples, e.g. by displaying check boxes and “Select” button in the sample tables.
allow2selectSamples = {
buttonText:'Select',
attributes:['sample_id'],
callback: samples=>{}
}
- buttonText
- Text to display on button.
- If missing, use “Select samples”
- attributes[]
- Array of keys to fetch attribute values from sample objects and return to callback
- If missing, defaults to ["sample_id"]
- callback()
- Required. Parameter is list of objects, each with key/value pairs defined in attributes[]
If present, will call after each re-rendering.