Commit 44b21b04 authored by Daniel Teixeira's avatar Daniel Teixeira
Browse files

adding variant class

parent c483a756
......@@ -20,29 +20,48 @@
<form class="form-horizontal">
<div class="form-group">
<label for="chromosome" class="col-sm-2 control-label">Chromosome</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="chromosome" ng-model="beaconConfig.chromosome" placeholder="Chromosome">
<div class="col-sm-4">
<input type="text" class="form-control" id="chromosome" ng-model="config.chromosome" placeholder="Chromosome">
</div>
</div>
<div class="form-group">
<label for="position" class="col-sm-2 control-label">Position</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="position" ng-model="beaconConfig.position" placeholder="Position">
<div class="col-sm-4">
<input type="text" class="form-control" id="position" ng-model="config.position" placeholder="Position">
</div>
</div>
<div class="form-group">
<label for="dataset" class="col-sm-2 control-label">Dataset</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="dataset" ng-model="beaconConfig.dataset" placeholder="Dataset">
<div class="col-sm-4">
<input type="text" class="form-control" id="dataset" ng-model="config.dataset" placeholder="Dataset">
</div>
</div>
<div class="form-group">
<label style="color:green" for="dataset" class="col-sm-2 control-label">Variant Class</label>
<div class="col-sm-4">
<select name="singleSelect" id="singleSelect" ng-model="config.variantClass" class="form-control">
<option value="">Substitution (For precise variants)</option>
<option value="DEL">DEL (Deletion)</option>
<option value="INS">INS (Insertion)</option>
<option value="DUP">DUP (Duplication)</option>
<option value="INV">INV (Inversion)</option>
<option value="CNV">CNV (Copy Number Variation)</option>
<option value="BND">BND (Breakend???)</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<a target="beacon" ng-href="{{getApiUrl()}}">{{getApiUrl()}}</a>
<!--<p></p>
<button type="submit" class="btn btn-default">Call ArrayMap Beacon</button>-->
<a target="beacon" ng-href="{{getApiUrl()}}" class="btn btn-info">Beacon Query</a>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<a target="beacon" ng-href="{{getInfoUrl()}}">{{getInfoUrl()}}</a>
<a target="beacon" ng-href="{{getInfoUrl()}}" class="btn btn-info">Beacon Info</a>
</div>
</div>
</form>
</div>
......
angular.module('arrayMap', [])
.controller('BeaconController', ['$scope', '$location', function ($scope, $location) {
$scope.greetMe = 'World';
$scope.beaconConfig = {
$scope.config = {
"chromosome" : "9",
"position" : 57649422,
"dataset" : "8010/3"
"dataset" : "8010/3",
"variantClass" : "DEL"
}
$scope.getInfoUrl = function (){ return $location.absUrl() + "info"};
$scope.getApiUrl = function (){
return $location.absUrl() + "v0.2/query?chromosome=" + $scope.beaconConfig.chromosome + "&position=" + $scope.beaconConfig.position + "&dataset=" + $scope.beaconConfig.dataset;
var conf = $scope.config;
return $location.absUrl() + "v0.2/query?chromosome=" +
conf.chromosome +
"&position=" + conf.position +
"&dataset=" + conf.dataset +
((conf.variantClass === "") ? "" : "&variantClass=" + conf.variantClass)
;
}
}]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment