{"version":3,"sources":["Components/DefaultConfiguration.js","Components/GenotypeSelect.js","Components/ReferenceForm.js","Components/CompareForm.js","Components/HeatConfig.js","Components/HistConfig.js","Components/HaploConfig.js","Components/TrackOptionsSelect.js","Components/BaseOptionsSelect.js","Components/OptionsForm.js","Components/HelpTopics/About.js","Components/HelpTopics/ReferenceGenotype.js","Components/HelpTopics/ComparisonGenotype.js","Components/HelpTopics/GeneralOptions.js","Components/HelpTopics/DisplayNone.js","Components/HelpTopics/DisplayHaplotype.js","Components/HelpTopics/DisplayHistogram.js","Components/HelpTopics/DisplayHeat.js","Components/HelpModal.js","Components/DownloadModal.js","Components/DisplayButton.js","Components/Key.js","App.js","index.js"],"names":["rulerDisplayDefault","rulerDisplayOptions","imageTitleDefault","Date","toDateString","popover","position","zIndex","cover","top","right","bottom","left","GenotypeSelector","state","selectedDataset","selectedGenotype","displayColorPicker","color","datasetChange","setState","props","setDataset","append","dataset","genotype","appendDataset","idx","gtChange","colorClick","colorClose","formatDatasetValue","colorSet","hex","this","selected","gtOpt","genotypes","className","onClick","style","background","onChange","defaultValue","label","classNamePrefix","value","isClearable","isDisabled","filterOption","createFilter","ignoreAccents","options","datasets","components","Option","CustomOption","length","undefined","removeOption","React","Component","innerProps","otherProps","isFocused","otherInnerProps","onMouseMove","onMouseOver","newProps","children","ReferenceForm","CompareForm","count","rm","filter","opt","key","addOption","concat","prevProps","prevState","snapshot","heatConfig","compare","side","minValue","maxValue","filters","feature","glyph","display","draw_as","invert_value","min","max","width","offset","bin_size","bin_min","bin_max","by_class","class_filter","map","class_offset","class_heat","draw_label","max_distance","border","value_base","generate_bins","count_classes","transparent","transparent_percent","histConfig","enable_pileup","border_width","haploConfig","class_space","displayFormats","comparisonFormats","heatFormat","heatColorFormat","TrackOptions","displayAs","heat","heatColor","viewConfig","setConfiguration","format","forEach","gt","optionsUpdate","toLowerCase","displayChange","compareChange","filterChange","heatColorChange","heatChange","maxChange","parseInt","target","hapMax","minChange","filterFormats","isMulti","name","type","id","placeholder","onInput","e","BaseOptions","rulerDisplay","binSize","rulerInterval","title","rulerChange","values","titleChange","binChange","intervalChange","OptionsForm","group","general","tick_interval","display_ruler","setOptions","About","height","src","frameBorder","allow","allowFullScreen","ReferenceGenotype","hideInfo","maxHeight","ComparisonGenotype","GeneralOptions","DisplayNone","DisplayHaplotype","DisplayHistogram","DisplayHeat","HelpModal","closeAction","DataModal","quality","gffOptions","onClickImage","a","document","getElementById","classList","toggle","resolveSVGBlob","resolvePngBlob","url","saveImage","Promise","resolve","setTimeout","paper","window","cvit","model","encodeURIComponent","project","exportSVG","asString","view","element","toBlob","blob","URL","createObjectURL","link","createElement","download","href","body","appendChild","click","onClickData","gff","data","gffOpts","loadIndicator","hasOwnProperty","dataGroup","features","line","seqName","source","start","end","score","strand","frame","attributes","attribute","win","open","write","evt","onSelect","onChecked","checked","chromosome","diff","same","total","DisplayButton","priorRequest","request","interval","response","refMax","onSubmit","setKey","headers","requestString","classes","query","i","Error","_viewConfig","hide","visibility","hideOptions","_viewData","console","log","appendData","method","then","_viewLayout","chrOrder","_setChrOrder","vd","Object","keys","chr","maxScore","setView","catch","error","_combineObjects","_redraw","setDirty","_inform","visible","keyItem","push","fontWeight","fontWeigth","App","referenceDataset","currentKey","showModal","auth","process","REACT_APP_USE_AUTH","user","pwd","authHeader","Headers","loadDatasets","header","fetch","json","slice","val","result","JSON","parse","stringify","handleCloseModal","handleOpenModal","userChange","passwordChange","checkAuthState","authString","btoa","status","alert","logout","gts","isOpen","onRequestClose","shouldCloseOnOverlayClick","alt","overflow","has","ReactDOM","render"],"mappings":"2TAQO,SAASA,EAAoBC,GAAuB,OAAOA,EAAoB,GAM/E,IAoBMC,EAAoB,SAAU,IAAIC,MAAOC,eCxBhDC,EAAU,CACfC,SAAU,WACVC,OAAQ,KAGHC,EAAQ,CACbF,SAAU,QACVG,IAAK,MACLC,MAAO,MACPC,OAAQ,MACRC,KAAM,OAGcC,E,4MAEpBC,MAAQ,CACPC,gBAAiB,KACjB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AACuP,aAAY,KAAUV,OAAQ/N,KAAK+N,SACvI,yBAAK3N,UAAW,gBAAgB,8BAChC,4BAAQA,UAAW,yCAA0CC,QAAS,kBAAI,EAAKqR,gBAAgB,UAA/F,cACA,yBAAKtR,UAAW,gBAChB,4BAAQA,UAAW,yCAA0CC,QAAS,kBAAI,EAAKqR,gBAAgB,UAA/F,WAElB,kBAAC,EAAD,CAAKvQ,SAAUmP,S,GApPgB5O,IAAMC,WCTvC+Q,IAASC,OAAO,kBAAC,EAAD,MAAShJ,SAASC,eAAe,mB","file":"static/js/main.3c663868.chunk.js","sourcesContent":["/**\n * Default values for UI components.\n */\n\n\n/**\n * Side of drawing to display the ruler\n */\nexport function rulerDisplayDefault(rulerDisplayOptions) { return rulerDisplayOptions[0]}; //0-LHS,1-RHS,2-Both,3-None\n\n\n/**\n * Distance in default units between major tick ines in ruler\n */\nexport const rulerIntervalDefault = 5000000;\n\n/**\n * Size of display \"bin\" for counts\n */\nexport const binSizeDefault = 500000;\n\n/**\n * Default title\n */\nexport const titleDefault = \"\";\n\n/**\n * Default feature color\n */\nexport const colorDefault = '#19741A';\n\n/**\n * Default title for exported image\n */\nexport const imageTitleDefault = \"GCViT\" + new Date().toDateString();\n","/**\n * Selector dropdown for a new genotype option\n */\n\nimport React from 'react';\nimport Select, {createFilter, components} from 'react-select';\nimport {SketchPicker} from 'react-color';\nimport {colorDefault} from './DefaultConfiguration';\n\n// placement of color select popup\nconst popover = {\n\tposition: 'absolute',\n\tzIndex: '2'\n};\n\nconst cover = {\n\tposition: 'fixed',\n\ttop: '0px',\n\tright: '0px',\n\tbottom: '0px',\n\tleft: '0px',\n};\n\nexport default class GenotypeSelector extends React.Component {\n\n\tstate = {\n\t\tselectedDataset: null,\n\t\tselectedGenotype: null,\n\t\tdisplayColorPicker: false,\n\t\tcolor: colorDefault\n\t};\n\n\t/**\n\t * Set up genotype value from form options\n\t */\n\tformatDatasetValue(){\n\t\treturn {\n\t\t\tdataset: this.state.selectedDataset || null,\n\t\t\tgenotype: this.state.selectedGenotype || null,\n\t\t\tcolor: this.state.color || null\n\t\t}\n\t};\n\n\t/**\n\t * Change dataset source if enabled\n\t */\n\tdatasetChange = (selectedDataset) => {\n\t\tthis.setState({ selectedDataset, selectedGenotype: null });\n\t\tthis.props.setDataset(selectedDataset);\n\t\tlet append = { dataset: selectedDataset, genotype:null, color: this.state.color||null};\n\t\tthis.props.appendDataset(this.props.idx, append)\n\t};\n\n\t/**\n\t * Change genotype if enabled\n\t */\n\tgtChange = (selectedGenotype) => {\n\t\tthis.setState({ selectedGenotype });\n\t\tlet append = { dataset: this.state.selectedDataset, genotype: selectedGenotype, color: this.state.color||null};\n\t\tthis.props.appendDataset(this.props.idx, append);\n\t};\n\n\t/**\n\t * Display color picker\n\t */\n\tcolorClick = () => {\n\t\tthis.setState({displayColorPicker : true})\n\t};\n\n\t/**\n\t * hide color picker\n\t */\n\tcolorClose = () => {\n\t\tthis.setState({displayColorPicker : false});\n\t\tthis.props.appendDataset(this.props.idx, this.formatDatasetValue())\n\t};\n\n\t/**\n\t * set chosen color\n\t */\n\tcolorSet = (color) => {\n\t\tthis.setState({color: color.hex})\n\t};\n\n\n\t/**\n\t * Set dataset if component is for a variant\n\t */\n\tcomponentDidMount() {\n\t\tif(this.props.selected){\n\t\t\tthis.setState({'selectedDataset':this.props.selected})\n\t\t}\n\t};\n\n\trender() {\n\t\tconst { selectedDataset, selectedGenotype } = this.state;\n\t\tconst { idx } = this.props;\n\t\tconst gtOpt = this.props.genotypes !== null ? this.props.genotypes : [];\n\t\treturn (\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t Color
\n\t\t\t\t\t
\n\t\t\t\t\t{ this.state.displayColorPicker\n\t\t\t\t\t\t?
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t: null\n\t\t\t\t\t}\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t Dataset
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t Genotype
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t{this.props.removeOption !== undefined\n\t\t\t\t\t?
\n\t\t\t\t\t\tRemove\n\t\t\t\t\t\t
this.props.removeOption(idx)} > X
\n\t\t\t\t\t\t
\n\t\t\t\t\t: null\n\t\t\t\t}\n\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n}\n\n/**\n * custom rendering options for react-select (select dropdown) component\n */\nclass CustomOption extends React.Component {\n\trender() {\n\t\tconst {innerProps, isFocused, ...otherProps} = this.props;\n\t\tconst {onMouseMove, onMouseOver, ...otherInnerProps} = innerProps;\n\t\tconst newProps = {innerProps: {...otherInnerProps}, ...otherProps};\n\t\treturn (\n\t\t\t{this.props.children}\n\t\t\t\n\t\t);\n\t}\n}\n","/**\n * Select reference genotype\n */\nimport React from 'react';\nimport GenotypeSelector from './GenotypeSelect';\n\nexport default class ReferenceForm extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t Reference Genotype\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n}\n","/**\n * React component for rendering the comparison genotype selection menu\n */\n\nimport React from 'react';\nimport GenotypeSelector from './GenotypeSelect'; //Generic gt select component\n\nexport default class CompareForm extends React.Component {\n\n\tstate = {\n\t\toptions: [], // currently selected comparisons\n\t\tcount: 1 // tracks actual length of non-null entries.\n\t};\n\t// remove option selection\n\tremoveOption = (rm) => {\n\t\tlet options = this.state.options.filter(opt => {\n\t\t\treturn opt.key !== `${rm}`;\n\t\t});\n\t\tthis.props.appendDataset(rm,null);\n\t\tthis.setState({options});\n\t}\n // add option selection\n\taddOption = () => {\n\t\tlet options = this.state.options.concat([\n\t\t\t\n\t\t]);\n\t\tthis.setState({options,count:this.state.count+1});\n\t};\n\n\t// prevents issues when all options are removed\n\tcomponentDidUpdate(prevProps, prevState, snapshot) {\n\t\tif(this.props.selected !== prevProps.selected){\n\t\t\tthis.setState({'count':1, 'options':[]})\n\t\t}\n\t}\n\n\t// render component\n\trender() {\n\t\treturn (\n\t\t\t
\n\t\t\t\t Comparison Genotypes \n\t\t\t\t{this.state.options}\n\t\t\t\t\n\t\t\t\t\tAdd Comparison\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t}\n}\n","/**\n * Set default settings for heat map display type\n */\n\nimport {binSizeDefault} from \"./DefaultConfiguration\";\n\nexport function heatConfig(compare, side, minValue, maxValue,filters){\n return {\n feature: compare.value,\n glyph: 'measure',\n display: 'heat',\n draw_as: 'range',\n invert_value: 0,\n min: 0,\n max: 0,\n width: 10,\n offset: side ? 0 : -0,\n bin_size: binSizeDefault,\n bin_min: minValue,\n bin_max: maxValue,\n by_class: 1,\n class_filter: filters.map( filter => filter.value),\n class_offset: 2,\n class_heat : ['#fff'],\n draw_label: 0,\n max_distance: 5,\n border: 0,\n value_base: 10,\n generate_bins: 0,\n count_classes: 0,\n transparent: 0,\n transparent_percent: 0.0\n };\n}\n","/**\n * Set default options for histogram display\n */\nimport {binSizeDefault} from \"./DefaultConfiguration\";\n\nexport function histConfig(compare,side,minValue,maxValue,filters,count){\n return {\n feature: compare.value,\n glyph: 'measure',\n display: 'histogram',\n count_classes: 0,\n enable_pileup: 0,\n generate_bins: 0,\n offset: side ? 0 : -0,\n width: 3,\n bin_min: minValue,\n bin_max: maxValue,\n bin_size: binSizeDefault,\n by_class: 1,\n class_offset : 0,\n class_filter: filters.map( filter => filter.value),\n draw_label: 0,\n max_distance: count*25,\n border: 1,\n border_width :0,\n };\n}\n","/**\n * Sets default options for \"haplotype\" display type\n */\n\nimport {binSizeDefault} from \"./DefaultConfiguration\";\n\nexport function haploConfig(compare,side,minValue,maxValue,filters){\n return {\n feature : compare.value,\n glyph: 'measure',\n display: 'histogram',\n count_classes: 0,\n class_offset: 0,\n class_space : 1,\n enable_pileup: 0,\n generate_bins: 0,\n offset: side ? 0 : -0,\n width: 3,\n bin_min: maxValue -1 > 0 ? maxValue - 1 : 0 ,\n bin_max: maxValue > 0 ? maxValue : 1,\n bin_size: binSizeDefault,\n by_class: 1,\n class_filter: filters.map( filter => filter.value),\n draw_label: 0,\n max_distance: 5,\n border: 1,\n border_width: 0,\n };\n}\n","/**\n * Control for editing LHS/RHS comparison options\n * for display in CViT canvas\n */\n\nimport React from 'react';\nimport Select from 'react-select';\nimport {heatConfig} from './HeatConfig';\nimport {histConfig} from './HistConfig';\nimport {haploConfig} from './HaploConfig';\n\n// Display format dropdown values\nconst displayFormats = [\n {\n value: 'none',\n label: 'None'\n },\n {\n value: 'hist',\n label: 'Histogram'\n },\n {\n value: 'heat',\n label: 'Heatmap'\n },\n {\n value: 'haplo',\n label: 'Haplotype',\n },\n];\n\n// Comparison format dropdown values\nconst comparisonFormats = [\n {\n value: 'diff',\n label: 'Different'\n },\n {\n value: 'same',\n label: 'Same'\n },\n {\n value: 'total',\n label: 'Total'\n },\n];\n\n// heatmap direction dropdown values\nconst heatFormat = [\n {\n value: 'low',\n label: 'Min-Max'\n },\n {\n value: 'high',\n label: 'Max-Min'\n },\n];\n\n// heatmap color dropdown values\nconst heatColorFormat = [\n {\n value: 'white',\n label: 'White'\n },\n {\n value: 'black',\n label: 'Black'\n },\n];\n\nexport default class TrackOptions extends React.Component {\n state = {\n displayAs: displayFormats[0],\n compare: comparisonFormats[0],\n filters: [],\n heat: heatFormat[0],\n heatColor: heatColorFormat[0],\n viewConfig: {},\n maxValue: 0,\n minValue: 0,\n }\n\n /**\n * set configuration on display type change from defaults\n */\n setConfiguration = (format) => {\n const {compare,filters, maxValue, minValue} = this.state;\n const side = this.props.side === 'Right';\n let count = 1;\n this.props.genotypes.forEach(gt => {if(gt !== null) count++;});\n switch (format) {\n case 'heat':\n return heatConfig(compare,side,minValue,maxValue,filters);\n case 'hist':\n return histConfig(compare,side,minValue,maxValue,filters,count);\n case 'haplo':\n return haploConfig(compare,side,minValue,maxValue,filters,count);\n case 'none':\n default:\n return {'feature':'none'};\n }\n };\n\n\n /**\n * update selected options in parents\n */\n optionsUpdate = (value) => {\n this.props.optionsUpdate(this.props.side.toLowerCase(),value);\n }\n\n /**\n * Action on changing DisplayAs dropdown\n */\n displayChange = (displayAs) => {\n let viewConfig = this.setConfiguration(displayAs.value);\n if(displayAs.value === 'haplo'){ // make sure haplotype block gets configured correctly\n const maxValue = this.state.maxValue > 0 ? this.state.maxValue : 1;\n const minValue = maxValue - 1;\n this.setState({ displayAs,maxValue,minValue,viewConfig});\n } else {\n this.setState({displayAs, viewConfig});\n }\n this.optionsUpdate(viewConfig);\n }\n\n /**\n * Update options on comparison type change\n */\n compareChange = (compare) => {\n let viewConfig = this.state.viewConfig;\n viewConfig.feature = compare.value;\n this.setState({ compare, viewConfig });\n this.optionsUpdate(viewConfig);\n }\n\n\n /**\n * Update filter whitelist for features\n */\n filterChange = (filters) => {\n let viewConfig = this.state.viewConfig;\n\tif (filters === null){\n\t\tfilters = [];\n\t}\n viewConfig.class_filter = filters.map(filter => {\n\t\tif(filter!== null && filter.value){\n\t\t\treturn filter.value;\n\t\t}\n\t\treturn false;\n\t});\n this.setState({ filters, viewConfig });\n this.optionsUpdate(viewConfig);\n }\n\n /**\n * Update heatcolor from dropdown\n */\n heatColorChange = (heatColor) => {\n let viewConfig = this.state.viewConfig;\n viewConfig.class_heat = [heatColor.value];\n this.setState({ heatColor, viewConfig });\n this.optionsUpdate(viewConfig);\n }\n\n /**\n * Update direction from dropdown\n */\n heatChange = (heat) => {\n let viewConfig = this.state.viewConfig;\n viewConfig.invert_value = heat.value === 'low' ? 0 : 1;\n this.setState({ heat, viewConfig });\n this.optionsUpdate(viewConfig);\n }\n \n /**\n * Update bin count max from form\n */\n maxChange = (max) => {\n const maxValue = parseInt(max.target.value) || 0;\n let viewConfig = this.state.viewConfig;\n\n if(this.state.displayAs.value === 'haplo'){\n const hapMax = maxValue > 0 ? maxValue : 1;\n const minValue = hapMax -1;\n viewConfig.bin_max = hapMax;\n viewConfig.bin_min = minValue;\n this.setState({maxValue,minValue,viewConfig})\n } else {\n viewConfig.bin_max = maxValue;\n this.setState({maxValue,viewConfig})\n }\n this.optionsUpdate(viewConfig);\n }\n\n /**\n * Update bin count min from form\n */\n minChange = (min) => {\n const minValue = parseInt(min.target.value) || 0;\n let viewConfig = this.state.viewConfig;\n viewConfig.bin_min = minValue;\n this.setState({minValue,viewConfig});\n this.optionsUpdate(viewConfig);\n }\n\n render(props,state) {\n const { displayAs, compare, filters, heatColor, heat, maxValue, minValue } = this.state;\n const { side, genotypes } = this.props;\n let filterFormats = [];\n genotypes.forEach( (gt,count) => {\n if((compare.value === 'total' || count > 0) && gt !== null){\n filterFormats = filterFormats.concat( gt.genotype);\n }\n });\n\n\t// hide filter dropdown if \"none\" is selected\n let filter = displayAs.value !== 'none'\n ? (
\n Filter Genotypes\n \n
\n )\n : null; \n\n return (\n
\n {`${side} Options`} \n
\n
\n Display Type\n \n
\n {displayAs.value !== 'none' ?\n
\n Comparison\n \n
\n : null\n }\n {filter}\n {displayAs.value === 'none'\n ? null\n :\n
\n {displayAs.value === 'heat' || displayAs.value === 'hist' ? 'Max Value' : 'Threshold' }\n this.maxChange(e)}/>\n\n
\n }\n {displayAs.value !== 'none' && displayAs.value !== 'haplo'\n ?\n
\n Min Value\n this.minChange(e)}/>\n
\n :\n null\n }\n
\n {displayAs.value === 'heat'\n ?\n
\n
\n

\n
\n
\n Heat Base Color\n \n
\n
\n Heat Direction\n \n
\n
\n :\n null}\n
\n );\n }\n}\n","/**\n * Options configuration for rulers, bins and other general display.\n */\n\nimport React from 'react';\nimport Select from 'react-select';\nimport {rulerDisplayDefault, binSizeDefault,rulerIntervalDefault,titleDefault} from './DefaultConfiguration'; //sub-components\n\n/**\n * Quick setup for defining ruler options\n * @type {*[]}\n */\n\nconst rulerDisplayOptions = [\n {\n value: 'L',\n label: 'Left'\n },\n {\n value: 'R',\n label: 'Right'\n },\n {\n value: '1',\n label: 'Both'\n },\n {\n value: '0',\n label: 'None'\n },\n];\n\n/**\n * Options component react class\n */\nexport default class BaseOptions extends React.Component {\n state = {\n rulerDisplay : rulerDisplayDefault(rulerDisplayOptions), // Display ruler on LHS\n binSize : binSizeDefault, // Default binsize of 500000 bp\n rulerInterval: rulerIntervalDefault, // Default interval of 5000000 bp\n title: titleDefault, // Blank default title\n };\n\n /**\n * Pass updated options back to model\n * @param value\n */\n optionsUpdate = (value) => {\n this.props.optionsUpdate('general',value);\n };\n \n /**\n * Change ruler placement in cvit canvas component\n * @param value\n */\n rulerChange = (rulerDisplay) => {\n let values = this.state;\n values.rulerDisplay = rulerDisplay;\n this.setState({rulerDisplay});\n this.optionsUpdate(values);\n };\n\n\n /**\n * Change title in cvit canvas component\n * @param e form event\n */\n titleChange = (e) => {\n const title = e.target.value;\n let values = this.state;\n values.title = title;\n this.setState({title});\n this.optionsUpdate(values);\n };\n\n /**\n * Change number of bases used for binning\n * @param e form event\n */\n binChange = (e) => {\n const binSize = parseInt(e.target.value) || 1;\n let values = this.state;\n values.binSize = binSize;\n this.setState({binSize});\n this.optionsUpdate(values);\n };\n\n\n /**\n * Change major intervals on ruler in cvit component\n * @param e form event\n */\n intervalChange = (e) => {\n const rulerInterval = parseInt(e.target.value) || 1;\n let values = this.state;\n values.rulerInterval = rulerInterval;\n this.setState({rulerInterval});\n this.optionsUpdate(values);\n };\n\n \n /**\n * Render options component\n * @param props react component props\n * @param state react component state\n */\n render(props,state) {\n const { rulerDisplay, binSize, rulerInterval, title } = this.state;\n return (\n
\n General Options \n
\n
\n Title \n this.titleChange(e)} />\n
\n
\n Bin Size \n this.binChange(e)}/>\n
\n
\n Ruler Display \n \n
\n {rulerDisplay.value !== '0'\n ?\n
\n Ruler Interval \n this.intervalChange(e)}/>\n
\n : null\n }\n
\n
\n );\n }\n}\n","/**\n * Form for controlling display options on the\n * CViT canvas div BaseOptions controls rulers/title\n * TrackOptions controls LHS/RHS options\n */\nimport React from 'react';\nimport TrackOptions from \"./TrackOptionsSelect\";\nimport BaseOptions from \"./BaseOptionsSelect\";\nimport {binSizeDefault} from \"./DefaultConfiguration\";\n\nexport default class OptionsForm extends React.Component {\n\tstate = {\n\t\t'binSize': binSizeDefault,\n\t}\n\t\n\t/**\n\t * Setup options and pass to parent\n\t */\n\toptionsUpdate = (group,value) => {\n\t\tlet options = this.props.options;\n\n\t\tlet binSize = this.state.binSize;\n\t\tswitch (group) {\n\t\t\tcase 'left':\n\t\t\t\toptions.left = value;\n\t\t\t\toptions.left.bin_size = binSize;\n\t\t\t\tbreak;\n\t\t\tcase 'right':\n\t\t\t\toptions.right = value;\n\t\t\t\toptions.right.bin_size = binSize;\n\t\t\t\tbreak;\n\t\t\tcase 'general':\n\t\t\tdefault:\n\t\t\t\tbinSize = value.binSize;\n\t\t\t\toptions.general.title = value.title;\n\t\t\t\toptions.general.tick_interval = value.rulerInterval;\n\t\t\t\toptions.general.display_ruler = value.rulerDisplay.value;\n\t\t\t\toptions.left.bin_size = binSize;\n\t\t\t\toptions.right.bin_size = binSize;\n\t\t\t\tthis.setState({binSize});\n\t\t}\n\t\tthis.props.setOptions(options);\n\t}\n\n\trender(props,state) {\n\t\tconst { genotypes } = this.props;\n\t\treturn (\n\t\t\t
\n\t\t\t\tOptions \n\t\t\t\tthis.optionsUpdate(group,value)} />\n\t\t\t\tthis.optionsUpdate(group,value)}/>\n\t\t\t\tthis.optionsUpdate(group,value)}/>\n\t\t\t
\n\t\t);\n\t}\n}\n","import React from 'react';\n\nexport default class About extends React.Component {\n render () {\n return (\n
\n
\n
About
\n
\n
\n
\n

\n GCViT: a multiple chromosome visualisation tool for \n visualizing resequencing or SNP array data. GCViT permits \n comparison of multiple accessions to a reference accession \n within a single dataset, to visually identify regions of \n similarities and differences across the genome. \n

\n \n
\n
\n
\n );\n }\n}\n","import React from 'react';\n\nexport default class ReferenceGenotype extends React.Component {\n state= {hideInfo:true};\n render () {\n const {hideInfo} = this.state;\n return (\n
\n
\n {this.setState({hideInfo:!hideInfo})}}\n >\n
\n
\n
Reference Genotype
\n
\n
\n
\n
\n
\n
\n
\n

\n

    \n
  • \n Pick a Color that will represent the reference \n genotype. Please note that this color will only \n show up when “total” is selected in the display \n options. \n
  • \n
  • \n Pick a dataset to explore. Note that comparisons\n can only be done within a single dataset.\n
  • \n
  • \n Select which genotype will be the reference by \n either typing in the name of the genotype or using \n the pull down menu to see available genotypes. All\n comparison genotypes selected in the next step will\n be compared against this genotype.
  • \n
\n *(note that large data sets may take a few seconds load,\n before the accession names to appear in the pull down\n menu.)\n

\n
\n
\n
\n
\n );\n }\n}","import React from 'react';\n\nexport default class ComparisonGenotype extends React.Component {\n state= {hideInfo:true};\n render () {\n const {hideInfo} = this.state;\n return (\n
\n
\n {this.setState({hideInfo:!hideInfo})}}\n >\n
\n
\n
Comparison Genotype
\n
\n
\n
\n
\n
\n
\n
\n

\n One or more comparison genotypes can be specified. Note\n that Comparisons can only be made within the same dataset.\n

\n

\n

    \n
  • \n Pick a Color that will represent the comparison\n genome. If comparing multiple genotypes it will be\n important to pick distinct colors for each.\n
  • \n
  • \n Select a comparison genotype by either typing in \n the name of the genotype or using the pull down \n menu to see available genotypes. \n
  • \n
  • \n Remove a comparison genotype by clicking on the \n X. \n
  • \n
\n

\n
\n
\n
\n
\n );\n }\n}\n","import React from 'react';\n\nexport default class GeneralOptions extends React.Component {\n state= {hideInfo:true};\n render () {\n const {hideInfo} = this.state;\n return (\n
\n
\n {this.setState({hideInfo:!hideInfo})}}\n >\n
\n
\n
General Options
\n
\n
\n
\n
\n
\n
\n
\n

\n Title Default: blank Title shown on the display. \n

\n

\n Bin Size Default: 500000bp Because the data \n on a whole genome display is highly condensed, it must be \n divided into bins, with the data within each bin averaged,\n counted, or otherwise combined into one value. Large \n genomes and/or very dense data sets suggest smaller bin \n sizes. However, setting the bin size too small will slow \n down rendering of the image to the point it may not display \n at all or it may become difficult or impossible to see \n differences in the data. For large genomes, it is \n recommended to not set the bin size much lower than \n 500000.\n

\n

\n Ruler Display Default: left Where ruler is placed on the image. \n

\n

\n Ruler Interval Default: 5000000 Measured in\n bp, indicates how often to draw tic marks on the ruler. \n Each major tic mark will be labeled with a number and have \n one minor division between. Any value below 1000000 is \n likely to cause labels to overlap and be unreadable.\n

\n
\n
\n
\n
\n );\n }\n}","import React from 'react';\n\nexport default class DisplayNone extends React.Component {\n state= {hideInfo:true};\n render () {\n const {hideInfo} = this.state;\n return (\n
\n
\n {this.setState({hideInfo:!hideInfo})}}\n >\n
\n
\n
Display Type: None
\n
\n
\n
\n
\n
\n
\n
\n

Don't render anything on this side of the chromosome backbone.

\n
\n
\n
\n
\n );\n }\n}","import React from 'react';\n\nexport default class DisplayHaplotype extends React.Component {\n state= {hideInfo:true};\n render () {\n const {hideInfo} = this.state;\n return (\n
\n
\n {this.setState({hideInfo:!hideInfo})}}\n >\n
\n
\n
Display Type: Haplotype
\n
\n
\n
\n
\n
\n
\n
\n

Shows SNPs as block regions that only display if the count in the bin meets the provided threshold.

\n

\n This Display is good for:\n

    \n
  • Viewing inheritance when comparing a line with its parents.
  • \n
\n

\n

Comparison Default: different Which comparison with the reference to display.\n

    \n
  • Different: Positions where reference and comparison line have different alleles.
  • \n
  • Same: Positions where reference and comparison line have the same alleles.
  • \n
  • Total: Total number of SNPs for reference and comparison, alongside a count for locations where the allele was undefined.
  • \n
\n

\n

Filter Genotypes Default: all [blank] Allows the restriction of the displayed genotypes when more-than-one is available,\n due to either more-than-one comparison, or using the total comparison. If not empty, only the selected genotypes will display. This option is useful if the user would like to see the differences between the reference and each comparison on opposite sides of the chromosome.\n

\n

Threshold Default: 1 The glyph is only drawn if the count matches or exceeds this number.

\n
\n
\n
\n
\n );\n }\n}","import React from 'react';\n\nexport default class DisplayHistogram extends React.Component {\n state= {hideInfo:true};\n render () {\n const {hideInfo} = this.state;\n return (\n
\n
\n {this.setState({hideInfo:!hideInfo})}}\n >\n
\n
\n
Display Type: Histogram
\n
\n
\n
\n
\n
\n
\n
\n

Shows SNPs as block regions with a height that is proportional to the count in the bin and the provided min and max values.\n Similar to the heat map option, but uses volume instead of color to indicate bin density.

\n

Comparison Default: different Which comparison with the reference to display.\n

    \n
  • Different: Positions where reference and comparison line have different alleles.
  • \n
  • Same: Positions where reference and comparison line have the same alleles.
  • \n
  • Total: Total number of SNPs for reference and comparison, alongside a count for locations where the allele was undefined.
  • \n
\n

\n

\n Filter Genotypes Default: all [blank] Select \n one or more genotypes or leave blank for all comparison \n genotypes.\n

\n

\n Min Value Default: 0 Cutoff value for \n displaying any height on the glyph. Any count equal to or \n smaller than this number will not be displayed.\n

\n

\n Max Value Default: 0 Cutoff value for \n displaying maximum height on the glyph. Any count equal to \n or larger than this number will be displayed as the full \n height. Here, 0 is shorthand for the largest count in the \n reference across all bins. \n

\n
\n
\n
\n
\n );\n }\n}","import React from 'react';\n\nexport default class DisplayHeat extends React.Component {\n state= {hideInfo:true};\n render () {\n const {hideInfo} = this.state;\n return (\n
\n
\n {this.setState({hideInfo:!hideInfo})}}\n >\n
\n
\n
Display Type: Heatmap
\n
\n
\n
\n
\n
\n
\n
\n

Shows SNPs as block regions with a color that is proportional to the count in the bin and the provided min and max values.\n Similar to the heat map option, but color instead of volume to indicate bin density.

\n

Comparison Default: different Which comparison with the reference to display.\n

    \n
  • Different: Positions where reference and comparison line have different alleles.
  • \n
  • Same: Positions where reference and comparison line have the same alleles.
  • \n
  • Total: Total number of SNPs for reference and comparison, alongside a count for locations where the allele was undefined.
  • \n
\n

\n

\n Filter Genotypes Default: all [blank] Select \n one or more genotypes or leave blank for all comparison \n genotypes.\n

\n

\n Min Value Default: 0 Cutoff value for \n displaying any height on the glyph. Any count equal to or \n smaller than this number will not be displayed.\n

\n

\n Max Value Default: 0 Cutoff value for \n displaying maximum height on the glyph. Any count equal to \n or larger than this number will be displayed as the full \n height. Here, 0 is shorthand for the largest count in the \n reference across all bins. \n

\n

\n Heat Base Color Default: white Choose to \n go from white -> color or black -> color \n

\n

\n Heat Direction Default: Min-Max Render heat \n low-to-high as base -> color (Min-Max) or color -> base (Max-Min) \n

\n
\n
\n
\n
\n );\n }\n}","/**\n * Container for managing help documentation\n * all help topic contents are found in\n * src/Components/HelpTopics\n */\n\nimport React from 'react';\nimport About from \"./HelpTopics/About\";\nimport ReferenceGenotype from \"./HelpTopics/ReferenceGenotype\";\nimport ComparisonGenotype from \"./HelpTopics/ComparisonGenotype\";\nimport GeneralOptions from \"./HelpTopics/GeneralOptions\";\nimport DisplayNone from \"./HelpTopics/DisplayNone\";\nimport DisplayHaplotype from \"./HelpTopics/DisplayHaplotype\";\nimport DisplayHistogram from \"./HelpTopics/DisplayHistogram\";\nimport DisplayHeat from \"./HelpTopics/DisplayHeat\";\n\nexport default class HelpModal extends React.Component {\n render () {\n return(\n
\n
\n
GCViT - Genotype Comparison Visualisation Tool
\n
\n
\n \n
Genotypes
\n \n \n
Options
\n \n \n \n \n \n
\n
\n
\n \n
\n
\n );\n }\n}\n","/**\n * React component for rendering the \"export data\" modal\n */\n\nimport React from 'react';\nimport {imageTitleDefault} from \"./DefaultConfiguration\";\n\nexport default class DataModal extends React.Component {\n state = {\n name: imageTitleDefault,\n format: 'svg',\n quality: .95,\n gffOptions: {\n 'chromosome':true,\n 'diff':true,\n 'same':true,\n 'total':true\n }\n };\n\n /**\n * Save image using configured parameters\n */\n onClickImage = async function(){\n\t//toggle on load indicator\n let loadIndicator = document.getElementById(\"img-load\");\n loadIndicator.classList.toggle(\"download-loading\");\n\tconst url = this.state.format === 'svg' ? await this.resolveSVGBlob() : this.resolvePngBlob();\n\tthis.saveImage(url);\n }\n \n /**\n * Convert canvas to SVG blob url\n */\n resolveSVGBlob = () =>{\n\t return new Promise(resolve => {\n\t\t setTimeout(() => { // use short timeout to give DOM chance to render load indicator div\n \t \tlet paper = window.cvit.model.paper;\n \tlet url = 'data:image/svg+xml;utf8,' +\n \tencodeURIComponent(paper.project.exportSVG({asString:true}));\n\t \tresolve(url);\n\t\t }, 500);\n\n\t });\n }\n\n /**\n * Convert canvas to png blob url\n */\n resolvePngBlob = () => {\n return new Promise(resolve => {\n setTimeout(() => {\n \t let paper = window.cvit.model.paper;\n paper.project.view.element.toBlob((blob) => {\n let url = URL.createObjectURL(blob);\n this.saveImage(url);\n resolve(url);\n\t\t});\n }, 20);\n });\n };\n \n /**\n * Download generated url blob\n */\n saveImage = (url) => {\n let name = this.state.name !== '' ? this.state.name : 'gcvit';\n name += `.${this.state.format}`;\n let link = document.createElement('a');\n link.download = name;\n link.href = url;\n document.body.appendChild(link);\n\t// toggle off load indicator\n let loadIndicator = document.getElementById(\"img-load\");\n loadIndicator.classList.toggle(\"download-loading\");\n link.click();\n };\n\n onClickData = () => {\n let gff = '##gff-version 3.2.1';\n let data = window.cvit.model.data;\n let gffOpts = this.state.gffOptions;\n let loadIndicator = document.getElementById(\"data-load\");\n loadIndicator.classList.toggle(\"download-loading\");\n for (let group in data) {\n if(data.hasOwnProperty(group) && gffOpts[group]) {\n let dataGroup = data[group];\n if( dataGroup.hasOwnProperty('features')) {\n dataGroup.features.forEach(feature => {\n let line = `${feature.seqName}\\t${feature.source}\\t${feature.feature}\\t${feature.start}\\t${feature.end}\\t${feature.score}\\t${feature.strand}\\t${feature.frame}`;\n let attributes = '';\n for (let key in feature.attribute) {\n if (feature.attribute.hasOwnProperty(key)) {\n attributes += `${key}=${feature.attribute[key]};`\n }\n }\n gff +=`\\n${line}\\t${attributes}`;\n });\n }\n }\n }\n let url = 'data:text/plain;utf8,' +\n encodeURIComponent(gff);\n\t// toggle off loading indicator\n loadIndicator.classList.toggle(\"download-loading\");\n\t// open gff in new window\n let win = window.open();\n // noinspection HtmlDeprecatedAttribute\n win.document.write('');\n win.download('gcvit.gff');\n };\n\n onInput = (evt) =>{\n this.setState({name:evt.target.value});\n };\n\n onSelect = (evt) => {\n this.setState({format:evt.target.value});\n };\n\n onChecked = (evt) => {\n let gffOptions = this.state.gffOptions;\n gffOptions[evt.target.value] = !gffOptions[evt.target.value];\n this.setState( {gffOptions});\n };\n\n render(props,state){\n let {name,format,gffOptions} = this.state;\n return(\n
\n
\n
Downloads
\n
\n
\n
\n
\n
Download Image
\n

