Skip to content
Permalink
Browse files

add upload file

  • Loading branch information
yuj12001 committed Oct 11, 2015
1 parent 9d92804 commit c57eb452fe8154a82f04e36d32734323552a3951
Showing with 227,662 additions and 20 deletions.
  1. +18 −4 VQI_GenomeBrowser.js
  2. +14 −10 VQI_GenomeBrowserDemo.html
  3. +65,700 −0 cpg_site_hg19.txt
  4. +32 −6 dynamic_loading.php
  5. +30,500 −0 hg19_refgene.txt
  6. +65,699 −0 shelve_hg19.txt
  7. +65,699 −0 shoer_hg19.txt
@@ -719,18 +719,28 @@ function VQI_GenomeBrowser(id, serviceURL) {
{
if(key2 === 'custom' || key2 ==='genes')
{
checkTableUpload(genomes[key][key2].table_name)
checkTableUpload(genomes[key][key2].table_name, genomes[key][key2].file)
}
if(key2 === 'cpg')
{
var tempHandles = genomes[key][key2].table_name.split(",");
var fileHandles = genomes[key][key2].file.split(",");
for(var i in tempHandles)
{
checkTableUpload(tempHandles[i].trim())
checkTableUpload(tempHandles[i].trim(), fileHandles[i].trim())
}
}
}
}
selectBox = $("#" + divId +" #genomes").get(0);
selectBox.options.length = 0;
var optionIndex = 0;
for (var key in genomes) {
var text = key;
var value = key;
selectBox.options[optionIndex++] = new Option(text, value);
}

}

this.setGenome = function(genome) {
@@ -741,19 +751,21 @@ function VQI_GenomeBrowser(id, serviceURL) {
for(var key in genomes[genome])
{
this.addTrack(genome+"_"+key, key, genomes[genome][key])
// console.log(genomes[genome][key]);
}
}
}

var checkTableUpload = function(tableName) {
var checkTableUpload = function(tableName,filePath) {

$.ajax({
url: serviceURL,
type: 'POST',
dataType: "json",
data: {
"checkTable": "",
"tableName": tableName
"tableName": tableName,
"filePath": filePath
}

}).success(function (returnData) {
@@ -1225,6 +1237,7 @@ function VQI_GenomeBrowser(id, serviceURL) {
}

}).success(function (returnData) {
// console.log(returnData);
drawTrack(returnData);
LoadingText.remove();
}
@@ -1490,6 +1503,7 @@ function VQI_GenomeBrowser(id, serviceURL) {
}

}).success(function (returnData) {
// console.log(returnData);
if(returnData.length == 2) {//exons exist

drawTrack(returnData[0], returnData[1]);
@@ -45,21 +45,25 @@
/*fasta: {fasta: "../../genome/hg19.fa", index: "../../genome/hg19.fa.fai"},
genes: {file: "../../genome/hg19_genes.txt", table_name:'hg19_gene_annotation'},
cpg: {file: "../../genome/hg19_genes.txt", table_name:'hg19_cpg'},*/
fasta: {fasta: "/Users/corywang/Downloads/hg19.fa.txt", index : "/Users/corywang/Downloads/hg19.fa.fai.txt"},
genes: {file: "", table_name: "upload1436481988"},
cpg: {file: "", table_name: "upload1437097194,upload1437098473,upload1437098556"},
custom: {file: "", table_name:'upload1436411775'}
//fasta: {fasta: "/Users/corywang/Downloads/hg19.fa.txt", index : "/Users/corywang/Downloads/hg19.fa.fai.txt"},
genes: {file: "hg19_refgene.txt", table_name: "hg19_refgene"},
cpg: {file: "cpg_site_hg19.txt,shelve_hg19.txt,shoer_hg19.txt", table_name: "cpg_site_hg19,shelve_hg19,shoer_hg19"},
//custom: {file: "", table_name:'upload1436411775'}
},
"MM9":{
fasta: {fasta: "/Users/corywang/Downloads/mm9.fa.txt", index: "/Users/corywang/Downloads/mm9.fa.fai.txt"},
//genes: {file: "../../genome/mm9/mm9_genes.txt", table_name:'mm9_gene_annotation'},
// "MM9":{
// fasta: {fasta: "/Users/corywang/Downloads/mm9.fa.txt", index: "/Users/corywang/Downloads/mm9.fa.fai.txt"},
// //genes: {file: "../../genome/mm9/mm9_genes.txt", table_name:'mm9_gene_annotation'},
// gene_annotation: {label: 'mm9', table_name:'mm9_gene_annotation'},
},
// // gene_annotation: {label: 'mm9', table_name:'mm9_gene_annotation'},
// },
};
obj.loadGenomes(genomes); //loads the genomes based on the datastructure described above
obj.setGenome("HG19");
setTimeout(function(){ hs()}, 3000);
function hs (){
obj.setGenome("HG19");
}
//obj.setGenome("HG19");
// obj.setGenome("MM9"); //should set hg19 genome in dropdown and display fasta, cpg and genes tracks.
// addTrack(); should add track using the data array supplied.

0 comments on commit c57eb45

Please sign in to comment.
You can’t perform that action at this time.