Download the current view as an image.

\n\n
\n
Image Settings:
\n \n \n File Name: \n \n this.onInput(evt)}\n placeholder={'cvit'}\n />\n \n \n \n File Type: \n \n \n \n \n \n \n \n \n \n\t\t\t\t
Generating Image: Please Wait
\t\n\t\t \n
\n
\n
\n
\n
\n
Download Data
\n

Download data as a gff

\n\n
\n
GFF Settings:
\n \n \n Include: \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n\t\t\t\t
Generating Gff: Please Wait
\n \n
\n
\n
\n
\n
\n \n
\n
\n );\n }\n}\n","/**\n * Button to send request for gff to server and \n * re-render cvitjs canvas component with results.\n */\n\nimport React from 'react';\nimport {binSizeDefault} from \"./DefaultConfiguration\";\n\n\nexport default class DisplayButton extends React.Component {\n state = {\n priorRequest:{\n request:'',\n interval: binSizeDefault,\n response:{},\n refMax: 0,\n },\n };\n\n /**\n * craft request for new gff if needed, then re-render cvit canvas with new options\n */\n onSubmit = () => {\n\tthis.props.setKey();\n const { selected, options } = this.props;\n const {priorRequest} = this.state;\n let {headers} = this.props\n let requestString = '';\n let classes = {};\n let count = 0;\n\t// iterate through selected GTs and build request string\n selected.forEach((query, i) => {\n if (query !== null && query.hasOwnProperty('dataset') && query.hasOwnProperty('genotype')\n && query.dataset != null && query.genotype != null){\n count++;\n requestString = i === 0 ? requestString+'Ref=' : requestString+'&Variant=';\n requestString = requestString+encodeURIComponent(`${query.dataset.value}:${query.genotype.value}`);\n classes[query.genotype.value] = query.color;\n } else if(i === 0){\n throw new Error('Reference must be selected.')\n }\n });\n classes['undefined'] = 'black';\n\n // Configure cvit model for new view\n let cvit = window.cvit;\n let model = cvit.model;\n model._viewConfig.classes = classes;\n const binSize = options.left.hasOwnProperty('bin_size') ? options.left.bin_size :\n options.right.hasOwnProperty('bin_size') ? options.right.bin_size : binSizeDefault;\n requestString = requestString + \"&Bin=\" + encodeURIComponent(binSize);\n this.props.hide();\n\n //fetch new data\n if( (priorRequest.request !== requestString) ||\n (binSize !== priorRequest.interval )\n ) {\n document.getElementById('cvit-app').style.visibility = 'visible';\n this.setState({hideOptions:true});\n model._viewData.same = {};\n model._viewData.diff = {};\n model._viewData.total = {};\n\n headers.append(\"Content-Type\", \"application/x-www-form-urlencoded\")\n console.log('auth-header', headers)\n\n model.appendData('api/generateGFF', {\n method: 'POST',\n headers: headers,\n body: requestString,\n })\n .then(() =>{\n model._viewLayout.chrOrder = model._setChrOrder(model._viewData);\n let refMax = 0;\n let vd = model._viewData;\n Object.keys(vd.total).forEach(key => {\n let chr = vd.total[key];\n if (chr.hasOwnProperty('maxScore') && chr.maxScore.value > refMax) refMax = chr.maxScore.value;\n });\n this.setState({priorRequest:{response: model._viewData, request:requestString, interval:binSize, refMax}});\n this.setView(options, model, count,refMax);\n })\n .catch(e => {\n console.error('cvit.js: Error requesting data: ', e);\n });\n } else {\n this.setView(options, model,count,priorRequest.refMax);\n }\n };\n\n // update cvit canvas\n setView = (options,model,count,refMax) =>{\n if(options.left.bin_max === 0){\n options.left.bin_max = options.left.display === 'heat' ? refMax : refMax*count;\n }\n if(options.right.bin_max === 0){\n options.right.bin_max = options.right.display === 'heat' ? refMax : refMax*count;\n }\n model._viewConfig.left.class_heat = [];\n model._viewConfig.right.class_heat = [];\n model._viewConfig.left.class_filter = [];\n model._viewConfig.right.class_filter = [];\n model._viewConfig = model._combineObjects(model._viewConfig, options);\n model._redraw = true;\n model.setDirty(true);\n model._inform();\n };\n\n /**\n * render button component\n */\n render () {\n return(\n \n );\n }\n\n}\n","import React from 'react';\n\n/**\n * Key for displayed datasets.\n */\n\nexport default class key extends React.Component {\n state = {\n\t visible : false,\n }\n\n render () {\n\t var {visible} = this.state;\n\t var {datasets} = this.props;\n\t console.log(datasets);\n\t var keys = datasets.map((data,i) => {\n\t\tvar keyItem = [];\n\t\tif(data.genotype && data.color) {\n\t\t\tif (i === 0) {\n\t\t\t\tkeyItem.push(
Reference
);\n\t\t\t} else if (i === 1) {\n\t\t\t\tkeyItem.push(
Variants
);\n\t\t\t} \n\n\t\t\t//keyItem.push(
{data.genotype.label}
);\n\t\t\tkeyItem.push(
{` `}
{data.genotype.label}
);\n\t\t\t\n\t\t\tif (i === 0) {\n\t\t\t\tkeyItem.push(
);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn keyItem;\n\t } );\n\t \n return(\n\t
\n \t
\n
{this.setState({visible : !visible});}}>\n
\n
Key
\n
\n\t
\n\t
\n\t
\n\t
\n\t\t{keys}\n
\n
\n\t
\n );\n }\n}\n","/**\n * @fileoverview Main gcvit ui app.\n * TODO: Update from class to hooks\n */\n\nimport React from 'react';\nimport ReactModal from 'react-modal';\n\nimport ReferenceForm from './Components/ReferenceForm';\nimport CompareForm from './Components/CompareForm';\nimport OptionsForm from './Components/OptionsForm';\nimport HelpModal from './Components/HelpModal'\nimport DataModal from \"./Components/DownloadModal\";\nimport DisplayButton from \"./Components/DisplayButton\";\nimport {rulerIntervalDefault, titleDefault} from \"./Components/DefaultConfiguration\";\nimport Key from \"./Components/Key\"\n\nexport default class App extends React.Component {\n state = {\n datasets:[], //Datasets available from service\n genotypes: {}, //All genotypes available in selected dataset\n referenceDataset: null, //Dataset reference was chosen from\n selected:[], //All selected datasets+genotypes for comparison\n\tcurrentKey:[], //Deep copy of selected after submitting a comparison\n options: { //General configuration for selected data options\n left:{\n feature : 'none',\n offset : -0,\n draw_label : 0,\n },\n right:{\n feature : 'none',\n offset : 0,\n draw_label : 0,\n },\n general:{\n title: titleDefault,\n display_ruler: 'L',\n tick_interval: rulerIntervalDefault,\n },\n },\n hideOptions: false, //show/hide the gcvit configuration UI\n showModal: '', //show/hide overlay modals (dl/help)\n auth: process.env.REACT_APP_USE_AUTH, //is react using authentication?\n user: '', // passed username\n pwd: '', // passed password\n authHeader: new Headers(), //basicAuth header\n };\n\n /**\n * GET request to API to fetch the available datasets to populate options\n * @param {header} header\n **/\n loadDatasets = (header = this.state.authHeader) => {\n fetch('api/experiment',{method:\"GET\", headers: header})\n .then( response => response.json())\n .then( datasets => {\n this.setState({datasets});\n })\n };\n\n /**\n * Append a new comparison set to the display array\n * @param {number} idx index to add value to array\n * @param {Object} value color+dataset+genotype object to append\n */\n appendDataset = (idx,value) => {\n let selected = this.state.selected.slice();\n selected[idx]=value;\n this.setState({selected});\n };\n\n /**\n * GET request to populate the genotype array\n * @param {Object} referenceDataset dataset to draw genotypes from\n */\n\n setDataset = (referenceDataset) => {\n let val = referenceDataset.value;\n if( !this.state.genotypes[val]){\n fetch(`api/experiment/${val}`,{method:\"GET\", headers: this.state.authHeader})\n .then(result => result.json())\n .then( genotype => {\n let genotypes = JSON.parse(JSON.stringify(this.state.genotypes));\n genotypes[val] = genotype;\n this.setState({referenceDataset, genotypes, selected:[]})\n })\n } else {\n this.setState({referenceDataset,selected:[]})\n }\n };\n\n /**\n * Edit display options\n * @param {object} options display options\n */\n setOptions = (options) => {\n this.setState(options);\n };\n\n /**\n * Hide help/download modal at close\n */\n handleCloseModal = () => this.setState({ showModal: '' });\n\n /**\n * Display help/download modal at open\n * @param {boolean} showModal\n */\n handleOpenModal = (showModal) => this.setState({showModal});\n\n /**\n * Username update\n * @param e form event\n */\n userChange = (e) => {\n const user = e.target.value;\n this.setState({user});\n };\n \n /**\n * Update password from form\n * @param e form event\n */\n passwordChange = (e) => {\n const pwd = e.target.value;\n this.setState({pwd});\n };\n /**\n * Test curret credentials against server\n */\n checkAuthState = () => {\n const authString = btoa(this.state.user+':'+this.state.pwd);\n let authHeader = new Headers();\n authHeader.append('Authorization', 'Basic '+ authString);\n fetch('/login', {method:'GET', headers:authHeader})\n .then (response => {\n if( response.status === 202 ) {\n this.setState({authHeader});\n this.loadDatasets()\n } else {\n window.alert(\"Invalid credentials.\")\n }\n })\n };\n\n /**\n * Reset auth state to none\n */\n logout = () => {\n const authHeader = new Headers();\n const pwd = \"\";\n const user = \"\";\n let datasets = [];\n this.setState({authHeader, user, pwd, datasets});\n this.loadDatasets(authHeader);\n };\n\n setKey = () => {\n\tthis.setState({currentKey:JSON.parse(JSON.stringify(this.state.selected))});\n }\n\n /**\n * After UI mounts, hide cvit-app until first comparison request is made, and populate\n * list of available datasets\n */\n componentDidMount() {\n document.getElementById('cvit-app').style.visibility = 'hidden';\n this.loadDatasets()\n };\n\n /**\n * Render app components\n */\n render() {\n const { selected, currentKey, options, hideOptions, showModal, auth, user, authHeader } = this.state;\n let gts = this.state.referenceDataset !== null && this.state.genotypes[this.state.referenceDataset.value] !== undefined\n ? this.state.genotypes[this.state.referenceDataset.value]\n : [];\n\n return (\n
\n \n this.handleOpenModal()} />\n \n \n this.handleOpenModal()} />\n \n\n
\n \"LIS\n
\n
\n
GCViT: SNP Comparison Tool
\n
Phaseolus (Common Bean, Lima Bean, Tepary Bean, etc.)
\n
\n\n {this.setState({hideOptions:!hideOptions})}}\n >\n
\n
\n
Configure View
\n
\n
\n
\n
\n { auth === \"TRUE\" ?\n !authHeader.has(\"Authorization\") ?\n
\n Login \n
\n
\n this.userChange(e)} />\n
\n
\n this.passwordChange(e)} />\n
\n
\n
this.checkAuthState()} > Login
\n
\n
\n
\n :\n
\n Login \n
\n
\n
{`Logged in as ${user}`}
\n
\n
\n
this.logout()} > Logout
\n
\n
\n
\n :\n null\n }\n \n { selected.length > 0 && selected[0].genotype !== null\n ? \n : null\n }\n \n \n
\n {this.setState({hideOptions:true});}} setKey={this.setKey}/>\n

\n \n
\n \n
\n\t\t\n
\n );\n };\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport 'purecss/build/grids.css';\nimport 'purecss/build/buttons.css';\nimport './index.css';\nimport App from './App';\n\n// Initial entry point, bind gcvit ui to 'selector-app' div\nReactDOM.render(, document.getElementById('selector-app'));\n\n"],"sourceRoot":""}