aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rwxr-xr-xwqflask/base/data_set.py10
-rwxr-xr-xwqflask/base/species.py6
-rwxr-xr-xwqflask/base/trait.py2
-rwxr-xr-xwqflask/maintenance/gen_select_dataset.py47
-rwxr-xr-xwqflask/wqflask/correlation_matrix/show_corr_matrix.py153
-rwxr-xr-xwqflask/wqflask/marker_regression/marker_regression.py16
-rwxr-xr-xwqflask/wqflask/my_pylmm/data/genofile_parser.py14
-rwxr-xr-xwqflask/wqflask/show_trait/show_trait.py1
-rw-r--r--wqflask/wqflask/static/new/css/charts.css28
-rw-r--r--wqflask/wqflask/static/new/javascript/compare_traits_scatterplot.coffee76
-rw-r--r--wqflask/wqflask/static/new/javascript/compare_traits_scatterplot.js57
-rw-r--r--wqflask/wqflask/static/new/javascript/corr_matrix.coffee275
-rw-r--r--wqflask/wqflask/static/new/javascript/corr_matrix.js157
-rw-r--r--wqflask/wqflask/static/new/javascript/create_corr_matrix.coffee42
-rw-r--r--wqflask/wqflask/static/new/javascript/create_corr_matrix.js47
-rwxr-xr-xwqflask/wqflask/static/new/javascript/dataset_menu_structure.json1362
-rwxr-xr-xwqflask/wqflask/static/new/javascript/get_traits_from_collection.coffee75
-rwxr-xr-xwqflask/wqflask/static/new/javascript/get_traits_from_collection.js77
-rw-r--r--wqflask/wqflask/static/new/javascript/lod_chart.coffee24
-rw-r--r--wqflask/wqflask/static/new/javascript/lod_chart.js82
-rwxr-xr-xwqflask/wqflask/static/new/javascript/marker_regression.coffee85
-rwxr-xr-xwqflask/wqflask/static/new/javascript/marker_regression.js48
-rwxr-xr-xwqflask/wqflask/static/new/javascript/show_trait.coffee6
-rwxr-xr-xwqflask/wqflask/static/new/javascript/show_trait.js4
-rwxr-xr-xwqflask/wqflask/static/new/javascript/show_trait_mapping_tools.coffee12
-rwxr-xr-xwqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js12
-rwxr-xr-xwqflask/wqflask/templates/correlation_matrix.html19
-rwxr-xr-xwqflask/wqflask/templates/interval_mapping.html6
-rwxr-xr-xwqflask/wqflask/templates/show_trait_statistics_new.html5
-rwxr-xr-xwqflask/wqflask/views.py7
30 files changed, 2359 insertions, 396 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index a2b13748..843862aa 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -164,6 +164,7 @@ class Markers(object):
marker['chr'] = int(marker['chr'])
else:
marker['chr'] = 19
+ print("Mb:", marker['Mb'])
marker['Mb'] = float(marker['Mb'])
self.markers = markers
@@ -670,6 +671,7 @@ class PhenotypeDataSet(DataSet):
def get_trait_info(self, trait_list, species = ''):
for this_trait in trait_list:
+
if not this_trait.haveinfo:
this_trait.retrieve_info(get_qtl_info=True)
@@ -679,6 +681,7 @@ class PhenotypeDataSet(DataSet):
#phenotype traits, then display the pre-publication description instead
#of the post-publication description
if this_trait.confidential:
+ this_trait.description_display = ""
continue # for now
if not webqtlUtil.hasAccessToConfidentialPhenotypeTrait(
@@ -688,7 +691,12 @@ class PhenotypeDataSet(DataSet):
description = this_trait.pre_publication_description
- this_trait.description_display = description.strip()
+ if len(description) > 0:
+ this_trait.description_display = description.strip()
+ else:
+ this_trait.description_display = ""
+
+ print("this_trait.description_display is:", this_trait.description_display)
if not this_trait.year.isdigit():
this_trait.pubmed_text = "N/A"
diff --git a/wqflask/base/species.py b/wqflask/base/species.py
index ebc2bfed..52bd8297 100755
--- a/wqflask/base/species.py
+++ b/wqflask/base/species.py
@@ -13,7 +13,7 @@ from pprint import pformat as pf
class TheSpecies(object):
def __init__(self, dataset):
self.dataset = dataset
- print("self.dataset is:", pf(self.dataset.__dict__))
+ #print("self.dataset is:", pf(self.dataset.__dict__))
self.chromosomes = Chromosomes(self.dataset)
self.genome_mb_length = self.chromosomes.get_genome_mb_length()
@@ -56,8 +56,8 @@ class Chromosomes(object):
InbredSet.Name = %s
Order by OrderId
""", self.dataset.group.name).fetchall()
- print("group: ", self.dataset.group.name)
- print("bike:", results)
+ #print("group: ", self.dataset.group.name)
+ #print("bike:", results)
for item in results:
self.chromosomes[item.OrderId] = IndChromosome(item.Name, item.Length)
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 3f80d4a4..2bbd1f2a 100755
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -645,7 +645,7 @@ def get_sample_data():
trait_ob = GeneralTrait(name=trait, dataset_name=dataset)
- return json.dumps({key: value.value for key, value in trait_ob.data.iteritems() })
+ return json.dumps([trait, {key: value.value for key, value in trait_ob.data.iteritems() }])
#jsonable_sample_data = {}
#for sample in trait_ob.data.iteritems():
diff --git a/wqflask/maintenance/gen_select_dataset.py b/wqflask/maintenance/gen_select_dataset.py
index ad560659..694efeca 100755
--- a/wqflask/maintenance/gen_select_dataset.py
+++ b/wqflask/maintenance/gen_select_dataset.py
@@ -99,7 +99,7 @@ def get_groups(species):
def get_types(groups):
"""Build types list"""
types = {}
- print("Groups: ", pf(groups))
+ #print("Groups: ", pf(groups))
for species, group_dict in groups.iteritems():
types[species] = {}
for group_name, _group_full_name in group_dict:
@@ -118,15 +118,15 @@ def build_types(species, group):
"""
- print("""select distinct Tissue.Name
- from ProbeFreeze, ProbeSetFreeze, InbredSet, Tissue, Species
- where Species.Name = '{}' and Species.Id = InbredSet.SpeciesId and
- InbredSet.Name = '{}' and
- ProbeFreeze.TissueId = Tissue.Id and
- ProbeFreeze.InbredSetId = InbredSet.Id and
- ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id and
- ProbeSetFreeze.public > 0
- order by Tissue.Name""".format(species, group))
+ #print("""select distinct Tissue.Name
+ # from ProbeFreeze, ProbeSetFreeze, InbredSet, Tissue, Species
+ # where Species.Name = '{}' and Species.Id = InbredSet.SpeciesId and
+ # InbredSet.Name = '{}' and
+ # ProbeFreeze.TissueId = Tissue.Id and
+ # ProbeFreeze.InbredSetId = InbredSet.Id and
+ # ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id and
+ # ProbeSetFreeze.public > 0
+ # order by Tissue.Name""".format(species, group))
Cursor.execute("""select distinct Tissue.Name
from ProbeFreeze, ProbeSetFreeze, InbredSet, Tissue, Species
where Species.Name = %s and Species.Id = InbredSet.SpeciesId and
@@ -150,7 +150,7 @@ def get_datasets(types):
for species, group_dict in types.iteritems():
datasets[species] = {}
for group, type_list in group_dict.iteritems():
- print("type_list: ", type_list)
+ #print("type_list: ", type_list)
datasets[species][group] = {}
for type_name in type_list:
datasets[species][group][type_name[0]] = build_datasets(species, group, type_name[0])
@@ -174,14 +174,14 @@ def build_datasets(species, group, type_name):
if dataset_value:
return [(dataset_value, dataset_text)]
else:
- print("""select ProbeSetFreeze.Name, ProbeSetFreeze.FullName from
- ProbeSetFreeze, ProbeFreeze, InbredSet, Tissue, Species where
- Species.Name = '{}' and Species.Id = InbredSet.SpeciesId and
- InbredSet.Name = '{}' and
- ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id and Tissue.Name = '{}'
- and ProbeFreeze.TissueId = Tissue.Id and ProbeFreeze.InbredSetId =
- InbredSet.Id and ProbeSetFreeze.public > 0 order by
- ProbeSetFreeze.CreateTime desc""".format(species, group, type_name))
+ #print("""select ProbeSetFreeze.Name, ProbeSetFreeze.FullName from
+ # ProbeSetFreeze, ProbeFreeze, InbredSet, Tissue, Species where
+ # Species.Name = '{}' and Species.Id = InbredSet.SpeciesId and
+ # InbredSet.Name = '{}' and
+ # ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id and Tissue.Name = '{}'
+ # and ProbeFreeze.TissueId = Tissue.Id and ProbeFreeze.InbredSetId =
+ # InbredSet.Id and ProbeSetFreeze.public > 0 order by
+ # ProbeSetFreeze.CreateTime desc""".format(species, group, type_name))
Cursor.execute("""select ProbeSetFreeze.Name, ProbeSetFreeze.FullName from
ProbeSetFreeze, ProbeFreeze, InbredSet, Tissue, Species where
Species.Name = %s and Species.Id = InbredSet.SpeciesId and
@@ -200,6 +200,7 @@ def main():
species = get_species()
groups = get_groups(species)
+ print("groups:", groups)
types = get_types(groups)
datasets = get_datasets(types)
@@ -217,22 +218,22 @@ def main():
datasets=datasets,
)
- print("data:", data)
+ #print("data:", data)
output_file = """../wqflask/static/new/javascript/dataset_menu_structure.json"""
with open(output_file, 'w') as fh:
json.dump(data, fh, indent=" ", sort_keys=True)
- print("\nWrote file to:", output_file)
+ #print("\nWrote file to:", output_file)
def _test_it():
"""Used for internal testing only"""
types = build_types("Mouse", "BXD")
- print("build_types:", pf(types))
+ #print("build_types:", pf(types))
datasets = build_datasets("Mouse", "BXD", "Hippocampus")
- print("build_datasets:", pf(datasets))
+ #print("build_datasets:", pf(datasets))
if __name__ == '__main__':
Conn = MySQLdb.Connect(**parse_db_uri(our_settings.DB_URI))
diff --git a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
index b556927c..4069b07f 100755
--- a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
+++ b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
@@ -66,30 +66,118 @@ class CorrelationMatrix(object):
self.get_trait_db_obs(trait_db_list)
- self.corr_results = {}
+ #self.corr_results = {}
+ #for trait_db in self.trait_list:
+ # this_trait = trait_db[0]
+ # this_db = trait_db[1]
+ #
+ # this_db_samples = this_db.group.samplelist
+ # this_sample_data = this_trait.data
+ # print("this_sample_data", len(this_sample_data))
+ #
+ # corr_result_row = {}
+ #
+ # for target in self.trait_list:
+ # target_trait = target[0]
+ # target_db = target[1]
+ # target_samples = target_db.group.samplelist
+ #
+ # if this_trait == target_trait and this_db == target_db:
+ # corr_result_row[this_trait.name] = {'sample_r': 1,
+ # 'sample_p': 0,
+ # 'num_overlap': len(target_samples),
+ # 'this_trait': this_trait.name,
+ # 'this_db': this_trait.dataset.name,
+ # 'target_trait': this_trait.name,
+ # 'target_db': this_trait.dataset.name}
+ # continue
+ #
+ # target_sample_data = target_trait.data
+ # print("target_samples", len(target_samples))
+ #
+ # this_trait_vals = []
+ # target_vals = []
+ # for index, sample in enumerate(target_samples):
+ #
+ # if (sample in this_sample_data) and (sample in target_sample_data):
+ # sample_value = this_sample_data[sample].value
+ # target_sample_value = target_sample_data[sample].value
+ # this_trait_vals.append(sample_value)
+ # target_vals.append(target_sample_value)
+ #
+ # #print("this_trait_vals:", this_trait_vals)
+ # #print("target_vals:", target_vals)
+ #
+ # this_trait_vals, target_vals, num_overlap = corr_result_helpers.normalize_values(
+ # this_trait_vals, target_vals)
+ #
+ # sample_r, sample_p = scipy.stats.pearsonr(this_trait_vals, target_vals)
+ #
+ # corr_matrix_cell = {"sample_r": sample_r,
+ # "sample_p": sample_p,
+ # "num_overlap": num_overlap,
+ # "this_trait": this_trait.name,
+ # "this_db": this_trait.dataset.name,
+ # "target_trait": target_trait.name,
+ # "target_db": target_trait.dataset.name}
+ #
+ # corr_result_row[target_trait.name] = corr_matrix_cell
+ #
+ # self.corr_results[this_trait.name] = corr_result_row
+
+ self.all_sample_list = []
+ self.traits = []
+ for trait_db in self.trait_list:
+ this_trait = trait_db[0]
+ self.traits.append(this_trait.name)
+ this_sample_data = this_trait.data
+
+ for sample in this_sample_data:
+ if sample not in self.all_sample_list:
+ self.all_sample_list.append(sample)
+
+ self.sample_data = []
+ for trait_db in self.trait_list:
+ this_trait = trait_db[0]
+ this_sample_data = this_trait.data
+
+ #self.sample_data[this_trait.name] = []
+ this_trait_vals = []
+ for sample in self.all_sample_list:
+ if sample in this_sample_data:
+ this_trait_vals.append(this_sample_data[sample].value)
+ #self.sample_data[this_trait.name].append(this_sample_data[sample].value)
+ else:
+ this_trait_vals.append('')
+ #self.sample_data[this_trait.name].append('')
+ self.sample_data.append(this_trait_vals)
+
+ self.corr_results = []
for trait_db in self.trait_list:
this_trait = trait_db[0]
this_db = trait_db[1]
this_db_samples = this_db.group.samplelist
+
+ #for sample in this_db_samples:
+ # if sample not in self.samples:
+ # self.samples.append(sample)
+
this_sample_data = this_trait.data
print("this_sample_data", len(this_sample_data))
- corr_result_row = {}
-
+ #for sample in this_sample_data:
+ # if sample not in self.all_sample_list:
+ # self.all_sample_list.append(sample)
+
+ corr_result_row = []
for target in self.trait_list:
target_trait = target[0]
target_db = target[1]
- target_samples = target_db.group.samplelist
+ target_samples = target_db.group.samplelist
if this_trait == target_trait and this_db == target_db:
- corr_result_row[this_trait.name] = {'sample_r': 1,
- 'sample_p': 0,
- 'num_overlap': len(target_samples),
- 'this_trait': this_trait.name,
- 'this_db': this_trait.dataset.name,
- 'target_trait': this_trait.name,
- 'target_db': this_trait.dataset.name}
+ corr_result_row.append(1)
continue
target_sample_data = target_trait.data
@@ -113,19 +201,38 @@ class CorrelationMatrix(object):
sample_r, sample_p = scipy.stats.pearsonr(this_trait_vals, target_vals)
- corr_matrix_cell = {'sample_r': sample_r,
- 'sample_p': sample_p,
- 'num_overlap': num_overlap,
- 'this_trait': this_trait.name,
- 'this_db': this_trait.dataset.name,
- 'target_trait': target_trait.name,
- 'target_db': target_trait.dataset.name}
+ corr_result_row.append(sample_r)
- corr_result_row[target_trait.name] = corr_matrix_cell
-
- self.corr_results[this_trait.name] = corr_result_row
-
- print("corr_results:", pf(self.corr_results))
+ self.corr_results.append(corr_result_row)
+
+ #self.sample_data = {}
+ #for trait_db in self.trait_list:
+ # this_trait = trait_db[0]
+ #
+ # this_sample_data = this_trait.data
+ #
+ # self.sample_data[this_trait.name] = []
+ # for sample in self.all_sample_list:
+ # if sample in this_sample_data:
+ # self.sample_data[this_trait.name].append(this_sample_data[sample].value)
+ # else:
+ # self.sample_data[this_trait.name].append('')
+
+ print("corr_results:", pf(self.traits))
+
+ groups = []
+ for sample in self.all_sample_list:
+ groups.append(1)
+
+ self.js_data = dict(traits = self.traits,
+ groups = groups,
+ cols = range(len(self.traits)),
+ rows = range(len(self.traits)),
+ samples = self.all_sample_list,
+ sample_data = self.sample_data,
+ corr_results = self.corr_results,)
+
+
def get_trait_db_obs(self, trait_db_list):
diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py
index 525a2253..d43fe37c 100755
--- a/wqflask/wqflask/marker_regression/marker_regression.py
+++ b/wqflask/wqflask/marker_regression/marker_regression.py
@@ -56,7 +56,8 @@ class MarkerRegression(object):
self.vals.append(value)
self.mapping_method = start_vars['method']
- print("self.mapping_method:", self.mapping_method)
+ self.maf = start_vars['maf'] # Minor allele frequency
+ print("self.maf:", self.maf)
if self.mapping_method == "gemma":
qtl_results = self.run_gemma()
@@ -64,9 +65,12 @@ class MarkerRegression(object):
qtl_results = self.run_plink()
#print("qtl_results:", pf(qtl_results))
elif self.mapping_method == "pylmm":
+ print("RUNNING PYLMM")
#self.qtl_results = self.gen_data(tempdata)
qtl_results = self.gen_data(str(temp_uuid))
-
+ else:
+ print("RUNNING NOTHING")
+
self.lod_cutoff = 2
self.filtered_markers = []
for marker in qtl_results:
@@ -83,6 +87,9 @@ class MarkerRegression(object):
chromosome_mb_lengths[key] = self.species.chromosomes.chromosomes[key].mb_length
self.js_data = dict(
+ this_trait = self.this_trait.name,
+ data_set = self.dataset.name,
+ maf = self.maf,
chromosomes = chromosome_mb_lengths,
qtl_results = self.filtered_markers,
)
@@ -169,7 +176,7 @@ class MarkerRegression(object):
self.gen_pheno_txt_file_plink(pheno_filename = plink_output_filename)
- plink_command = './plink --noweb --ped %s.ped --no-fid --no-parents --no-sex --no-pheno --map %s.map --pheno %s/%s.txt --pheno-name %s --missing-phenotype -9999 --out %s%s --assoc ' % (self.dataset.group.name, self.dataset.group.name, webqtlConfig.TMPDIR, plink_output_filename, self.this_trait.name, webqtlConfig.TMPDIR, plink_output_filename)
+ plink_command = './plink --noweb --ped %s.ped --no-fid --no-parents --no-sex --no-pheno --map %s.map --pheno %s/%s.txt --pheno-name %s --maf %s --missing-phenotype -9999 --out %s%s --assoc ' % (self.dataset.group.name, self.dataset.group.name, webqtlConfig.TMPDIR, plink_output_filename, self.this_trait.name, self.maf, webqtlConfig.TMPDIR, plink_output_filename)
os.system(plink_command)
@@ -382,6 +389,7 @@ class MarkerRegression(object):
#p_values = self.trim_results(p_values)
else:
+ print("NOW CWD IS:", os.getcwd())
genotype_data = [marker['genotypes'] for marker in self.dataset.group.markers.markers]
no_val_samples = self.identify_empty_samples()
@@ -410,7 +418,7 @@ class MarkerRegression(object):
)
json_params = json.dumps(params)
- print("json_params:", json_params)
+ #print("json_params:", json_params)
Redis.set(key, json_params)
Redis.expire(key, 60*60)
print("before printing command")
diff --git a/wqflask/wqflask/my_pylmm/data/genofile_parser.py b/wqflask/wqflask/my_pylmm/data/genofile_parser.py
index 4ebadb6e..baf6aee4 100755
--- a/wqflask/wqflask/my_pylmm/data/genofile_parser.py
+++ b/wqflask/wqflask/my_pylmm/data/genofile_parser.py
@@ -44,6 +44,7 @@ class ConvertGenoFile(object):
self.output_file = output_file
self.mb_exists = False
+ self.cm_exists = False
self.markers = []
self.latest_row_pos = None
@@ -94,7 +95,10 @@ class ConvertGenoFile(object):
this_marker.name = row_items[1]
this_marker.chr = row_items[0]
#this_marker.cM = row_items[2]
- if self.mb_exists:
+ if self.cm_exists and self.mb_exists:
+ this_marker.Mb = row_items[3]
+ genotypes = row_items[4:]
+ elif self.mb_exists:
this_marker.Mb = row_items[2]
genotypes = row_items[3:]
else:
@@ -106,8 +110,8 @@ class ConvertGenoFile(object):
this_marker.genotypes.append("NA")
#print("this_marker is:", pf(this_marker.__dict__))
- if this_marker.chr == "14":
- self.markers.append(this_marker.__dict__)
+ #if this_marker.chr == "14":
+ self.markers.append(this_marker.__dict__)
with open(self.output_file, 'w') as fh:
json.dump(self.markers, fh, indent=" ", sort_keys=True)
@@ -136,6 +140,8 @@ class ConvertGenoFile(object):
if row.startswith('Chr'):
if 'Mb' in row.split():
self.mb_exists = True
+ if 'cM' in row.split():
+ self.cm_exists = True
continue
if row.startswith('@'):
key, _separater, value = row.partition(':')
@@ -187,7 +193,7 @@ if __name__=="__main__":
New_Geno_Directory = """/home/zas1024/gene/web/new_genotypes/"""
#Input_File = """/home/zas1024/gene/web/genotypes/BXD.geno"""
#Output_File = """/home/zas1024/gene/wqflask/wqflask/pylmm/data/bxd.snps"""
- convertob = ConvertGenoFile("/home/zas1024/gene/web/genotypes/HSNIH.geno.gz", "/home/zas1024/gene/web/new_genotypes/HSNIH.json")
+ convertob = ConvertGenoFile("/home/zas1024/gene/web/genotypes/Linsenbardt-Boehm.geno", "/home/zas1024/gene/web/new_genotypes/Linsenbardt-Boehm.json")
convertob.convert()
#ConvertGenoFile.process_all(Old_Geno_Directory, New_Geno_Directory)
#ConvertGenoFiles(Geno_Directory)
diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py
index c0403bbd..670a1188 100755
--- a/wqflask/wqflask/show_trait/show_trait.py
+++ b/wqflask/wqflask/show_trait/show_trait.py
@@ -1193,6 +1193,7 @@ class ShowTrait(object):
primary_sample_names = all_samples_ordered
+ print("self.dataset.group", pf(self.dataset.group.__dict__))
print("-*- primary_samplelist is:", pf(primary_sample_names))
other_sample_names = []
diff --git a/wqflask/wqflask/static/new/css/charts.css b/wqflask/wqflask/static/new/css/charts.css
new file mode 100644
index 00000000..5f2d4d23
--- /dev/null
+++ b/wqflask/wqflask/static/new/css/charts.css
@@ -0,0 +1,28 @@
+body {
+ font-family: sans-serif;
+}
+
+svg {
+ margin-top: 10px;
+ margin-left: 50px;
+}
+
+.line {
+ stroke-width: 1;
+ fill: none;
+}
+
+text {
+ font-family: sans-serif;
+ font-size: 11pt;
+}
+
+p {
+ font-family: sans-serif;
+ font-size: 12pt;
+}
+
+p#caption {
+ margin-left: 100px;
+ width: 500px;
+}
diff --git a/wqflask/wqflask/static/new/javascript/compare_traits_scatterplot.coffee b/wqflask/wqflask/static/new/javascript/compare_traits_scatterplot.coffee
index 73eb1466..64400c7d 100644
--- a/wqflask/wqflask/static/new/javascript/compare_traits_scatterplot.coffee
+++ b/wqflask/wqflask/static/new/javascript/compare_traits_scatterplot.coffee
@@ -2,7 +2,7 @@ root = exports ? this
root.create_scatterplot = (json_ids, json_data) ->
- console.log("TESTING TESTING2")
+ console.log("TESTING2")
h = 400
w = 500
@@ -38,49 +38,81 @@ root.create_scatterplot = (json_ids, json_data) ->
.on "mouseout", (d) ->
d3.select(this).attr("r", mychart.pointsize())
-root.create_scatterplots = (json_ids, json_data) ->
- h = 400
- w = 500
+root.create_scatterplots = (trait_names, json_ids, json_data) ->
+
+ #There are various places where 1 is subtracted from the number of traits; this is because
+ #we don't want to show a first graph consisting of the trait vs itself. There might be a better
+ #way to deal with this.
+
+ console.log("json_data:", json_data)
+ console.log("trait_names:", trait_names)
+
+ num_traits = json_data.length
+ console.log("num_traits:", num_traits)
+
+ h = 300
+ w = 400
margin = {left:60, top:40, right:40, bottom: 40, inner:5}
halfh = (h+margin.top+margin.bottom)
- totalh = halfh*2
+ totalh = halfh*(num_traits-1)
+ #totalh = halfh*2
halfw = (w+margin.left+margin.right)
- totalw = halfw*2
+ #totalw = halfw*2
+ totalw = halfw
+
+ xvar = []
+ yvar = []
+ xshift = []
+ yshift = []
+ for i in [0..num_traits-1]
+ xvar.push(i)
+ yvar.push(0)
+ xshift.push(0)
+ yshift.push(halfh*i)
+
+ console.log("xvar:", xvar)
+ console.log("yvar:", yvar)
# Example 2: three scatterplots within one SVG, with brushing
#d3.json "data.json", (data) ->
- xvar = [1, 2, 2]
- yvar = [0, 0, 1]
- xshift = [0, halfw, halfw]
- yshift = [0, 0, halfh]
-
- svg = d3.select("div#chart2")
+ #xvar = [1, 2, 2]
+ #yvar = [0, 0, 1]
+ #console.log("num_traits_array:", xvar)
+ #xshift = [0, halfw, halfw]
+ #yshift = [0, 0, halfh]
+ #xshift = [0, 0]
+ #yshift = [0, halfh]
+
+ svg = d3.select("div#comparison_scatterplot")
.append("svg")
.attr("height", totalh)
.attr("width", totalw)
mychart = []
chart = []
- for i in [0..2]
- mychart[i] = scatterplot().xvar(xvar[i])
+ for i in [1..num_traits-1]
+ mychart[i-1] = scatterplot().xvar(xvar[i])
.yvar(yvar[i])
.nxticks(6)
.height(h)
.width(w)
.margin(margin)
.pointsize(4)
- .xlab("X#{xvar[i]+1}")
- .ylab("X#{yvar[i]+1}")
- .title("X#{yvar[i]+1} vs. X#{xvar[i]+1}")
+ .xlab("#{trait_names[i-1]}")
+ .ylab("#{trait_names[0]}")
+ .title("#{trait_names[0]} vs. #{trait_names[i-1]}")
+
+ data = json_data
+ indID = json_ids
- chart[i] = svg.append("g").attr("id", "chart#{i}")
- .attr("transform", "translate(#{xshift[i]},#{yshift[i]})")
- chart[i].datum({data:data}).call(mychart[i])
+ chart[i-1] = svg.append("g").attr("id", "chart#{i-1}")
+ .attr("transform", "translate(#{xshift[i]},#{yshift[i-1]})")
+ chart[i-1].datum({data:data, indID:indID}).call(mychart[i-1])
brush = []
brushstart = (i) ->
() ->
- for j in [0..2]
+ for j in [0..num_traits-2]
chart[j].call(brush[j].clear()) if j != i
svg.selectAll("circle").attr("opacity", 0.6).classed("selected", false)
@@ -104,7 +136,7 @@ root.create_scatterplots = (json_ids, json_data) ->
xscale = d3.scale.linear().domain([margin.left,margin.left+w]).range([margin.left,margin.left+w])
yscale = d3.scale.linear().domain([margin.top,margin.top+h]).range([margin.top,margin.top+h])
- for i in [0..2]
+ for i in [0..num_traits-2]
brush[i] = d3.svg.brush().x(xscale).y(yscale)
.on("brushstart", brushstart(i))
.on("brush", brushmove(i))
diff --git a/wqflask/wqflask/static/new/javascript/compare_traits_scatterplot.js b/wqflask/wqflask/static/new/javascript/compare_traits_scatterplot.js
index c1596a14..a45eb3c0 100644
--- a/wqflask/wqflask/static/new/javascript/compare_traits_scatterplot.js
+++ b/wqflask/wqflask/static/new/javascript/compare_traits_scatterplot.js
@@ -6,7 +6,7 @@
root.create_scatterplot = function(json_ids, json_data) {
var data, h, halfh, halfw, indID, margin, mychart, totalh, totalw, w;
- console.log("TESTING TESTING2");
+ console.log("TESTING2");
h = 400;
w = 500;
margin = {
@@ -34,10 +34,14 @@
});
};
- root.create_scatterplots = function(json_ids, json_data) {
- var brush, brushend, brushmove, brushstart, chart, h, halfh, halfw, i, margin, mychart, svg, totalh, totalw, w, xscale, xshift, xvar, yscale, yshift, yvar, _i, _j, _results;
- h = 400;
- w = 500;
+ root.create_scatterplots = function(trait_names, json_ids, json_data) {
+ var brush, brushend, brushmove, brushstart, chart, data, h, halfh, halfw, i, indID, margin, mychart, num_traits, svg, totalh, totalw, w, xscale, xshift, xvar, yscale, yshift, yvar, _i, _j, _k, _ref, _ref1, _ref2, _results;
+ console.log("json_data:", json_data);
+ console.log("trait_names:", trait_names);
+ num_traits = json_data.length;
+ console.log("num_traits:", num_traits);
+ h = 300;
+ w = 400;
margin = {
left: 60,
top: 40,
@@ -46,28 +50,39 @@
inner: 5
};
halfh = h + margin.top + margin.bottom;
- totalh = halfh * 2;
+ totalh = halfh * (num_traits - 1);
halfw = w + margin.left + margin.right;
- totalw = halfw * 2;
- xvar = [1, 2, 2];
- yvar = [0, 0, 1];
- xshift = [0, halfw, halfw];
- yshift = [0, 0, halfh];
- svg = d3.select("div#chart2").append("svg").attr("height", totalh).attr("width", totalw);
+ totalw = halfw;
+ xvar = [];
+ yvar = [];
+ xshift = [];
+ yshift = [];
+ for (i = _i = 0, _ref = num_traits - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
+ xvar.push(i);
+ yvar.push(0);
+ xshift.push(0);
+ yshift.push(halfh * i);
+ }
+ console.log("xvar:", xvar);
+ console.log("yvar:", yvar);
+ svg = d3.select("div#comparison_scatterplot").append("svg").attr("height", totalh).attr("width", totalw);
mychart = [];
chart = [];
- for (i = _i = 0; _i <= 2; i = ++_i) {
- mychart[i] = scatterplot().xvar(xvar[i]).yvar(yvar[i]).nxticks(6).height(h).width(w).margin(margin).pointsize(4).xlab("X" + (xvar[i] + 1)).ylab("X" + (yvar[i] + 1)).title("X" + (yvar[i] + 1) + " vs. X" + (xvar[i] + 1));
- chart[i] = svg.append("g").attr("id", "chart" + i).attr("transform", "translate(" + xshift[i] + "," + yshift[i] + ")");
- chart[i].datum({
- data: data
- }).call(mychart[i]);
+ for (i = _j = 1, _ref1 = num_traits - 1; 1 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 1 <= _ref1 ? ++_j : --_j) {
+ mychart[i - 1] = scatterplot().xvar(xvar[i]).yvar(yvar[i]).nxticks(6).height(h).width(w).margin(margin).pointsize(4).xlab("" + trait_names[i - 1]).ylab("" + trait_names[0]).title("" + trait_names[0] + " vs. " + trait_names[i - 1]);
+ data = json_data;
+ indID = json_ids;
+ chart[i - 1] = svg.append("g").attr("id", "chart" + (i - 1)).attr("transform", "translate(" + xshift[i] + "," + yshift[i - 1] + ")");
+ chart[i - 1].datum({
+ data: data,
+ indID: indID
+ }).call(mychart[i - 1]);
}
brush = [];
brushstart = function(i) {
return function() {
- var j, _j;
- for (j = _j = 0; _j <= 2; j = ++_j) {
+ var j, _k, _ref2;
+ for (j = _k = 0, _ref2 = num_traits - 2; 0 <= _ref2 ? _k <= _ref2 : _k >= _ref2; j = 0 <= _ref2 ? ++_k : --_k) {
if (j !== i) {
chart[j].call(brush[j].clear());
}
@@ -99,7 +114,7 @@
xscale = d3.scale.linear().domain([margin.left, margin.left + w]).range([margin.left, margin.left + w]);
yscale = d3.scale.linear().domain([margin.top, margin.top + h]).range([margin.top, margin.top + h]);
_results = [];
- for (i = _j = 0; _j <= 2; i = ++_j) {
+ for (i = _k = 0, _ref2 = num_traits - 2; 0 <= _ref2 ? _k <= _ref2 : _k >= _ref2; i = 0 <= _ref2 ? ++_k : --_k) {
brush[i] = d3.svg.brush().x(xscale).y(yscale).on("brushstart", brushstart(i)).on("brush", brushmove(i)).on("brushend", brushend);
_results.push(chart[i].call(brush[i]));
}
diff --git a/wqflask/wqflask/static/new/javascript/corr_matrix.coffee b/wqflask/wqflask/static/new/javascript/corr_matrix.coffee
new file mode 100644
index 00000000..4ecee1d4
--- /dev/null
+++ b/wqflask/wqflask/static/new/javascript/corr_matrix.coffee
@@ -0,0 +1,275 @@
+# iplotCorr.coffee
+#
+# Left panel is a heat map of a correlation matrix; hover over pixels
+# to see the values; click to see the corresponding scatterplot on the right
+
+root = exports ? this
+
+iplotCorr = (data, chartOpts) ->
+
+ # data is an object with 7 components
+ # data.indID vector of character strings, of length n, with IDs for individuals
+ # data.var vector of character strings, of length p, with variable names
+ # data.corr matrix of correlation values, of dim q x r, with q and r each <= p
+ # data.rows vector of indicators, of length q, with values in {0, 1, ..., p-1},
+ # for each row in data.corr, it says which is the corresponding column in data.dat
+ # data.cols vector of indicators, of length r, with values in {0, 1, ..., p-1}
+ # for each column in data.corr, it says which is the corresponding column in data.dat
+ # data.dat numeric matrix, of dim n x p, with data to be plotted in scatterplots
+ # rows correspond to data.indID and columns to data.var
+ # data.group numeric vector, of length n, with values in {1, ..., k},
+ # used as categories for coloring points in the scatterplot
+
+ # chartOpts start
+ height = chartOpts?.height ? 450 # height of each panel in pixels
+ width = chartOpts?.width ? height # width of each panel in pixels
+ margin = chartOpts?.margin ? {left:70, top:40, right:5, bottom: 70, inner:5} # margins in pixels (left, top, right, bottom, inner)
+ corcolors = chartOpts?.corcolors ? ["darkslateblue", "white", "crimson"] # heat map colors (same length as `zlim`)
+ zlim = chartOpts?.zlim ? [-1, 0, 1] # z-axis limits
+ rectcolor = chartOpts?.rectcolor ? d3.rgb(230, 230, 230) # color of background rectangle
+ cortitle = chartOpts?.cortitle ? "" # title for heatmap panel
+ scattitle = chartOpts?.scattitle ? "" # title for scatterplot panel
+ scatcolors = chartOpts?.scatcolors ? null # vector of point colors for scatterplot
+ # chartOpts end
+ chartdivid = chartOpts?.chartdivid ? 'chart'
+
+ totalh = height + margin.top + margin.bottom
+ totalw = (width + margin.left + margin.right)*2
+
+ svg = d3.select("div##{chartdivid}")
+ .append("svg")
+ .attr("height", totalh)
+ .attr("width", totalw)
+
+ # panel for correlation image
+ corrplot = svg.append("g")
+ .attr("id", "corplot")
+ .attr("transform", "translate(#{margin.left},#{margin.top})")
+
+ # panel for scatterplot
+ scatterplot = svg.append("g")
+ .attr("id", "scatterplot")
+ .attr("transform", "translate(#{margin.left*2+margin.right+width},#{margin.top})")
+
+ # no. data points
+ nind = data.indID.length
+ nvar = data.var.length
+ ncorrX = data.cols.length
+ ncorrY = data.rows.length
+
+ corXscale = d3.scale.ordinal().domain(d3.range(ncorrX)).rangeBands([0, width])
+ corYscale = d3.scale.ordinal().domain(d3.range(ncorrY)).rangeBands([height, 0])
+ corZscale = d3.scale.linear().domain(zlim).range(corcolors)
+ pixel_width = corXscale(1)-corXscale(0)
+ pixel_height = corYscale(0)-corYscale(1)
+
+ # create list with correlations
+ corr = []
+ for i of data.corr
+ for j of data.corr[i]
+ corr.push({row:i, col:j, value:data.corr[i][j]})
+
+
+ # gray background on scatterplot
+ scatterplot.append("rect")
+ .attr("height", height)
+ .attr("width", width)
+ .attr("fill", rectcolor)
+ .attr("stroke", "black")
+ .attr("stroke-width", 1)
+ .attr("pointer-events", "none")
+
+ corr_tip = d3.tip()
+ .attr('class', 'd3-tip')
+ .html((d) -> d3.format(".2f")(d.value))
+ .direction('e')
+ .offset([0,10])
+ corrplot.call(corr_tip)
+
+
+ cells = corrplot.selectAll("empty")
+ .data(corr)
+ .enter().append("rect")
+ .attr("class", "cell")
+ .attr("x", (d) -> corXscale(d.col))
+ .attr("y", (d) -> corYscale(d.row))
+ .attr("width", corXscale.rangeBand())
+ .attr("height", corYscale.rangeBand())
+ .attr("fill", (d) -> corZscale(d.value))
+ .attr("stroke", "none")
+ .attr("stroke-width", 2)
+ .on("mouseover", (d) ->
+ d3.select(this).attr("stroke", "black")
+ corr_tip.show(d)
+ corrplot.append("text").attr("class","corrlabel")
+ .attr("x", corXscale(d.col)+pixel_width/2)
+ .attr("y", height+margin.bottom*0.2)
+ .text(data.var[data.cols[d.col]])
+ .attr("dominant-baseline", "middle")
+ .attr("text-anchor", "middle")
+ corrplot.append("text").attr("class","corrlabel")
+ .attr("y", corYscale(d.row)+pixel_height/2)
+ .attr("x", -margin.left*0.1)
+ .text(data.var[data.rows[d.row]])
+ .attr("dominant-baseline", "middle")
+ .attr("text-anchor", "end"))
+ .on("mouseout", (d) ->
+ corr_tip.hide(d)
+ d3.selectAll("text.corrlabel").remove()
+ d3.select(this).attr("stroke","none"))
+ .on("click",(d) -> drawScatter(d.col, d.row))
+
+ # colors for scatterplot
+ nGroup = d3.max(data.group)
+ if !(scatcolors?) or scatcolors.length < nGroup
+ if nGroup == 1
+ scatcolors = [ d3.rgb(150, 150, 150) ]
+ else if nGroup <= 3
+ scatcolors = ["crimson", "green", "darkslateblue"]
+ else
+ if nGroup <= 10
+ colorScale = d3.scale.category10()
+ else
+ colorScale = d3.scale.category20()
+ scatcolors = (colorScale(i) for i of d3.range(nGroup))
+
+ scat_tip = d3.tip()
+ .attr('class', 'd3-tip')
+ .html((d,i) -> data.indID[i])
+ .direction('e')
+ .offset([0,10])
+ scatterplot.call(scat_tip)
+
+ drawScatter = (i,j) ->
+ d3.selectAll("circle.points").remove()
+ d3.selectAll("text.axes").remove()
+ d3.selectAll("line.axes").remove()
+ console.log("data.dat:", data.dat)
+ console.log("data.cols:", data.cols)
+ xScale = d3.scale.linear()
+ .domain(d3.extent(data.dat[data.cols[i]]))
+ .range([margin.inner, width-margin.inner])
+ yScale = d3.scale.linear()
+ .domain(d3.extent(data.dat[data.rows[j]]))
+ .range([height-margin.inner, margin.inner])
+ # axis labels
+ scatterplot.append("text")
+ .attr("id", "xaxis")
+ .attr("class", "axes")
+ .attr("x", width/2)
+ .attr("y", height+margin.bottom*0.7)
+ .text(data.var[data.cols[i]])
+ .attr("dominant-baseline", "middle")
+ .attr("text-anchor", "middle")
+ .attr("fill", "slateblue")
+ scatterplot.append("text")
+ .attr("id", "yaxis")
+ .attr("class", "axes")
+ .attr("x", -margin.left*0.8)
+ .attr("y", height/2)
+ .text(data.var[data.rows[j]])
+ .attr("dominant-baseline", "middle")
+ .attr("text-anchor", "middle")
+ .attr("transform", "rotate(270,#{-margin.left*0.8},#{height/2})")
+ .attr("fill", "slateblue")
+ # axis scales
+ xticks = xScale.ticks(5)
+ yticks = yScale.ticks(5)
+ scatterplot.selectAll("empty")
+ .data(xticks)
+ .enter()
+ .append("text")
+ .attr("class", "axes")
+ .text((d) -> formatAxis(xticks)(d))
+ .attr("x", (d) -> xScale(d))
+ .attr("y", height+margin.bottom*0.3)
+ .attr("dominant-baseline", "middle")
+ .attr("text-anchor", "middle")
+ scatterplot.selectAll("empty")
+ .data(yticks)
+ .enter()
+ .append("text")
+ .attr("class", "axes")
+ .text((d) -> formatAxis(yticks)(d))
+ .attr("x", -margin.left*0.1)
+ .attr("y", (d) -> yScale(d))
+ .attr("dominant-baseline", "middle")
+ .attr("text-anchor", "end")
+ scatterplot.selectAll("empty")
+ .data(xticks)
+ .enter()
+ .append("line")
+ .attr("class", "axes")
+ .attr("x1", (d) -> xScale(d))
+ .attr("x2", (d) -> xScale(d))
+ .attr("y1", 0)
+ .attr("y2", height)
+ .attr("stroke", "white")
+ .attr("stroke-width", 1)
+ scatterplot.selectAll("empty")
+ .data(yticks)
+ .enter()
+ .append("line")
+ .attr("class", "axes")
+ .attr("y1", (d) -> yScale(d))
+ .attr("y2", (d) -> yScale(d))
+ .attr("x1", 0)
+ .attr("x2", width)
+ .attr("stroke", "white")
+ .attr("stroke-width", 1)
+ # the points
+ scatterplot.selectAll("empty")
+ .data(d3.range(nind))
+ .enter()
+ .append("circle")
+ .attr("class", "points")
+ .attr("cx", (d) -> xScale(data.dat[data.cols[i]][d]))
+ .attr("cy", (d) -> yScale(data.dat[data.rows[j]][d]))
+ .attr("r", (d) ->
+ x = data.dat[data.cols[i]][d]
+ y = data.dat[data.rows[j]][d]
+ if x? and y? then 3 else null)
+ .attr("stroke", "black")
+ .attr("stroke-width", 1)
+ .attr("fill", (d) -> scatcolors[data.group[d]-1])
+ .on("mouseover", scat_tip.show)
+ .on("mouseout", scat_tip.hide)
+
+ # boxes around panels
+ corrplot.append("rect")
+ .attr("height", height)
+ .attr("width", width)
+ .attr("fill", "none")
+ .attr("stroke", "black")
+ .attr("stroke-width", 1)
+ .attr("pointer-events", "none")
+
+ scatterplot.append("rect")
+ .attr("height", height)
+ .attr("width", width)
+ .attr("fill", "none")
+ .attr("stroke", "black")
+ .attr("stroke-width", 1)
+ .attr("pointer-events", "none")
+
+ # text above
+ corrplot.append("text")
+ .text(cortitle)
+ .attr("id", "corrtitle")
+ .attr("x", width/2)
+ .attr("y", -margin.top/2)
+ .attr("dominant-baseline", "middle")
+ .attr("text-anchor", "middle")
+
+ scatterplot.append("text")
+ .text(scattitle)
+ .attr("id", "scattitle")
+ .attr("x", width/2)
+ .attr("y", -margin.top/2)
+ .attr("dominant-baseline", "middle")
+ .attr("text-anchor", "middle")
+
+ d3.select("div#caption")
+ .style("opacity", 1)
+
+root.corr_matrix = iplotCorr \ No newline at end of file
diff --git a/wqflask/wqflask/static/new/javascript/corr_matrix.js b/wqflask/wqflask/static/new/javascript/corr_matrix.js
new file mode 100644
index 00000000..17625f99
--- /dev/null
+++ b/wqflask/wqflask/static/new/javascript/corr_matrix.js
@@ -0,0 +1,157 @@
+// Generated by CoffeeScript 1.6.1
+(function() {
+ var iplotCorr, root;
+
+ root = typeof exports !== "undefined" && exports !== null ? exports : this;
+
+ iplotCorr = function(data, chartOpts) {
+ var cells, chartdivid, colorScale, corXscale, corYscale, corZscale, corcolors, corr, corr_tip, corrplot, cortitle, drawScatter, height, i, j, margin, nGroup, ncorrX, ncorrY, nind, nvar, pixel_height, pixel_width, rectcolor, scat_tip, scatcolors, scatterplot, scattitle, svg, totalh, totalw, width, zlim, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
+ height = (_ref = chartOpts != null ? chartOpts.height : void 0) != null ? _ref : 450;
+ width = (_ref1 = chartOpts != null ? chartOpts.width : void 0) != null ? _ref1 : height;
+ margin = (_ref2 = chartOpts != null ? chartOpts.margin : void 0) != null ? _ref2 : {
+ left: 70,
+ top: 40,
+ right: 5,
+ bottom: 70,
+ inner: 5
+ };
+ corcolors = (_ref3 = chartOpts != null ? chartOpts.corcolors : void 0) != null ? _ref3 : ["darkslateblue", "white", "crimson"];
+ zlim = (_ref4 = chartOpts != null ? chartOpts.zlim : void 0) != null ? _ref4 : [-1, 0, 1];
+ rectcolor = (_ref5 = chartOpts != null ? chartOpts.rectcolor : void 0) != null ? _ref5 : d3.rgb(230, 230, 230);
+ cortitle = (_ref6 = chartOpts != null ? chartOpts.cortitle : void 0) != null ? _ref6 : "";
+ scattitle = (_ref7 = chartOpts != null ? chartOpts.scattitle : void 0) != null ? _ref7 : "";
+ scatcolors = (_ref8 = chartOpts != null ? chartOpts.scatcolors : void 0) != null ? _ref8 : null;
+ chartdivid = (_ref9 = chartOpts != null ? chartOpts.chartdivid : void 0) != null ? _ref9 : 'chart';
+ totalh = height + margin.top + margin.bottom;
+ totalw = (width + margin.left + margin.right) * 2;
+ svg = d3.select("div#" + chartdivid).append("svg").attr("height", totalh).attr("width", totalw);
+ corrplot = svg.append("g").attr("id", "corplot").attr("transform", "translate(" + margin.left + "," + margin.top + ")");
+ scatterplot = svg.append("g").attr("id", "scatterplot").attr("transform", "translate(" + (margin.left * 2 + margin.right + width) + "," + margin.top + ")");
+ nind = data.indID.length;
+ nvar = data["var"].length;
+ ncorrX = data.cols.length;
+ ncorrY = data.rows.length;
+ corXscale = d3.scale.ordinal().domain(d3.range(ncorrX)).rangeBands([0, width]);
+ corYscale = d3.scale.ordinal().domain(d3.range(ncorrY)).rangeBands([height, 0]);
+ corZscale = d3.scale.linear().domain(zlim).range(corcolors);
+ pixel_width = corXscale(1) - corXscale(0);
+ pixel_height = corYscale(0) - corYscale(1);
+ corr = [];
+ for (i in data.corr) {
+ for (j in data.corr[i]) {
+ corr.push({
+ row: i,
+ col: j,
+ value: data.corr[i][j]
+ });
+ }
+ }
+ scatterplot.append("rect").attr("height", height).attr("width", width).attr("fill", rectcolor).attr("stroke", "black").attr("stroke-width", 1).attr("pointer-events", "none");
+ corr_tip = d3.tip().attr('class', 'd3-tip').html(function(d) {
+ return d3.format(".2f")(d.value);
+ }).direction('e').offset([0, 10]);
+ corrplot.call(corr_tip);
+ cells = corrplot.selectAll("empty").data(corr).enter().append("rect").attr("class", "cell").attr("x", function(d) {
+ return corXscale(d.col);
+ }).attr("y", function(d) {
+ return corYscale(d.row);
+ }).attr("width", corXscale.rangeBand()).attr("height", corYscale.rangeBand()).attr("fill", function(d) {
+ return corZscale(d.value);
+ }).attr("stroke", "none").attr("stroke-width", 2).on("mouseover", function(d) {
+ d3.select(this).attr("stroke", "black");
+ corr_tip.show(d);
+ corrplot.append("text").attr("class", "corrlabel").attr("x", corXscale(d.col) + pixel_width / 2).attr("y", height + margin.bottom * 0.2).text(data["var"][data.cols[d.col]]).attr("dominant-baseline", "middle").attr("text-anchor", "middle");
+ return corrplot.append("text").attr("class", "corrlabel").attr("y", corYscale(d.row) + pixel_height / 2).attr("x", -margin.left * 0.1).text(data["var"][data.rows[d.row]]).attr("dominant-baseline", "middle").attr("text-anchor", "end");
+ }).on("mouseout", function(d) {
+ corr_tip.hide(d);
+ d3.selectAll("text.corrlabel").remove();
+ return d3.select(this).attr("stroke", "none");
+ }).on("click", function(d) {
+ return drawScatter(d.col, d.row);
+ });
+ nGroup = d3.max(data.group);
+ if (!(scatcolors != null) || scatcolors.length < nGroup) {
+ if (nGroup === 1) {
+ scatcolors = [d3.rgb(150, 150, 150)];
+ } else if (nGroup <= 3) {
+ scatcolors = ["crimson", "green", "darkslateblue"];
+ } else {
+ if (nGroup <= 10) {
+ colorScale = d3.scale.category10();
+ } else {
+ colorScale = d3.scale.category20();
+ }
+ scatcolors = (function() {
+ var _results;
+ _results = [];
+ for (i in d3.range(nGroup)) {
+ _results.push(colorScale(i));
+ }
+ return _results;
+ })();
+ }
+ }
+ scat_tip = d3.tip().attr('class', 'd3-tip').html(function(d, i) {
+ return data.indID[i];
+ }).direction('e').offset([0, 10]);
+ scatterplot.call(scat_tip);
+ drawScatter = function(i, j) {
+ var xScale, xticks, yScale, yticks;
+ d3.selectAll("circle.points").remove();
+ d3.selectAll("text.axes").remove();
+ d3.selectAll("line.axes").remove();
+ console.log("data.dat:", data.dat);
+ console.log("data.cols:", data.cols);
+ xScale = d3.scale.linear().domain(d3.extent(data.dat[data.cols[i]])).range([margin.inner, width - margin.inner]);
+ yScale = d3.scale.linear().domain(d3.extent(data.dat[data.rows[j]])).range([height - margin.inner, margin.inner]);
+ scatterplot.append("text").attr("id", "xaxis").attr("class", "axes").attr("x", width / 2).attr("y", height + margin.bottom * 0.7).text(data["var"][data.cols[i]]).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("fill", "slateblue");
+ scatterplot.append("text").attr("id", "yaxis").attr("class", "axes").attr("x", -margin.left * 0.8).attr("y", height / 2).text(data["var"][data.rows[j]]).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("transform", "rotate(270," + (-margin.left * 0.8) + "," + (height / 2) + ")").attr("fill", "slateblue");
+ xticks = xScale.ticks(5);
+ yticks = yScale.ticks(5);
+ scatterplot.selectAll("empty").data(xticks).enter().append("text").attr("class", "axes").text(function(d) {
+ return formatAxis(xticks)(d);
+ }).attr("x", function(d) {
+ return xScale(d);
+ }).attr("y", height + margin.bottom * 0.3).attr("dominant-baseline", "middle").attr("text-anchor", "middle");
+ scatterplot.selectAll("empty").data(yticks).enter().append("text").attr("class", "axes").text(function(d) {
+ return formatAxis(yticks)(d);
+ }).attr("x", -margin.left * 0.1).attr("y", function(d) {
+ return yScale(d);
+ }).attr("dominant-baseline", "middle").attr("text-anchor", "end");
+ scatterplot.selectAll("empty").data(xticks).enter().append("line").attr("class", "axes").attr("x1", function(d) {
+ return xScale(d);
+ }).attr("x2", function(d) {
+ return xScale(d);
+ }).attr("y1", 0).attr("y2", height).attr("stroke", "white").attr("stroke-width", 1);
+ scatterplot.selectAll("empty").data(yticks).enter().append("line").attr("class", "axes").attr("y1", function(d) {
+ return yScale(d);
+ }).attr("y2", function(d) {
+ return yScale(d);
+ }).attr("x1", 0).attr("x2", width).attr("stroke", "white").attr("stroke-width", 1);
+ return scatterplot.selectAll("empty").data(d3.range(nind)).enter().append("circle").attr("class", "points").attr("cx", function(d) {
+ return xScale(data.dat[data.cols[i]][d]);
+ }).attr("cy", function(d) {
+ return yScale(data.dat[data.rows[j]][d]);
+ }).attr("r", function(d) {
+ var x, y;
+ x = data.dat[data.cols[i]][d];
+ y = data.dat[data.rows[j]][d];
+ if ((x != null) && (y != null)) {
+ return 3;
+ } else {
+ return null;
+ }
+ }).attr("stroke", "black").attr("stroke-width", 1).attr("fill", function(d) {
+ return scatcolors[data.group[d] - 1];
+ }).on("mouseover", scat_tip.show).on("mouseout", scat_tip.hide);
+ };
+ corrplot.append("rect").attr("height", height).attr("width", width).attr("fill", "none").attr("stroke", "black").attr("stroke-width", 1).attr("pointer-events", "none");
+ scatterplot.append("rect").attr("height", height).attr("width", width).attr("fill", "none").attr("stroke", "black").attr("stroke-width", 1).attr("pointer-events", "none");
+ corrplot.append("text").text(cortitle).attr("id", "corrtitle").attr("x", width / 2).attr("y", -margin.top / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle");
+ scatterplot.append("text").text(scattitle).attr("id", "scattitle").attr("x", width / 2).attr("y", -margin.top / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle");
+ return d3.select("div#caption").style("opacity", 1);
+ };
+
+ root.corr_matrix = iplotCorr;
+
+}).call(this);
diff --git a/wqflask/wqflask/static/new/javascript/create_corr_matrix.coffee b/wqflask/wqflask/static/new/javascript/create_corr_matrix.coffee
new file mode 100644
index 00000000..88b392d0
--- /dev/null
+++ b/wqflask/wqflask/static/new/javascript/create_corr_matrix.coffee
@@ -0,0 +1,42 @@
+root = exports ? this
+
+$ ->
+ console.log("js_data:", js_data)
+
+ chartOpts = get_options()
+ data = get_data()
+ console.log(data)
+
+ mychart = corr_matrix(data, chartOpts)
+
+
+get_options = ->
+ #h = 450
+ #w = 450
+ #margin = {left:70, top:40, right:5, bottom: 70, inner:5}
+ #
+ chartOpts =
+ cortitle: "Correlation Matrix"
+ scattitle: "Scatterplot"
+ h: 450
+ w: 450
+ margin: {left:100, top:40, right:5, bottom: 70, inner:5}
+
+ return chartOpts
+
+get_data = ->
+ data = {}
+ data.var = js_data.traits
+ data.group = js_data.groups
+ data.indID = js_data.samples
+ data.dat = js_data.sample_data
+ data.corr = js_data.corr_results
+ data.cols = js_data.cols
+ data.rows = js_data.rows
+
+
+ return data
+
+
+
+ \ No newline at end of file
diff --git a/wqflask/wqflask/static/new/javascript/create_corr_matrix.js b/wqflask/wqflask/static/new/javascript/create_corr_matrix.js
new file mode 100644
index 00000000..64dc834d
--- /dev/null
+++ b/wqflask/wqflask/static/new/javascript/create_corr_matrix.js
@@ -0,0 +1,47 @@
+// Generated by CoffeeScript 1.6.1
+(function() {
+ var get_data, get_options, root;
+
+ root = typeof exports !== "undefined" && exports !== null ? exports : this;
+
+ $(function() {
+ var chartOpts, data, mychart;
+ console.log("js_data:", js_data);
+ chartOpts = get_options();
+ data = get_data();
+ console.log(data);
+ return mychart = corr_matrix(data, chartOpts);
+ });
+
+ get_options = function() {
+ var chartOpts;
+ chartOpts = {
+ cortitle: "Correlation Matrix",
+ scattitle: "Scatterplot",
+ h: 450,
+ w: 450,
+ margin: {
+ left: 100,
+ top: 40,
+ right: 5,
+ bottom: 70,
+ inner: 5
+ }
+ };
+ return chartOpts;
+ };
+
+ get_data = function() {
+ var data;
+ data = {};
+ data["var"] = js_data.traits;
+ data.group = js_data.groups;
+ data.indID = js_data.samples;
+ data.dat = js_data.sample_data;
+ data.corr = js_data.corr_results;
+ data.cols = js_data.cols;
+ data.rows = js_data.rows;
+ return data;
+ };
+
+}).call(this);
diff --git a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json
index 43575a18..fabf3998 100755
--- a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json
+++ b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json
@@ -64,14 +64,14 @@
],
"Leaf mRNA": [
[
- "B1LI0809M5",
- "Barley1 Leaf INOC TTKS (Aug09) MAS5"
- ],
- [
"B1LI0809R",
"Barley1 Leaf INOC TTKS (Aug09) RMA"
],
[
+ "B1LI0809M5",
+ "Barley1 Leaf INOC TTKS (Aug09) MAS5"
+ ],
+ [
"B1MI0809M5",
"Barley1 Leaf MOCK TTKS (Aug09) MAS5"
],
@@ -114,12 +114,12 @@
"Barley1 Leaf MAS 5.0 SCRI (Dec06)"
],
[
- "B30_K_1206_R",
- "Barley1 Leaf gcRMA SCRI (Dec06)"
- ],
- [
"B30_K_1206_Rn",
"Barley1 Leaf gcRMAn SCRI (Dec06)"
+ ],
+ [
+ "B30_K_1206_R",
+ "Barley1 Leaf gcRMA SCRI (Dec06)"
]
],
"Phenotypes": [
@@ -212,16 +212,16 @@
"AD-cases-controls-Myers": {
"Brain mRNA": [
[
+ "GSE15222_F_RI_0409",
+ "GSE15222 Human Brain All Cases Myers (Apr09) RankInv"
+ ],
+ [
"GSE15222_F_N_RI_0409",
"GSE15222 Human Brain Normal Myers (Apr09) RankInv"
],
[
"GSE15222_F_A_RI_0409",
"GSE15222 Human Brain Alzheimer Myers (Apr09) RankInv"
- ],
- [
- "GSE15222_F_RI_0409",
- "GSE15222 Human Brain Myers (Apr09) RankInv"
]
],
"Genotypes": [
@@ -237,6 +237,82 @@
]
]
},
+ "Aging-Brain-UCI": {
+ "Entorhinal Cortex mRNA": [
+ [
+ "UCI_EC_0913",
+ "GSE11882 UCI Human Entorhinal Cortex Affy U133 Plus2 (Sep13) RMA"
+ ]
+ ],
+ "Genotypes": [
+ [
+ "Aging-Brain-UCIGeno",
+ "Aging-Brain-UCI Genotypes"
+ ]
+ ],
+ "Hippocampus mRNA": [
+ [
+ "UCI_HC_0913",
+ "GSE11882 UCI Human Hippocampus Affy U133 Plus2 (Sep13) RMA"
+ ]
+ ],
+ "Phenotypes": [
+ [
+ "Aging-Brain-UCIPublish",
+ "Aging-Brain-UCI Published Phenotypes"
+ ]
+ ],
+ "Postcentral Gyrus mRNA": [
+ [
+ "UCI_PCG_0913",
+ "GSE11882 UCI Human Postcentral Gyrus Affy U133 Plus2 (Sep13) RMA"
+ ]
+ ],
+ "Superior Frontal Gyrus mRNA": [
+ [
+ "UCI_SG_0913",
+ "GSE11882 UCI Human Superior Frontal Gyrus Affy U133 Plus2 (Sep13) RMA"
+ ]
+ ]
+ },
+ "Brain-Normal-NIH-Gibbs": {
+ "Cerebellum mRNA": [
+ [
+ "GSE15745-GPL6104_Cer0510",
+ "GSE15745 NIH Human Brain Cerebellum ILM humanRef-8 v2.0 (May10) RankInv"
+ ]
+ ],
+ "Genotypes": [
+ [
+ "Brain-Normal-NIH-GibbsGeno",
+ "Brain-Normal-NIH-Gibbs Genotypes"
+ ]
+ ],
+ "Phenotypes": [
+ [
+ "Brain-Normal-NIH-GibbsPublish",
+ "Brain-Normal-NIH-Gibbs Published Phenotypes"
+ ]
+ ],
+ "Pons mRNA": [
+ [
+ "GSE15745-GPL6104_Po0510",
+ "GSE15745 NIH Human Brain Pons ILM humanRef-8 v2.0 (May10) RankInv"
+ ]
+ ],
+ "Prefrontal Cortex mRNA": [
+ [
+ "GSE15745-GPL6104_PFC0510",
+ "GSE15745 NIH Human Brain Prefrontal Cortex ILM humanRef-8 v2.0 (May10) RankInv"
+ ]
+ ],
+ "Temporal Cerebral Wall mRNA": [
+ [
+ "GSE15745-GPL6104_TC0510",
+ "GSE15745 NIH Human Brain Temporal Cerebral ILM humanRef-8 v2.0 (May10) RankInv"
+ ]
+ ]
+ },
"CANDLE": {
"Genotypes": [
[
@@ -291,6 +367,490 @@
]
]
},
+ "GTEx": {
+ "Adrenal Gland mRNA": [
+ [
+ "GTEx_log2_Adren_0314",
+ "GTEx Human Adrenal Gland (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Adren_0414",
+ "GTEx Human Adrenal Gland (Apr14) RPKM"
+ ]
+ ],
+ "Amygdala mRNA": [
+ [
+ "GTEx_log2_AMY_0314",
+ "GTEx Human Amygdala (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_AMY_0314",
+ "GTEx Human Amygdala (Mar14) RPKM"
+ ]
+ ],
+ "Anterior Cingulate Cortex mRNA": [
+ [
+ "GTEx_log2_Anter_0314",
+ "GTEx Human Anterior Cingulate Cortex (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Anter_0414",
+ "GTEx Human Anterior Cingulate Cortex (Apr14) RPKM"
+ ]
+ ],
+ "Aorta mRNA": [
+ [
+ "GTEx_log2_Aorta_0314",
+ "GTEx Human Aorta (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Aorta_0414",
+ "GTEx Human Aorta (Apr14) RPKM"
+ ]
+ ],
+ "Blood, Cells - EBV-Transformed Lymphocytes mRNA": [
+ [
+ "GTEx_log2_Blood_0314",
+ "GTEx Human Blood, Cells - EBV-Transformed Lymphocytes (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Blood_0414",
+ "GTEx Human Blood, Cells - EBV-Transformed Lymphocytes (Apr14) RPKM"
+ ]
+ ],
+ "Breast - Mammary Tissue mRNA": [
+ [
+ "GTEx_log2_Breas_0314",
+ "GTEx Human Breast - Mammary Tissue (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Breas_0414",
+ "GTEx Human Breast - Mammary Tissue (Apr14) RPKM"
+ ]
+ ],
+ "Caudate mRNA": [
+ [
+ "GTEx_log2_Cauda_0314",
+ "GTEx Human Caudate (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Cauda_0414",
+ "GTEx Human Caudate (Apr14) RPKM"
+ ]
+ ],
+ "Cells - EBV-Transformed Lymphocytes mRNA": [
+ [
+ "GTEx_log2_CellsEBV_0314",
+ "GTEx Human Cells - EBV-Transformed Lymphocytes (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_CellsEBV_0414",
+ "GTEx Human Cells - EBV-Transformed Lymphocytes (Apr14) RPKM"
+ ]
+ ],
+ "Cells - Leukemia Cell Line (CML) mRNA": [
+ [
+ "GTEx_log2_CellsLe_0314",
+ "GTEx Human Cells - Leukemia Cell Line (CML) (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_CellsLe_0414",
+ "GTEx Human Cells - Leukemia Cell Line (CML) (Apr14) RPKM"
+ ]
+ ],
+ "Cells - Transformed Fibroblasts mRNA": [
+ [
+ "GTEx_log2_CellsTr_0314",
+ "GTEx Human Cells - Transformed Fibroblasts (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_CellsTr_0414",
+ "GTEx Human Cells - Transformed Fibroblasts (Apr14) RPKM"
+ ]
+ ],
+ "Cerebellar Cortex mRNA": [
+ [
+ "GTEx_log2_CerebC_0314",
+ "GTEx Human Cerebellar Cortex (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_CerebC_0414",
+ "GTEx Human Cerebellar Cortex (Apr14) RPKM"
+ ]
+ ],
+ "Cerebellar Hemisphere mRNA": [
+ [
+ "GTEx_log2_CerebH_0314",
+ "GTEx Human Cerebellar Hemisphere (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_CerebH_0414",
+ "GTEx Human Cerebellar Hemisphere (Apr14) RPKM"
+ ]
+ ],
+ "Cerebellum mRNA": [
+ [
+ "GTEx_log2_CER_0314",
+ "GTEx Human Cerebellum (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_CER_0314",
+ "GTEx Human Cerebellum (Mar14) RPKM"
+ ]
+ ],
+ "Colon - Transverse mRNA": [
+ [
+ "GTEx_log2_Colon_0314",
+ "GTEx Human Colon - Transverse (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Colon_0414",
+ "GTEx Human Colon - Transverse (Apr14) RPKM"
+ ]
+ ],
+ "Coronary mRNA": [
+ [
+ "GTEx_log2_Coron_0314",
+ "GTEx Human Coronary (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Coron_0414",
+ "GTEx Human Coronary (Apr14) RPKM"
+ ]
+ ],
+ "Esophagus - Mucosa mRNA": [
+ [
+ "GTEx_log2_EsophMuc_0314",
+ "GTEx Human Esophagus - Mucosa (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_EsophMuc_0414",
+ "GTEx Human Esophagus - Mucosa (Apr14) RPKM"
+ ]
+ ],
+ "Esophagus - Muscularis mRNA": [
+ [
+ "GTEx_log2_EsophMus_0314",
+ "GTEx Human Esophagus - Muscularis (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_EsophMus_0414",
+ "GTEx Human Esophagus - Muscularis (Apr14) RPKM"
+ ]
+ ],
+ "Fallopian Tube mRNA": [
+ [
+ "GTEx_log2_Fallo_0314",
+ "GTEx Human Fallopian Tube (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Fallo_0414",
+ "GTEx Human Fallopian Tube (Apr14) RPKM"
+ ]
+ ],
+ "Frontal Cortex mRNA": [
+ [
+ "GTEx_log2_Front_0314",
+ "GTEx Human Frontal Cortex (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Front_0414",
+ "GTEx Human Frontal Cortex (Apr14) RPKM"
+ ]
+ ],
+ "Genotypes": [
+ [
+ "GTExGeno",
+ "GTEx Genotypes"
+ ]
+ ],
+ "Heart - Atrial Appendage mRNA": [
+ [
+ "GTEx_log2_HeartAt_0314",
+ "GTEx Human Heart - Atrial Appendage (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_HeartAt_0414",
+ "GTEx Human Heart - Atrial Appendage (Apr14) RPKM"
+ ]
+ ],
+ "Heart - Left Ventricle mRNA": [
+ [
+ "GTEx_log2_HeartLV_0314",
+ "GTEx Human Heart - Left Ventricle (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_HeartLV_0414",
+ "GTEx Human Heart - Left Ventricle (Apr14) RPKM"
+ ]
+ ],
+ "Hippocampus mRNA": [
+ [
+ "GTEx_log2_HIP_0314",
+ "GTEx Human Hippocampus (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_HIP_0314",
+ "GTEx Human Hippocampus (Mar14) RPKM"
+ ]
+ ],
+ "Hypothalamus mRNA": [
+ [
+ "GTEx_log2_Hypot_0314",
+ "GTEx Human Hypothalamus (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Hypot_0414",
+ "GTEx Human Hypothalamus (Apr14) RPKM"
+ ]
+ ],
+ "Kidney mRNA": [
+ [
+ "GTEx_log2_Kidne_0314",
+ "GTEx Human Kidney (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Kidne_0414",
+ "GTEx Human Kidney (Apr14) RPKM"
+ ]
+ ],
+ "Liver mRNA": [
+ [
+ "GTEx_log2_Liver_0314",
+ "GTEx Human Liver (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Liver_0414",
+ "GTEx Human Liver (Apr14) RPKM"
+ ]
+ ],
+ "Lung mRNA": [
+ [
+ "GTEx_log2_Lung_0314",
+ "GTEx Human Lung (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Lung _0414",
+ "GTEx Human Lung (Apr14) RPKM"
+ ]
+ ],
+ "Muscle mRNA": [
+ [
+ "GTEx_log2_Muscle_0314",
+ "GTEx Human Muscle (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Muscl_0414",
+ "GTEx Human Muscle (Apr14) RPKM"
+ ]
+ ],
+ "Nerve - Tibial mRNA": [
+ [
+ "GTEx_log2_Nerve_0314",
+ "GTEx Human Nerve - Tibial (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Nerve_0414",
+ "GTEx Human Nerve - Tibial (Apr14) RPKM"
+ ]
+ ],
+ "Nucleus Accumbens mRNA": [
+ [
+ "GTEx_log2_Nucle_0314",
+ "GTEx Human Nucleus Accumbens (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Nucle_0414",
+ "GTEx Human Nucleus Accumbens (Apr14) RPKM"
+ ]
+ ],
+ "Ovary mRNA": [
+ [
+ "GTEx_log2_Ovary_0314",
+ "GTEx Human Ovary (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Ovary_0414",
+ "GTEx Human Ovary (Apr14) RPKM"
+ ]
+ ],
+ "Pancreas mRNA": [
+ [
+ "GTEx_log2_Pancr_0314",
+ "GTEx Human Pancreas (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Pancr_0414",
+ "GTEx Human Pancreas (Apr14) RPKM"
+ ]
+ ],
+ "Phenotypes": [
+ [
+ "GTExPublish",
+ "GTEx Published Phenotypes"
+ ]
+ ],
+ "Pituitary Gland mRNA": [
+ [
+ "GTEx_log2_Pitui_0314",
+ "GTEx Human Pituitary (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Pitui_0414",
+ "GTEx Human Pituitary (Apr14) RPKM"
+ ]
+ ],
+ "Prostate mRNA": [
+ [
+ "GTEx_log2_Prost_0314",
+ "GTEx Human Prostate (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Prost_0414",
+ "GTEx Human Prostate (Apr14) RPKM"
+ ]
+ ],
+ "Putamen mRNA": [
+ [
+ "GTEx_log2_Putam_0314",
+ "GTEx Human Putamen (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Putam_0414",
+ "GTEx Human Putamen (Apr14) RPKM"
+ ]
+ ],
+ "Skin - Not Sun Exposed (Suprapubic) mRNA": [
+ [
+ "GTEx_log2_SkinN_0314",
+ "GTEx Human Skin-Not Sun Exposed (Suprapubic) (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_SkinN_0414",
+ "GTEx Human Skin-Not Sun Exposed (Suprapubic) (Apr14) RPKM"
+ ]
+ ],
+ "Skin - Sun Exposed (Lower leg) mRNA": [
+ [
+ "GTEx_log2_SkinE_0314",
+ "GTEx Human Skin-Sun Exposed (Lower leg) (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_SkinE_0414",
+ "GTEx Human Skin-Sun Exposed (Lower leg) (Apr14) RPKM"
+ ]
+ ],
+ "Spinal Cord mRNA": [
+ [
+ "GTEx_log2_Spina_0314",
+ "GTEx Human Spinal Cord (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Spina_0414",
+ "GTEx Human Spinal Cord (Apr14) RPKM"
+ ]
+ ],
+ "Stomach mRNA": [
+ [
+ "GTEx_log2_Stoma_0314",
+ "GTEx Human Stomach (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Stoma_0414",
+ "GTEx Human Stomach (Apr14) RPKM"
+ ]
+ ],
+ "Subcutaneous mRNA": [
+ [
+ "GTEx_log2_Subcu_0314",
+ "GTEx Human Subcutaneous (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Subcu_0414",
+ "GTEx Human Subcutaneous (Apr14) RPKM"
+ ]
+ ],
+ "Substantia Nigra mRNA": [
+ [
+ "GTEx_log2_Subst_0314",
+ "GTEx Human Substantia Nigra (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Subst_0414",
+ "GTEx Human Substantia Nigra (Apr14) RPKM"
+ ]
+ ],
+ "Testis mRNA": [
+ [
+ "GTEx_log2_Testi_0314",
+ "GTEx Human Testis (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Testi_0414",
+ "GTEx Human Testis (Apr14) RPKM"
+ ]
+ ],
+ "Thyroid mRNA": [
+ [
+ "GTEx_log2_Thyro_0314",
+ "GTEx Human Thyroid (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Thyro_0414",
+ "GTEx Human Thyroid (Apr14) RPKM"
+ ]
+ ],
+ "Tibial mRNA": [
+ [
+ "GTEx_log2_Tibial_0314",
+ "GTEx Human Tibial (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Tibia_0414",
+ "GTEx Human Tibial (Apr14) RPKM"
+ ]
+ ],
+ "Uterus mRNA": [
+ [
+ "GTEx_log2_Uterus_0314",
+ "GTEx Human Uterus (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Uteru_0414",
+ "GTEx Human Uterus (Apr14) RPKM"
+ ]
+ ],
+ "Vagina mRNA": [
+ [
+ "GTEx_log2_Vagin_0314",
+ "GTEx Human Vagina (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Vagin_0414",
+ "GTEx Human Vagina (Apr14) RPKM"
+ ]
+ ],
+ "Visceral mRNA": [
+ [
+ "GTEx_log2_Visce_0314",
+ "GTEx Human Visceral (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Visce_0414",
+ "GTEx Human Visceral (Apr14) RPKM"
+ ]
+ ],
+ "Whole Blood mRNA": [
+ [
+ "GTEx_log2_WholeB_0314",
+ "GTEx Human Whole Blood (Mar14) RPKM Log2"
+ ],
+ [
+ "GTEx_Whole_0414",
+ "GTEx Human Whole Blood (Apr14) RPKM"
+ ]
+ ]
+ },
"HB": {
"Cerebellum mRNA": [
[
@@ -359,6 +919,20 @@
]
]
},
+ "HCP": {
+ "Genotypes": [
+ [
+ "HCPGeno",
+ "HCP Genotypes"
+ ]
+ ],
+ "Phenotypes": [
+ [
+ "HCPPublish",
+ "HCP Published Phenotypes"
+ ]
+ ]
+ },
"HLC": {
"Genotypes": [
[
@@ -590,12 +1164,12 @@
"NCI Mammary LMT miRNA v2 (Apr09) RMA"
],
[
- "MA_M_0704_M",
- "NCI Mammary mRNA M430 (July04) MAS5"
- ],
- [
"MA_M_0704_R",
"NCI Mammary mRNA M430 (July04) RMA"
+ ],
+ [
+ "MA_M_0704_M",
+ "NCI Mammary mRNA M430 (July04) MAS5"
]
],
"Phenotypes": [
@@ -652,12 +1226,12 @@
],
"Liver mRNA": [
[
- "LVF2_M_0704_M",
- "(B6 x BTBR)F2-ob/ob Liver mRNA M430 (Jul04) MAS5"
- ],
- [
"LVF2_M_0704_R",
"(B6 x BTBR)F2-ob/ob Liver mRNA M430 (Jul04) RMA"
+ ],
+ [
+ "LVF2_M_0704_M",
+ "(B6 x BTBR)F2-ob/ob Liver mRNA M430 (Jul04) MAS5"
]
],
"Phenotypes": [
@@ -670,6 +1244,10 @@
"B6D2F2": {
"Brain mRNA": [
[
+ "BRF2_M_0805_M",
+ "OHSU/VA B6D2F2 Brain mRNA M430 (Aug05) MAS5"
+ ],
+ [
"BRF2_M_0805_P",
"OHSU/VA B6D2F2 Brain mRNA M430 (Aug05) PDNN"
],
@@ -678,20 +1256,16 @@
"OHSU/VA B6D2F2 Brain mRNA M430 (Aug05) RMA"
],
[
- "BRF2_M_0805_M",
- "OHSU/VA B6D2F2 Brain mRNA M430 (Aug05) MAS5"
- ],
- [
"BRF2_M_0304_P",
"OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) PDNN"
],
[
- "BRF2_M_0304_M",
- "OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) MAS5"
- ],
- [
"BRF2_M_0304_R",
"OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) RMA"
+ ],
+ [
+ "BRF2_M_0304_M",
+ "OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) MAS5"
]
],
"Genotypes": [
@@ -794,44 +1368,44 @@
],
"Striatum mRNA": [
[
+ "SA_M2_0905_R",
+ "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) RMA"
+ ],
+ [
"SA_M2_0905_M",
"OHSU/VA B6D2F2 Striatum M430v2 (Sep05) MAS5"
],
[
"SA_M2_0905_P",
"OHSU/VA B6D2F2 Striatum M430v2 (Sep05) PDNN"
- ],
- [
- "SA_M2_0905_R",
- "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) RMA"
]
]
},
"BHF2": {
"Adipose mRNA": [
[
- "UCLA_BHF2_ADIPOSE_FEMALE",
- "UCLA BHF2 Adipose Female mlratio"
- ],
- [
"UCLA_BHF2_ADIPOSE_MALE",
"UCLA BHF2 Adipose Male mlratio"
],
[
+ "UCLA_BHF2_ADIPOSE_FEMALE",
+ "UCLA BHF2 Adipose Female mlratio"
+ ],
+ [
"UCLA_BHF2_ADIPOSE_0605",
"UCLA BHF2 Adipose (June05) mlratio"
]
],
"Brain mRNA": [
[
- "UCLA_BHF2_BRAIN_FEMALE",
- "UCLA BHF2 Brain Female mlratio"
- ],
- [
"UCLA_BHF2_BRAIN_MALE",
"UCLA BHF2 Brain Male mlratio"
],
[
+ "UCLA_BHF2_BRAIN_FEMALE",
+ "UCLA BHF2 Brain Female mlratio"
+ ],
+ [
"UCLA_BHF2_BRAIN_0605",
"UCLA BHF2 Brain (June05) mlratio"
]
@@ -844,28 +1418,28 @@
],
"Liver mRNA": [
[
- "UCLA_BHF2_LIVER_FEMALE",
- "UCLA BHF2 Liver Female mlratio"
- ],
- [
"UCLA_BHF2_LIVER_MALE",
"UCLA BHF2 Liver Male mlratio"
],
[
+ "UCLA_BHF2_LIVER_FEMALE",
+ "UCLA BHF2 Liver Female mlratio"
+ ],
+ [
"UCLA_BHF2_LIVER_0605",
"UCLA BHF2 Liver (June05) mlratio"
]
],
"Muscle mRNA": [
[
- "UCLA_BHF2_MUSCLE_FEMALE",
- "UCLA BHF2 Muscle Female mlratio **"
- ],
- [
"UCLA_BHF2_MUSCLE_MALE",
"UCLA BHF2 Muscle Male mlratio **"
],
[
+ "UCLA_BHF2_MUSCLE_FEMALE",
+ "UCLA BHF2 Muscle Female mlratio **"
+ ],
+ [
"UCLA_BHF2_MUSCLE_0605",
"UCLA BHF2 Muscle (June05) mlratio **"
]
@@ -948,6 +1522,16 @@
]
},
"BXD": {
+ "Adipose mRNA": [
+ [
+ "EPFLADGL1013",
+ "EPFL/LISP BXD CD Brown Adipose Affy Mouse Gene 2.0 ST Gene Level (Oct13) RMA"
+ ],
+ [
+ "EPFLADEL1013",
+ "EPFL/LISP BXD CD Brown Adipose Affy Mouse Gene 2.0 ST Exon Level (Oct13) RMA"
+ ]
+ ],
"Adrenal Gland mRNA": [
[
"INIA_Adrenal_RMA_0612",
@@ -996,16 +1580,40 @@
[
"UCLA_BXD-on_Femur_0113_RSN",
"UCLA GSE27483 BXD Only Bone Femur ILM Mouse WG-6 v2.0 (Jan13) RSN"
+ ],
+ [
+ "UTHSCWGU88BFMG1013",
+ "UTHSC WGU88 Male Bone Femur AFFY Mouse Gene ST 2.0 Gene Level (Oct13) RMA **"
+ ],
+ [
+ "UTHSCWGU88BFMEx1013",
+ "UTHSC WGU88 Male Bone Femur AFFY Mouse Gene ST 2.0 Exon Level (Oct13) RMA **"
+ ],
+ [
+ "UTHSCWGU88BFFG1013",
+ "UTHSC WGU88 Female Bone Femur AFFY Mouse Gene ST 2.0 Gene Level (Oct13) RMA **"
+ ],
+ [
+ "UTHSCWGU88BFFEx1013",
+ "UTHSC WGU88 Female Bone Femur AFFY Mouse Gene ST 2.0 Exon Level (Oct13) RMA **"
]
],
"Brain mRNA": [
[
- "UTHSC_BXD_WB_RNASeqEx1112",
- "UTHSC Mouse BXD Whole Brain RNA Sequence Exon Level (Nov12) RPKM"
+ "UTHSC_BXD_WB_RNASeqtrim1112",
+ "UTHSC Mouse BXD Whole Brain RNA Sequence (Nov12) RPKM Trimmed 2.0"
],
[
"UTHSC_BXD_WB_RNASeq1112",
- "UTHSC Mouse BXD Whole Brain RNA Sequence (Nov12) RPKM"
+ "UTHSC Mouse BXD Whole Brain RNA Sequence (Nov12) RPKM Untrimmed"
+ ],
+ [
+ "UTHSC_BXD_WB_RNASeqtrim1_1112",
+ "UTHSC Mouse BXD Whole Brain RNA Sequence (Nov12) RPKM Trimmed 1.0"
+ ],
+ [
+ "UTHSC_BXD_WB_RNASeqEx1112",
+ "UTHSC Mouse BXD Whole Brain RNA Sequence Exon Level (Nov12) RPKM"
],
[
"BR_M2_1106_R",
@@ -1016,10 +1624,6 @@
"UTHSC Brain mRNA U74Av2 (Nov05) PDNN"
],
[
- "BR_U_0805_P",
- "UTHSC Brain mRNA U74Av2 (Aug05) PDNN"
- ],
- [
"BR_U_0805_M",
"UTHSC Brain mRNA U74Av2 (Aug05) MAS5"
],
@@ -1028,6 +1632,10 @@
"UTHSC Brain mRNA U74Av2 (Aug05) RMA"
],
[
+ "BR_U_0805_P",
+ "UTHSC Brain mRNA U74Av2 (Aug05) PDNN"
+ ],
+ [
"CB_M_0204_P",
"INIA Brain mRNA M430 (Feb04) PDNN"
]
@@ -1138,6 +1746,10 @@
"Eye M430v2 WT Gpnmb (Sep08) RMA **"
],
[
+ "Eye_M2_0908_R_MT",
+ "Eye M430v2 Mutant Tyrp1 (Sep08) RMA **"
+ ],
+ [
"Eye_M2_0908_WTWT",
"Eye M430v2 WT WT (Sep08) RMA **"
],
@@ -1147,15 +1759,17 @@
],
[
"DBA2J-ONH-1212",
- "ONH BXD Glaucoma Affy M430 2.0 Trial (Dec12) RMA **"
- ],
- [
- "Eye_M2_0908_R_MT",
- "Eye M430v2 Mutant Tyrp1 (Sep08) RMA **"
+ "Howell et al. 2011, DBA/2J Glaucoma Optic Nerve Head M430 2.0 (Dec12) RMA"
],
[
"BXD_GLA_0911",
- "BXD Glaucoma Affy M430 2.0 Trial (Sep11) RMA **"
+ "Howell et al. 2011, DBA/2J Glaucoma Retina M430 2.0 (Sep11) RMA"
+ ]
+ ],
+ "Gastrointestinal mRNA": [
+ [
+ "UTHSC_GutGL_0414",
+ "UTHSC Mouse BXD Gastrointestinal Affy MoGene 1.0 ST Gene Level (Apr14) RMA **"
]
],
"Genotypes": [
@@ -1164,6 +1778,24 @@
"BXD Genotypes"
]
],
+ "Heart mRNA": [
+ [
+ "EPFL-LISPBXDHeCD0114",
+ "EPFL/LISP BXD CD Heart Affy Mouse Gene 2.0 ST Gene Level (Jan14) RMA **"
+ ],
+ [
+ "EPFL-LISPBXDHeHFD0114",
+ "EPFL/LISP BXD HFD Heart Affy Mouse Gene 2.0 ST Gene Level (Jan14) RMA **"
+ ],
+ [
+ "EPFL-LISPBXDHeCDEx0114",
+ "EPFL/LISP BXD CD Heart Affy Mouse Gene 2.0 ST Exon Level (Jan14) RMA **"
+ ],
+ [
+ "EPFL-LISPBXDHeHFDEx0114",
+ "EPFL/LISP BXD HFD Heart Affy Mouse Gene 2.0 ST Exon Level (Jan14) RMA **"
+ ]
+ ],
"Hematopoietic Cells mRNA": [
[
"UMCG_0907_HemaStem_ori",
@@ -1217,7 +1849,7 @@
],
[
"UT_ILM_BXD_hipp_5T_1112",
- "UTHSC Hippocampus Illumina v6.1 5Trt (Nov12) RankInv"
+ "UTHSC Hippocampus Illumina v6.1 All Combined (Nov12) RankInv"
],
[
"UT_ILM_BXD_hipp_NON_1112",
@@ -1272,6 +1904,12 @@
"UTHSC BXD Aged Hippocampus Affy Mouse Gene 1.0 ST (Sep12) RMA Exon Level **"
]
],
+ "Hippocampus microRNA": [
+ [
+ "UTHSC_BXD_Hip_miRNASeq0214",
+ "UTHSC BXD Hippocampus Ion Torrent microRNA (Feb14) RPKM **"
+ ]
+ ],
"Hypothalamus mRNA": [
[
"INIA_Hyp_RMA_1110",
@@ -1286,6 +1924,22 @@
"INIA Hypothalamus Affy MoGene 1.0 ST (Nov10) Female"
],
[
+ "INIA_Hyp_PCA_0813_v4",
+ "INIA Hypothalamus Affy MoGene 1.0 ST (Nov10) PCA Test v080913"
+ ],
+ [
+ "INIA_Hyp_PCA_0813_v3",
+ "INIA Hypothalamus Affy MoGene 1.0 ST (Nov10) PCA Test v080813"
+ ],
+ [
+ "INIA_Hyp_PCA_0813_v2",
+ "INIA Hypothalamus Affy MoGene 1.0 ST (Nov10) PCA Test v080513"
+ ],
+ [
+ "INIA_Hyp_PCA_0813",
+ "INIA Hypothalamus Affy MoGene 1.0 ST (Nov10) PCA Test v080213"
+ ],
+ [
"INIA_Hyp_RMA_Ex-1110",
"INIA Hypothalamus Exon Affy MoGene 1.0 ST (Nov10)"
]
@@ -1308,12 +1962,12 @@
"Mouse Kidney M430v2 Sex Balanced (Aug06) PDNN"
],
[
- "MA_M2_0706_R",
- "Mouse Kidney M430v2 (Jul06) RMA"
- ],
- [
"MA_M2_0706_P",
"Mouse Kidney M430v2 (Jul06) PDNN"
+ ],
+ [
+ "MA_M2_0706_R",
+ "Mouse Kidney M430v2 (Jul06) RMA"
]
],
"Leucocytes mRNA": [
@@ -1322,30 +1976,32 @@
"UWA Illumina PBL (Nov08) RSN **"
]
],
- "Liver Proteome": [
+ "Liver Metabolome": [
[
- "EPFLBXDprotRPN0513",
- "EPFL/LISP BXD Liver, Hepatocytes, Soluable Proteins CD+HFD (May13) RPN **"
+ "EPFL-LISP_LivPMetHFD1213",
+ "EPFL/LISP BXD Liver Polar Metabolites HFD (Jun14) **"
],
[
- "EPFLBXDprotHFDRPN0513",
- "EPFL/LISP BXD Liver, Hepatocytes, Soluable Proteins HFD (May13) RPN **"
- ],
+ "EPFL-LISP_LivPMetCD1213",
+ "EPFL/LISP BXD Liver Polar Metabolites CD (Jun14) **"
+ ]
+ ],
+ "Liver Proteome": [
[
- "EPFLBXDprotCDRPN0513",
- "EPFL/LISP BXD Liver, Hepatocytes, Soluable Proteins CD (May13) RPN **"
+ "EPFLETHZBXDprotHFD0514",
+ "EPFL/ETHZ BXD Liver, Soluble Proteins HFD (May14) SWATH **"
],
[
- "EPFLBXDprot0513",
- "EPFL/LISP BXD Liver, Hepatocytes, Soluable Proteins CD+HFD (May13) **"
+ "EPFLETHZBXDprotCD0514",
+ "EPFL/ETHZ BXD Liver, Soluble Proteins CD (May14) SWATH **"
],
[
- "EPFLBXDprotHFD0513",
- "EPFL/LISP BXD Liver, Hepatocytes, Soluable Proteins HFD (May13) **"
+ "EPFLBXDprotHFDRPN0214",
+ "EPFL/LISP BXD Liver, Soluble Proteins HFD (Feb14) SRM **"
],
[
- "EPFLBXDprotCD0513",
- "EPFL/LISP BXD Liver, Hepatocytes, Soluable Proteins CD (May13) **"
+ "EPFLBXDprotCDRPN0214",
+ "EPFL/LISP BXD Liver, Soluble Proteins CD (Feb14) SRM **"
]
],
"Liver mRNA": [
@@ -1354,16 +2010,20 @@
"GSE16780 UCLA Hybrid MDP Liver Affy HT M430A (Sep11) RMA"
],
[
+ "SUH_Liv_RMA_0611",
+ "SUH BXD Liver CCl4-treated Affy Mouse Gene 1.0 ST (Jun11) RMA"
+ ],
+ [
"EPFLMouseLiverRMA0413",
- "EPFL/LISP BXD CD+HFD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA **"
+ "EPFL/LISP BXD CD+HFD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA"
],
[
"EPFLMouseLiverHFDRMA0413",
- "EPFL/LISP BXD HFD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA **"
+ "EPFL/LISP BXD HFD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA"
],
[
"EPFLMouseLiverCDRMA0413",
- "EPFL/LISP BXD CD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA **"
+ "EPFL/LISP BXD CD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA"
],
[
"EPFLMouseLiverBothExRMA0413",
@@ -1404,10 +2064,6 @@
[
"GenEx_BXD_liverSal_RMA_F_0211",
"GenEx BXD Sal Liver Affy M430 2.0 (Feb11) RMA Females **"
- ],
- [
- "SUH_Liv_RMA_0611",
- "SUH BXD Liver Affy Mouse Gene 1.0 ST (Jun11) RMA **"
]
],
"Lung mRNA": [
@@ -1420,56 +2076,70 @@
"HZI Lung M430v2 (Apr08) MAS5"
],
[
- "HZI_LTCF_0313",
- "HZI Lung Time Course Flu PR8M (Mar13) Schughart **"
+ "HZI_PR8M-F_1113",
+ "HZI PR8M-Infected Lungs Females RNAseq (Nov13) RPKM **"
],
[
"HZI_PR8M_Q_0612",
"HZI PR8M-Infected Lungs Agilent4x44 (Apr12) Quantile Females **"
+ ],
+ [
+ "HZI_LTCF_0313",
+ "HZI Lung Time Course Flu PR8M (Mar13) Schughart **"
]
],
"Midbrain mRNA": [
[
"VUBXDMouseMidBrainQ0512",
- "VU BXD Midbrain Agilent SurePrint G3 Mouse GE (May12) Quantile **"
+ "VU BXD Midbrain Agilent SurePrint G3 Mouse GE (May12) Quantile"
+ ]
+ ],
+ "Muscle Metabolome": [
+ [
+ "EPFL-LISP_MusPMetHFD1213",
+ "EPFL/LISP BXD Muscle Polar Metabolites HFD (Jun14) **"
+ ],
+ [
+ "EPFL-LISP_MusPMetCD1213",
+ "EPFL/LISP BXD Muscle Polar Metabolites CD (Jun14) **"
]
],
"Muscle mRNA": [
[
"EPFLMouseMuscleRMA_Ex1112",
- "EPFL/LISP BXD CD+HFD Muscle Affy Mouse Gene 1.0 ST (Nov12) RMA Exon Level **"
+ "EPFL/LISP BXD CD+HFD Muscle Affy Mouse Gene 1.0 ST (Nov12) RMA Exon Level"
],
[
"EPFLMouseMuscleHFDRMAEx1112",
- "EPFL/LISP BXD HFD Muscle Affy Mouse Gene 1.0 ST (Nov12) RMA Exon Level **"
+ "EPFL/LISP BXD HFD Muscle Affy Mouse Gene 1.0 ST (Nov12) RMA Exon Level"
],
[
"EPFLMouseMuscleCDRMAEx1112",
- "EPFL/LISP BXD CD Muscle Affy Mouse Gene 1.0 ST (Nov12) RMA Exon Level **"
+ "EPFL/LISP BXD CD Muscle Affy Mouse Gene 1.0 ST (Nov12) RMA Exon Level"
],
[
"EPFLMouseMuscleRMA1211",
- "EPFL/LISP BXD CD+HFD Muscle Affy Mouse Gene 1.0 ST (Dec11) RMA **"
+ "EPFL/LISP BXD CD+HFD Muscle Affy Mouse Gene 1.0 ST (Dec11) RMA"
],
[
"EPFLMouseMuscleHFDRMA1211",
- "EPFL/LISP BXD HFD Muscle Affy Mouse Gene 1.0 ST (Dec11) RMA **"
+ "EPFL/LISP BXD HFD Muscle Affy Mouse Gene 1.0 ST (Dec11) RMA"
],
[
"EPFLMouseMuscleCDRMA1211",
- "EPFL/LISP BXD CD Muscle Affy Mouse Gene 1.0 ST (Dec11) RMA **"
+ "EPFL/LISP BXD CD Muscle Affy Mouse Gene 1.0 ST (Dec11) RMA"
]
],
"Neocortex mRNA": [
[
- "DevNeocortex_ILM6.2P3RInv_1111",
- "BIDMC/UTHSC Dev Neocortex P3 ILMv6.2 (Nov11) RankInv"
- ],
- [
"DevNeocortex_ILM6.2P14RInv_1111",
"BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov11) RankInv"
],
[
+ "DevNeocortex_ILM6.2P3RInv_1111",
+ "BIDMC/UTHSC Dev Neocortex P3 ILMv6.2 (Nov11) RankInv"
+ ],
+ [
"HQFNeoc_1210v2_RankInv",
"HQF BXD Neocortex ILM6v1.1 (Dec10v2) RankInv"
],
@@ -1482,38 +2152,38 @@
"HQF BXD Neocortex ILM6v1.1 (Feb08) RankInv"
],
[
- "DevNeocortex_ILM6.2P14RInv_1110",
- "BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov10) RankInv"
- ],
- [
"DevNeocortex_ILM6.2P3RInv_1110",
"BIDMC/UTHSC Dev Neocortex P3 ILMv6.2 (Nov10) RankInv"
+ ],
+ [
+ "DevNeocortex_ILM6.2P14RInv_1110",
+ "BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov10) RankInv"
]
],
"Nucleus Accumbens mRNA": [
[
"VCUSalo_1007_R",
- "VCU BXD NA Sal M430 2.0 (Oct07) RMA"
+ "VCU BXD NAc Sal M430 2.0 (Oct07) RMA"
],
[
- "VCU_NAc_AvE_0113_Ss",
- "VCU BXD NAc EtOH vs CIE Air M430 2.0 (Jan13) Sscore **"
+ "VCUEtOH_1007_R",
+ "VCU BXD NAc EtOH M430 2.0 (Oct07) RMA **"
],
[
- "VCU_NAc_Et_0113_R",
- "VCU BXD NAc CIE EtOH M430 2.0 (Jan13) RMA **"
+ "VCUSal_1007_R",
+ "VCU BXD NAc EtOH vs Sal M430 2.0 (Oct07) Sscore **"
],
[
"VCU_NAc_Air_0113_R",
"VCU BXD NAc CIE Air M430 2.0 (Jan13) RMA **"
],
[
- "VCUEtOH_1007_R",
- "VCU BXD NA EtOH M430 2.0 (Oct07) RMA **"
+ "VCU_NAc_Et_0113_R",
+ "VCU BXD NAc CIE EtOH M430 2.0 (Jan13) RMA **"
],
[
- "VCUSal_1007_R",
- "VCU BXD NA Et vs Sal M430 2.0 (Oct07) Sscore **"
+ "VCU_NAc_AvE_0113_Ss",
+ "VCU BXD NAc EtOH vs CIE Air M430 2.0 (Jan13) Sscore **"
]
],
"Phenotypes": [
@@ -1586,24 +2256,40 @@
"ONC HEI Retina (April 2012) RankInv"
],
[
+ "DoDTATRCRetMoGene2_1313",
+ "DoD TATRC Retina Affy MoGene 2.0 ST (Dec13) RMA"
+ ],
+ [
+ "DoDTATRCRetExMoGene2_1313",
+ "DoD TATRC Retina Affy MoGene 2.0 ST (Dec13) RMA Exon Level"
+ ],
+ [
"ONCRetMoGene2_0413",
- "DoD TATRC Retina Affy MoGene 2.0 ST (Apr13) RMA **"
+ "DoD TATRC Retina Affy MoGene 2.0 ST (Oct13) RMA **"
],
[
"ONCRetExMoGene2_0413",
- "DoD TATRC Retina Affy MoGene 2.0 ST (Apr13) RMA Exon Level **"
+ "DoD TATRC Retina Affy MoGene 2.0 ST (Oct13) RMA Exon Level **"
],
[
- "B6D2ONCILM_0412",
- "B6D2 ONC Retina (April 2012) RankInv **"
+ "DoDTATRCRetBLMoGene2_1213",
+ "DoD TATRC Retina Blast Affy MoGene 2.0 ST (Dec13) RMA **"
],
[
- "G2HEIONCRetILM6_0911",
- "G2 HEI ONC Retina Illumina V6.2 (Sep11) RankInv **"
+ "DoDTATRCRetBLExMoGene2_1213",
+ "DoD TATRC Retina Blast Affy MoGene 2.0 ST (Dec13) RMA Exon Level **"
+ ],
+ [
+ "B6D2ONCILM_0412",
+ "B6D2 ONC Retina (April 2012) RankInv **"
],
[
"HEIONCvsCRetILM6_0911",
"HEI ONC vs Control Retina Illumina V6.2 (Sep11) RankInv **"
+ ],
+ [
+ "G2HEIONCRetILM6_0911",
+ "G2 HEI ONC Retina Illumina V6.2 (Sep11) RankInv **"
]
],
"Spleen mRNA": [
@@ -1690,12 +2376,12 @@
"BIDMC/UTHSC Dev Striatum P14 ILMv6.2 (Nov11) RankInv **"
],
[
- "DevStriatum_ILM6.2P3RInv_1110",
- "BIDMC/UTHSC Dev Striatum P3 ILMv6.2 (Nov10) RankInv **"
- ],
- [
"DevStriatum_ILM6.2P14RInv_1110",
"BIDMC/UTHSC Dev Striatum P14 ILMv6.2 (Nov10) RankInv **"
+ ],
+ [
+ "DevStriatum_ILM6.2P3RInv_1110",
+ "BIDMC/UTHSC Dev Striatum P3 ILMv6.2 (Nov10) RankInv **"
]
],
"T Cell (helper) mRNA": [
@@ -1718,16 +2404,16 @@
],
"Ventral Tegmental Area mRNA": [
[
+ "VCUEtOH_0609_R",
+ "VCU BXD VTA EtOH M430 2.0 (Jun09) RMA **"
+ ],
+ [
"VCUSal_0609_R",
"VCU BXD VTA Sal M430 2.0 (Jun09) RMA **"
],
[
"VCUEtvsSal_0609_R",
"VCU BXD VTA Et vs Sal M430 2.0 (Jun09) Sscore **"
- ],
- [
- "VCUEtOH_0609_R",
- "VCU BXD VTA EtOH M430 2.0 (Jun09) RMA **"
]
]
},
@@ -1806,12 +2492,12 @@
"UCLA CTB6/B6CTF2 Brain (2005) mlratio"
],
[
- "UCLA_CTB6B6CTF2_BRAIN_FEMALE",
- "UCLA CTB6B6CTF2 Brain Female mlratio **"
+ "UCLA_CTB6B6CTF2_BRAIN_MALE",
+ "UCLA CTB6/B6CTF2 Brain Males (2005) mlratio"
],
[
- "UCLA_CTB6B6CTF2_BRAIN_MALE",
- "UCLA CTB6B6CTF2 Brain Male mlratio **"
+ "UCLA_CTB6B6CTF2_BRAIN_FEMALE",
+ "UCLA CTB6/B6CTF2 Brain Females (2005) mlratio"
]
],
"Genotypes": [
@@ -1864,12 +2550,12 @@
],
"Hippocampus mRNA": [
[
- "HC_M2CB_1205_P",
- "Hippocampus Consortium M430v2 CXB (Dec05) PDNN"
- ],
- [
"HC_M2CB_1205_R",
"Hippocampus Consortium M430v2 CXB (Dec05) RMA"
+ ],
+ [
+ "HC_M2CB_1205_P",
+ "Hippocampus Consortium M430v2 CXB (Dec05) PDNN"
]
],
"Phenotypes": [
@@ -1974,6 +2660,14 @@
"Hippocampus Illumina (May07) RankInv"
],
[
+ "Illum_LXS_Hipp_NON_1008",
+ "Hippocampus Illumina NON (Oct08) RankInv beta"
+ ],
+ [
+ "Illum_LXS_Hipp_RSE_1008",
+ "Hippocampus Illumina RSE (Oct08) RankInv beta"
+ ],
+ [
"Illum_LXS_Hipp_NOE_1008",
"Hippocampus Illumina NOE (Oct08) RankInv beta"
],
@@ -1984,14 +2678,6 @@
[
"Illum_LXS_Hipp_NOS_1008",
"Hippocampus Illumina NOS (Oct08) RankInv beta"
- ],
- [
- "Illum_LXS_Hipp_NON_1008",
- "Hippocampus Illumina NON (Oct08) RankInv beta"
- ],
- [
- "Illum_LXS_Hipp_RSE_1008",
- "Hippocampus Illumina RSE (Oct08) RankInv beta"
]
],
"Phenotypes": [
@@ -2002,16 +2688,30 @@
],
"Prefrontal Cortex mRNA": [
[
+ "VCUEtOH_0806_R",
+ "VCU LXS PFC EtOH M430A 2.0 (Aug06) RMA **"
+ ],
+ [
"VCUSal_0806_R",
"VCU LXS PFC Sal M430A 2.0 (Aug06) RMA"
],
[
"VCUEt_vs_Sal_0806_R",
"VCU LXS PFC Et vs Sal M430A 2.0 (Aug06) Sscore **"
- ],
+ ]
+ ]
+ },
+ "Linsenbardt-Boehm": {
+ "Genotypes": [
[
- "VCUEtOH_0806_R",
- "VCU LXS PFC EtOH M430A 2.0 (Aug06) RMA **"
+ "Linsenbardt-BoehmGeno",
+ "Linsenbardt-Boehm Genotypes"
+ ]
+ ],
+ "Phenotypes": [
+ [
+ "Linsenbardt-BoehmPublish",
+ "Linsenbardt-Boehm Published Phenotypes"
]
]
},
@@ -2025,7 +2725,7 @@
"Dorsal Root Ganglia mRNA": [
[
"TSRI-DRG-AffyMOE430_0113-MDP",
- "TSRI DRG Affy Mouse Genome 430 2.0 (Jan13) RMA MDP **"
+ "TSRI DRG Affy Mouse Genome 430 2.0 (Jan13) RMA MDP"
]
],
"Genotypes": [
@@ -2036,12 +2736,12 @@
],
"Hippocampus mRNA": [
[
- "HC_M2_0606_MDP",
- "Hippocampus Consortium M430v2 (Jun06) RMA MDP"
- ],
- [
"UMUTAffyExon_0209_RMA_MDP",
"UMUTAffy Hippocampus Exon (Feb09) RMA MDP"
+ ],
+ [
+ "HC_M2_0606_MDP",
+ "Hippocampus Consortium M430v2 (Jun06) RMA MDP"
]
],
"Liver mRNA": [
@@ -2231,6 +2931,20 @@
}
},
"soybean": {
+ "J12XJ58F11": {
+ "Genotypes": [
+ [
+ "J12XJ58F11Geno",
+ "J12XJ58F11 Genotypes"
+ ]
+ ],
+ "Phenotypes": [
+ [
+ "J12XJ58F11Publish",
+ "J12XJ58F11 Published Phenotypes"
+ ]
+ ]
+ },
"J12XJ58F2": {
"Genotypes": [
[
@@ -2307,35 +3021,51 @@
"human": [
[
"AD-cases-controls",
- "Alzheimer's Disease Brain (Liang)"
+ "Brain, Aging: AD, Normal Gene Expression (Liang)"
],
[
"AD-cases-controls-Myers",
- "Alzheimer's Disease Brain (Myers)"
+ "Brain, Aging: AD, Normal Gene Expression with Genotypes (Myers)"
+ ],
+ [
+ "Aging-Brain-UCI",
+ "Brain, Aging: Normal Gene Expression (UCI/Cotman)"
+ ],
+ [
+ "Brain-Normal-NIH-Gibbs",
+ "Brain: Normal Gene Expression (NIH/Gibbs)"
],
[
"CANDLE",
- "CANDLE Cognitive Development (TUCI)"
+ "Child Development: CANDLE Cohort with Genotypes (TUCI/UTHSC)"
],
[
"CEPH-2004",
- "CEPH Families Cell Lines"
+ "Lymphoblastoid Cells: Gene Expression (CEPH, Williams)"
+ ],
+ [
+ "GTEx",
+ "All Tissues, RNA-Seq GTEx v3"
],
[
"HB",
- "Harvard Brain Tissue Resource Center"
+ "Brain, Aging: AD, HD, Normal Gene Expression (Harvard/Merck)"
+ ],
+ [
+ "HCP",
+ "Brain, Cognition, Human Connectome Project"
],
[
"HLC",
- "Human Liver Cohort (Merck)"
+ "Liver: Normal Gene Expression with Genotypes (Merck)"
],
[
"HLT",
- "Human Lung Transcriptome (Rosetta/Merck)"
+ "Lung: Normal Gene Expression (Merck)"
],
[
"HSB",
- "Human Brain Transcriptome (Yale/Kavli)"
+ "Brain, Development: Normal Gene Expression (Yale/Sestan)"
]
],
"macaque monkey": [
@@ -2395,7 +3125,7 @@
],
[
"C57BL-6JxC57BL-6NJF2",
- "C57BL/6JxC57BL/6NJ F2 Cross"
+ "Reduced Complexity Cross (B6JxB6N F2)"
],
[
"CTB6F2",
@@ -2414,6 +3144,10 @@
"Heterogeneous Stock Collaborative Cross"
],
[
+ "Linsenbardt-Boehm",
+ "B6D2 EtOH Selected Advanced Intercross"
+ ],
+ [
"LXS",
"LXS"
],
@@ -2450,6 +3184,10 @@
],
"soybean": [
[
+ "J12XJ58F11",
+ "J12XJ58F11"
+ ],
+ [
"J12XJ58F2",
"J12XJ58F2"
]
@@ -2637,6 +3375,58 @@
"Brain mRNA"
]
],
+ "Aging-Brain-UCI": [
+ [
+ "Phenotypes",
+ "Phenotypes"
+ ],
+ [
+ "Genotypes",
+ "Genotypes"
+ ],
+ [
+ "Entorhinal Cortex mRNA",
+ "Entorhinal Cortex mRNA"
+ ],
+ [
+ "Hippocampus mRNA",
+ "Hippocampus mRNA"
+ ],
+ [
+ "Postcentral Gyrus mRNA",
+ "Postcentral Gyrus mRNA"
+ ],
+ [
+ "Superior Frontal Gyrus mRNA",
+ "Superior Frontal Gyrus mRNA"
+ ]
+ ],
+ "Brain-Normal-NIH-Gibbs": [
+ [
+ "Phenotypes",
+ "Phenotypes"
+ ],
+ [
+ "Genotypes",
+ "Genotypes"
+ ],
+ [
+ "Cerebellum mRNA",
+ "Cerebellum mRNA"
+ ],
+ [
+ "Pons mRNA",
+ "Pons mRNA"
+ ],
+ [
+ "Prefrontal Cortex mRNA",
+ "Prefrontal Cortex mRNA"
+ ],
+ [
+ "Temporal Cerebral Wall mRNA",
+ "Temporal Cerebral Wall mRNA"
+ ]
+ ],
"CANDLE": [
[
"Phenotypes",
@@ -2669,6 +3459,204 @@
"Lymphoblast B-cell mRNA"
]
],
+ "GTEx": [
+ [
+ "Phenotypes",
+ "Phenotypes"
+ ],
+ [
+ "Genotypes",
+ "Genotypes"
+ ],
+ [
+ "Adrenal Gland mRNA",
+ "Adrenal Gland mRNA"
+ ],
+ [
+ "Amygdala mRNA",
+ "Amygdala mRNA"
+ ],
+ [
+ "Anterior Cingulate Cortex mRNA",
+ "Anterior Cingulate Cortex mRNA"
+ ],
+ [
+ "Aorta mRNA",
+ "Aorta mRNA"
+ ],
+ [
+ "Blood, Cells - EBV-Transformed Lymphocytes mRNA",
+ "Blood, Cells - EBV-Transformed Lymphocytes mRNA"
+ ],
+ [
+ "Breast - Mammary Tissue mRNA",
+ "Breast - Mammary Tissue mRNA"
+ ],
+ [
+ "Caudate mRNA",
+ "Caudate mRNA"
+ ],
+ [
+ "Cells - EBV-Transformed Lymphocytes mRNA",
+ "Cells - EBV-Transformed Lymphocytes mRNA"
+ ],
+ [
+ "Cells - Leukemia Cell Line (CML) mRNA",
+ "Cells - Leukemia Cell Line (CML) mRNA"
+ ],
+ [
+ "Cells - Transformed Fibroblasts mRNA",
+ "Cells - Transformed Fibroblasts mRNA"
+ ],
+ [
+ "Cerebellar Cortex mRNA",
+ "Cerebellar Cortex mRNA"
+ ],
+ [
+ "Cerebellar Hemisphere mRNA",
+ "Cerebellar Hemisphere mRNA"
+ ],
+ [
+ "Cerebellum mRNA",
+ "Cerebellum mRNA"
+ ],
+ [
+ "Colon - Transverse mRNA",
+ "Colon - Transverse mRNA"
+ ],
+ [
+ "Coronary mRNA",
+ "Coronary mRNA"
+ ],
+ [
+ "Esophagus - Mucosa mRNA",
+ "Esophagus - Mucosa mRNA"
+ ],
+ [
+ "Esophagus - Muscularis mRNA",
+ "Esophagus - Muscularis mRNA"
+ ],
+ [
+ "Fallopian Tube mRNA",
+ "Fallopian Tube mRNA"
+ ],
+ [
+ "Frontal Cortex mRNA",
+ "Frontal Cortex mRNA"
+ ],
+ [
+ "Heart - Atrial Appendage mRNA",
+ "Heart - Atrial Appendage mRNA"
+ ],
+ [
+ "Heart - Left Ventricle mRNA",
+ "Heart - Left Ventricle mRNA"
+ ],
+ [
+ "Hippocampus mRNA",
+ "Hippocampus mRNA"
+ ],
+ [
+ "Hypothalamus mRNA",
+ "Hypothalamus mRNA"
+ ],
+ [
+ "Kidney mRNA",
+ "Kidney mRNA"
+ ],
+ [
+ "Liver mRNA",
+ "Liver mRNA"
+ ],
+ [
+ "Lung mRNA",
+ "Lung mRNA"
+ ],
+ [
+ "Muscle mRNA",
+ "Muscle mRNA"
+ ],
+ [
+ "Nerve - Tibial mRNA",
+ "Nerve - Tibial mRNA"
+ ],
+ [
+ "Nucleus Accumbens mRNA",
+ "Nucleus Accumbens mRNA"
+ ],
+ [
+ "Ovary mRNA",
+ "Ovary mRNA"
+ ],
+ [
+ "Pancreas mRNA",
+ "Pancreas mRNA"
+ ],
+ [
+ "Pituitary Gland mRNA",
+ "Pituitary Gland mRNA"
+ ],
+ [
+ "Prostate mRNA",
+ "Prostate mRNA"
+ ],
+ [
+ "Putamen mRNA",
+ "Putamen mRNA"
+ ],
+ [
+ "Skin - Not Sun Exposed (Suprapubic) mRNA",
+ "Skin - Not Sun Exposed (Suprapubic) mRNA"
+ ],
+ [
+ "Skin - Sun Exposed (Lower leg) mRNA",
+ "Skin - Sun Exposed (Lower leg) mRNA"
+ ],
+ [
+ "Spinal Cord mRNA",
+ "Spinal Cord mRNA"
+ ],
+ [
+ "Stomach mRNA",
+ "Stomach mRNA"
+ ],
+ [
+ "Subcutaneous mRNA",
+ "Subcutaneous mRNA"
+ ],
+ [
+ "Substantia Nigra mRNA",
+ "Substantia Nigra mRNA"
+ ],
+ [
+ "Testis mRNA",
+ "Testis mRNA"
+ ],
+ [
+ "Thyroid mRNA",
+ "Thyroid mRNA"
+ ],
+ [
+ "Tibial mRNA",
+ "Tibial mRNA"
+ ],
+ [
+ "Uterus mRNA",
+ "Uterus mRNA"
+ ],
+ [
+ "Vagina mRNA",
+ "Vagina mRNA"
+ ],
+ [
+ "Visceral mRNA",
+ "Visceral mRNA"
+ ],
+ [
+ "Whole Blood mRNA",
+ "Whole Blood mRNA"
+ ]
+ ],
"HB": [
[
"Phenotypes",
@@ -2691,6 +3679,16 @@
"Primary Visual Cortex mRNA"
]
],
+ "HCP": [
+ [
+ "Phenotypes",
+ "Phenotypes"
+ ],
+ [
+ "Genotypes",
+ "Genotypes"
+ ]
+ ],
"HLC": [
[
"Phenotypes",
@@ -3013,6 +4011,10 @@
"Genotypes"
],
[
+ "Adipose mRNA",
+ "Adipose mRNA"
+ ],
+ [
"Adrenal Gland mRNA",
"Adrenal Gland mRNA"
],
@@ -3041,10 +4043,22 @@
"Eye mRNA"
],
[
+ "Gastrointestinal mRNA",
+ "Gastrointestinal mRNA"
+ ],
+ [
+ "Heart mRNA",
+ "Heart mRNA"
+ ],
+ [
"Hematopoietic Cells mRNA",
"Hematopoietic Cells mRNA"
],
[
+ "Hippocampus microRNA",
+ "Hippocampus microRNA"
+ ],
+ [
"Hippocampus mRNA",
"Hippocampus mRNA"
],
@@ -3061,6 +4075,10 @@
"Leucocytes mRNA"
],
[
+ "Liver Metabolome",
+ "Liver Metabolome"
+ ],
+ [
"Liver mRNA",
"Liver mRNA"
],
@@ -3077,6 +4095,10 @@
"Midbrain mRNA"
],
[
+ "Muscle Metabolome",
+ "Muscle Metabolome"
+ ],
+ [
"Muscle mRNA",
"Muscle mRNA"
],
@@ -3259,6 +4281,16 @@
"Prefrontal Cortex mRNA"
]
],
+ "Linsenbardt-Boehm": [
+ [
+ "Phenotypes",
+ "Phenotypes"
+ ],
+ [
+ "Genotypes",
+ "Genotypes"
+ ]
+ ],
"MDP": [
[
"Phenotypes",
@@ -3385,6 +4417,16 @@
]
},
"soybean": {
+ "J12XJ58F11": [
+ [
+ "Phenotypes",
+ "Phenotypes"
+ ],
+ [
+ "Genotypes",
+ "Genotypes"
+ ]
+ ],
"J12XJ58F2": [
[
"Phenotypes",
diff --git a/wqflask/wqflask/static/new/javascript/get_traits_from_collection.coffee b/wqflask/wqflask/static/new/javascript/get_traits_from_collection.coffee
index 691eb798..78d69f7a 100755
--- a/wqflask/wqflask/static/new/javascript/get_traits_from_collection.coffee
+++ b/wqflask/wqflask/static/new/javascript/get_traits_from_collection.coffee
@@ -5,6 +5,8 @@ console.log("before get_traits_from_collection")
collection_list = null
this_trait_data = null
+selected_traits = {}
+
collection_click = () ->
console.log("Clicking on:", $(this))
this_collection_url = $(this).find('.collection_name').prop("href")
@@ -17,10 +19,52 @@ collection_click = () ->
success: process_traits
)
+submit_click = () ->
+
+ selected_traits = {}
+
+ traits = []
+ $('#collections_holder').find('input[type=checkbox]:checked').each ->
+ this_trait = $(@).parents('tr').find('.trait').text()
+ console.log("this_trait is:", this_trait)
+ this_dataset = $(@).parents('tr').find('.dataset').text()
+ console.log("this_dataset is:", this_dataset)
+ this_trait_url = "/trait/get_sample_data?trait="+this_trait+"&dataset="+this_dataset
+ $.ajax(
+ dataType: "json",
+ url: this_trait_url,
+ async: false,
+ success: add_trait_data
+ )
+
+ console.log("SELECTED_TRAITS IS:", selected_traits)
+
+ trait_names = []
+ samples = $('input[name=allsamples]').val().split(" ")
+ all_vals = []
+
+ this_trait_vals = get_this_trait_vals(samples)
+ all_vals.push(this_trait_vals)
+
+ for trait in Object.keys(selected_traits)
+ trait_names.push(trait)
+
+ this_trait_vals = []
+ for sample in samples
+ if sample in Object.keys(selected_traits[trait])
+ this_trait_vals.push(parseFloat(selected_traits[trait][sample]))
+ else
+ this_trait_vals.push(null)
+ all_vals.push(this_trait_vals)
+
+ create_scatterplots(trait_names, samples, all_vals)
+
+ $.colorbox.close()
+
trait_click = () ->
console.log("Clicking on:", $(this))
- trait = $(this).find('.trait').text()
- dataset = $(this).find('.dataset').text()
+ trait = $(this).parent().find('.trait').text()
+ dataset = $(this).parent().find('.dataset').text()
this_trait_url = "/trait/get_sample_data?trait="+trait+"&dataset="+dataset
console.log("this_trait_url", this_trait_url)
$.ajax(
@@ -29,10 +73,18 @@ trait_click = () ->
success: get_trait_data
)
$.colorbox.close()
-
-get_trait_data = (trait_sample_data, textStatus, jqXHR) ->
- trait_list = $('input[name=compare_traits]')
- console.log("trait_list:", trait_list.val())
+
+add_trait_data = (trait_data, textStatus, jqXHR) ->
+ trait_name = trait_data[0]
+ trait_sample_data = trait_data[1]
+ selected_traits[trait_name] = trait_sample_data
+ console.log("selected_traits:", selected_traits)
+
+get_trait_data = (trait_data, textStatus, jqXHR) ->
+ #trait_list = $('input[name=compare_traits]')
+ #console.log("trait_list:", trait_list.val())
+ console.log("trait:", trait_data[0])
+ trait_sample_data = trait_data[1]
console.log("trait_sample_data:", trait_sample_data)
samples = $('input[name=allsamples]').val().split(" ")
vals = []
@@ -59,7 +111,6 @@ get_trait_data = (trait_sample_data, textStatus, jqXHR) ->
console.log("THE LENGTH IS:", $('input[name=vals]').length)
if $('input[name=vals]').length == 1
create_scatterplot(samples, [this_trait_vals, vals])
-
get_this_trait_vals = (samples) ->
@@ -99,12 +150,15 @@ process_traits = (trait_data, textStatus, jqXHR) ->
the_html = "<button id='back_to_collections' class='btn btn-inverse btn-small'>"
the_html += "<i class='icon-white icon-arrow-left'></i> Back </button>"
+ the_html += " <button id='submit' class='btn btn-primary btn-small'> Submit </button>"
the_html += "<table class='table table-hover'>"
- the_html += "<thead><tr><th>Record</th><th>Data Set</th><th>Description</th><th>Mean</th></tr></thead>"
+ the_html += "<thead><tr><th></th><th>Record</th><th>Data Set</th><th>Description</th><th>Mean</th></tr></thead>"
the_html += "<tbody>"
for trait in trait_data
- the_html += "<tr class='trait_line'><td class='trait'>#{ trait.name }</td>"
+ the_html += "<tr class='trait_line'>"
+ the_html += "<td class='select_trait'><input type='checkbox' name='selectCheck' class='checkbox edit_sample_checkbox'></td>"
+ the_html += "<td class='trait'>#{ trait.name }</td>"
the_html += "<td class='dataset'>#{ trait.dataset }</td>"
the_html += "<td>#{ trait.description }</td>"
the_html += "<td>#{ trait.mean or '&nbsp;' }</td></tr>"
@@ -125,6 +179,7 @@ $ ->
console.log("inside get_traits_from_collection")
$(document).on("click", ".collection_line", collection_click)
- $(document).on("click", ".trait_line", trait_click)
+ $(document).on("click", "#submit", submit_click)
+ $(document).on("click", ".trait", trait_click)
$(document).on("click", "#back_to_collections", back_to_collections)
diff --git a/wqflask/wqflask/static/new/javascript/get_traits_from_collection.js b/wqflask/wqflask/static/new/javascript/get_traits_from_collection.js
index 146c2619..df3eacf3 100755
--- a/wqflask/wqflask/static/new/javascript/get_traits_from_collection.js
+++ b/wqflask/wqflask/static/new/javascript/get_traits_from_collection.js
@@ -1,6 +1,6 @@
// Generated by CoffeeScript 1.6.1
(function() {
- var assemble_into_json, back_to_collections, collection_click, collection_list, color_by_trait, get_this_trait_vals, get_trait_data, process_traits, this_trait_data, trait_click,
+ var add_trait_data, assemble_into_json, back_to_collections, collection_click, collection_list, color_by_trait, get_this_trait_vals, get_trait_data, process_traits, selected_traits, submit_click, this_trait_data, trait_click,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
console.log("before get_traits_from_collection");
@@ -9,6 +9,8 @@
this_trait_data = null;
+ selected_traits = {};
+
collection_click = function() {
var this_collection_url;
console.log("Clicking on:", $(this));
@@ -23,11 +25,54 @@
});
};
+ submit_click = function() {
+ var all_vals, sample, samples, this_trait_vals, trait, trait_names, traits, _i, _j, _len, _len1, _ref;
+ selected_traits = {};
+ traits = [];
+ $('#collections_holder').find('input[type=checkbox]:checked').each(function() {
+ var this_dataset, this_trait, this_trait_url;
+ this_trait = $(this).parents('tr').find('.trait').text();
+ console.log("this_trait is:", this_trait);
+ this_dataset = $(this).parents('tr').find('.dataset').text();
+ console.log("this_dataset is:", this_dataset);
+ this_trait_url = "/trait/get_sample_data?trait=" + this_trait + "&dataset=" + this_dataset;
+ return $.ajax({
+ dataType: "json",
+ url: this_trait_url,
+ async: false,
+ success: add_trait_data
+ });
+ });
+ console.log("SELECTED_TRAITS IS:", selected_traits);
+ trait_names = [];
+ samples = $('input[name=allsamples]').val().split(" ");
+ all_vals = [];
+ this_trait_vals = get_this_trait_vals(samples);
+ all_vals.push(this_trait_vals);
+ _ref = Object.keys(selected_traits);
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ trait = _ref[_i];
+ trait_names.push(trait);
+ this_trait_vals = [];
+ for (_j = 0, _len1 = samples.length; _j < _len1; _j++) {
+ sample = samples[_j];
+ if (__indexOf.call(Object.keys(selected_traits[trait]), sample) >= 0) {
+ this_trait_vals.push(parseFloat(selected_traits[trait][sample]));
+ } else {
+ this_trait_vals.push(null);
+ }
+ }
+ all_vals.push(this_trait_vals);
+ }
+ create_scatterplots(trait_names, samples, all_vals);
+ return $.colorbox.close();
+ };
+
trait_click = function() {
var dataset, this_trait_url, trait;
console.log("Clicking on:", $(this));
- trait = $(this).find('.trait').text();
- dataset = $(this).find('.dataset').text();
+ trait = $(this).parent().find('.trait').text();
+ dataset = $(this).parent().find('.dataset').text();
this_trait_url = "/trait/get_sample_data?trait=" + trait + "&dataset=" + dataset;
console.log("this_trait_url", this_trait_url);
return $.ajax({
@@ -39,10 +84,18 @@
$.colorbox.close();
- get_trait_data = function(trait_sample_data, textStatus, jqXHR) {
- var sample, samples, this_trait_vals, trait_list, vals, _i, _len;
- trait_list = $('input[name=compare_traits]');
- console.log("trait_list:", trait_list.val());
+ add_trait_data = function(trait_data, textStatus, jqXHR) {
+ var trait_name, trait_sample_data;
+ trait_name = trait_data[0];
+ trait_sample_data = trait_data[1];
+ selected_traits[trait_name] = trait_sample_data;
+ return console.log("selected_traits:", selected_traits);
+ };
+
+ get_trait_data = function(trait_data, textStatus, jqXHR) {
+ var sample, samples, this_trait_vals, trait_sample_data, vals, _i, _len;
+ console.log("trait:", trait_data[0]);
+ trait_sample_data = trait_data[1];
console.log("trait_sample_data:", trait_sample_data);
samples = $('input[name=allsamples]').val().split(" ");
vals = [];
@@ -105,12 +158,15 @@
console.log('in process_traits with trait_data:', trait_data);
the_html = "<button id='back_to_collections' class='btn btn-inverse btn-small'>";
the_html += "<i class='icon-white icon-arrow-left'></i> Back </button>";
+ the_html += " <button id='submit' class='btn btn-primary btn-small'> Submit </button>";
the_html += "<table class='table table-hover'>";
- the_html += "<thead><tr><th>Record</th><th>Data Set</th><th>Description</th><th>Mean</th></tr></thead>";
+ the_html += "<thead><tr><th></th><th>Record</th><th>Data Set</th><th>Description</th><th>Mean</th></tr></thead>";
the_html += "<tbody>";
for (_i = 0, _len = trait_data.length; _i < _len; _i++) {
trait = trait_data[_i];
- the_html += "<tr class='trait_line'><td class='trait'>" + trait.name + "</td>";
+ the_html += "<tr class='trait_line'>";
+ the_html += "<td class='select_trait'><input type='checkbox' name='selectCheck' class='checkbox edit_sample_checkbox'></td>";
+ the_html += "<td class='trait'>" + trait.name + "</td>";
the_html += "<td class='dataset'>" + trait.dataset + "</td>";
the_html += "<td>" + trait.description + "</td>";
the_html += "<td>" + (trait.mean || '&nbsp;') + "</td></tr>";
@@ -131,7 +187,8 @@
$(function() {
console.log("inside get_traits_from_collection");
$(document).on("click", ".collection_line", collection_click);
- $(document).on("click", ".trait_line", trait_click);
+ $(document).on("click", "#submit", submit_click);
+ $(document).on("click", ".trait", trait_click);
return $(document).on("click", "#back_to_collections", back_to_collections);
});
diff --git a/wqflask/wqflask/static/new/javascript/lod_chart.coffee b/wqflask/wqflask/static/new/javascript/lod_chart.coffee
index 41e9c311..38325e60 100644
--- a/wqflask/wqflask/static/new/javascript/lod_chart.coffee
+++ b/wqflask/wqflask/static/new/javascript/lod_chart.coffee
@@ -156,7 +156,7 @@ lodchart = () ->
.attr("transform", if rotate_ylab then "rotate(270,#{margin.left-axispos.ytitle},#{margin.top+height/2})" else "")
if data['additive'].length > 0
- rotate_additive_ylab = rotate_additive_ylab ? (additive_ylab.length > 1)
+ rotate_additive_ylab = rotate_additive_ylab ? (additive_ylab.length > 1)
additive_yaxis = g.append("g").attr("class", "y axis")
additive_yaxis.selectAll("empty")
.data(additive_yticks)
@@ -343,11 +343,11 @@ lodchart = () ->
ylim = value
chart
- if data['additive'].length > 0
- chart.additive_ylim = (value) ->
- return additive_ylim unless arguments.length
- additive_ylim = value
- chart
+ #if data['additive'].length > 0
+ chart.additive_ylim = (value) ->
+ return additive_ylim unless arguments.length
+ additive_ylim = value
+ chart
chart.nyticks = (value) ->
return nyticks unless arguments.length
@@ -437,9 +437,9 @@ lodchart = () ->
chart.yscale = () ->
return yscale
- if data['additive'].length > 0
- chart.additive_yscale = () ->
- return additive_yscale
+ #if data['additive'].length > 0
+ chart.additive_yscale = () ->
+ return additive_yscale
chart.xscale = () ->
return xscale
@@ -447,9 +447,9 @@ lodchart = () ->
chart.lodcurve = () ->
return lodcurve
- if data['additive'].length > 0
- chart.additivecurve = () ->
- return additivecurve
+ #if data['additive'].length > 0
+ chart.additivecurve = () ->
+ return additivecurve
chart.markerSelect = () ->
return markerSelect
diff --git a/wqflask/wqflask/static/new/javascript/lod_chart.js b/wqflask/wqflask/static/new/javascript/lod_chart.js
index 14aff1a7..0938cf06 100644
--- a/wqflask/wqflask/static/new/javascript/lod_chart.js
+++ b/wqflask/wqflask/static/new/javascript/lod_chart.js
@@ -77,7 +77,9 @@
return _results;
})();
ylim = ylim != null ? ylim : [0, d3.max(data[lodvarname])];
- additive_ylim = additive_ylim != null ? additive_ylim : [0, d3.max(data['additive'])];
+ if (data['additive'].length > 0) {
+ additive_ylim = additive_ylim != null ? additive_ylim : [0, d3.max(data['additive'])];
+ }
lodvarnum = data.lodnames.indexOf(lodvarname);
svg = d3.select(this).selectAll("svg").data([data]);
gEnter = svg.enter().append("svg").append("g");
@@ -85,9 +87,13 @@
g = svg.select("g");
g.append("rect").attr("x", margin.left).attr("y", margin.top).attr("height", height).attr("width", width).attr("fill", darkrect).attr("stroke", "none");
yscale.domain(ylim).range([height + margin.top, margin.top + margin.inner]);
- additive_yscale.domain(additive_ylim).range([height + margin.top, margin.top + margin.inner + height / 2]);
+ if (data['additive'].length > 0) {
+ additive_yscale.domain(additive_ylim).range([height + margin.top, margin.top + margin.inner + height / 2]);
+ }
yticks = yticks != null ? yticks : yscale.ticks(nyticks);
- additive_yticks = additive_yticks != null ? additive_yticks : additive_yscale.ticks(nyticks);
+ if (data['additive'].length > 0) {
+ additive_yticks = additive_yticks != null ? additive_yticks : additive_yscale.ticks(nyticks);
+ }
data = reorgLodData(data, lodvarname);
data = chrscales(data, width, chrGap, margin.left, pad4heatmap);
xscale = data.xscale;
@@ -129,21 +135,23 @@
return formatAxis(yticks)(d);
});
yaxis.append("text").attr("class", "title").attr("y", margin.top + height / 2).attr("x", margin.left - axispos.ytitle).text(ylab).attr("transform", rotate_ylab ? "rotate(270," + (margin.left - axispos.ytitle) + "," + (margin.top + height / 2) + ")" : "");
- rotate_additive_ylab = rotate_additive_ylab != null ? rotate_additive_ylab : additive_ylab.length > 1;
- additive_yaxis = g.append("g").attr("class", "y axis");
- additive_yaxis.selectAll("empty").data(additive_yticks).enter().append("line").attr("y1", function(d) {
- return additive_yscale(d);
- }).attr("y2", function(d) {
- return additive_yscale(d);
- }).attr("x1", margin.left + width).attr("x2", margin.left + width - 7).attr("fill", "none").attr("stroke", "white").attr("stroke-width", 1).style("pointer-events", "none");
- additive_yaxis.selectAll("empty").data(additive_yticks).enter().append("text").attr("y", function(d) {
- return additive_yscale(d);
- }).attr("x", function(d) {
- return margin.left + width + axispos.ylabel + 20;
- }).attr("fill", "green").text(function(d) {
- return formatAxis(additive_yticks)(d);
- });
- additive_yaxis.append("text").attr("class", "title").attr("y", margin.top + 1.5 * height).attr("x", margin.left + width + axispos.ytitle).text(additive_ylab).attr("transform", rotate_additive_ylab ? "rotate(270," + (margin.left + width + axispos.ytitle) + ", " + (margin.top + height * 1.5) + ")" : "");
+ if (data['additive'].length > 0) {
+ rotate_additive_ylab = rotate_additive_ylab != null ? rotate_additive_ylab : additive_ylab.length > 1;
+ additive_yaxis = g.append("g").attr("class", "y axis");
+ additive_yaxis.selectAll("empty").data(additive_yticks).enter().append("line").attr("y1", function(d) {
+ return additive_yscale(d);
+ }).attr("y2", function(d) {
+ return additive_yscale(d);
+ }).attr("x1", margin.left + width).attr("x2", margin.left + width - 7).attr("fill", "none").attr("stroke", "white").attr("stroke-width", 1).style("pointer-events", "none");
+ additive_yaxis.selectAll("empty").data(additive_yticks).enter().append("text").attr("y", function(d) {
+ return additive_yscale(d);
+ }).attr("x", function(d) {
+ return margin.left + width + axispos.ylabel + 20;
+ }).attr("fill", "green").text(function(d) {
+ return formatAxis(additive_yticks)(d);
+ });
+ additive_yaxis.append("text").attr("class", "title").attr("y", margin.top + 1.5 * height).attr("x", margin.left + width + axispos.ytitle).text(additive_ylab).attr("transform", rotate_additive_ylab ? "rotate(270," + (margin.left + width + axispos.ytitle) + ", " + (margin.top + height * 1.5) + ")" : "");
+ }
suggestive_bar = g.append("g").attr("class", "suggestive");
suggestive_bar.selectAll("empty").data([data.suggestive]).enter().append("line").attr("y1", function(d) {
return yscale(d);
@@ -163,13 +171,15 @@
return yscale(data.lodByChr[chr][i][lodcolumn]);
});
};
- additivecurve = function(chr, lodcolumn) {
- return d3.svg.line().x(function(d) {
- return xscale[chr](d);
- }).y(function(d, i) {
- return additive_yscale(data.additiveByChr[chr][i][lodcolumn]);
- });
- };
+ if (data['additive'].length > 0) {
+ additivecurve = function(chr, lodcolumn) {
+ return d3.svg.line().x(function(d) {
+ return xscale[chr](d);
+ }).y(function(d, i) {
+ return additive_yscale(data.additiveByChr[chr][i][lodcolumn]);
+ });
+ };
+ }
curves = g.append("g").attr("id", "curves");
_ref = data.chrnames;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
@@ -434,16 +444,18 @@
if (!Array.isArray(data.lodnames)) {
data.lodnames = [data.lodnames];
}
- additiveval = (function() {
- var _k, _len2, _ref2, _results;
- _ref2 = data.lodnames;
- _results = [];
- for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
- lodcolumn = _ref2[_k];
- _results.push(data['additive'][j]);
- }
- return _results;
- })();
+ if (data['additive'].length > 0) {
+ additiveval = (function() {
+ var _k, _len2, _ref2, _results;
+ _ref2 = data.lodnames;
+ _results = [];
+ for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
+ lodcolumn = _ref2[_k];
+ _results.push(data['additive'][j]);
+ }
+ return _results;
+ })();
+ }
lodval = (function() {
var _k, _len2, _ref2, _results;
_ref2 = data.lodnames;
diff --git a/wqflask/wqflask/static/new/javascript/marker_regression.coffee b/wqflask/wqflask/static/new/javascript/marker_regression.coffee
index 8038ad9a..403ee52a 100755
--- a/wqflask/wqflask/static/new/javascript/marker_regression.coffee
+++ b/wqflask/wqflask/static/new/javascript/marker_regression.coffee
@@ -1,12 +1,17 @@
root = exports ? this
class Manhattan_Plot
- constructor: (@plot_height = 600, @plot_width = 1200) ->
+ constructor: (@height = 800, @width = 1200) ->
@qtl_results = js_data.qtl_results
console.log("qtl_results are:", @qtl_results)
@chromosomes = js_data.chromosomes
console.log("chromosomes are:", @chromosomes)
-
+
+ #For the description in the legend
+ @this_trait = js_data.this_trait
+ @data_set = js_data.data_set
+ @maf = js_data.maf #Minor allele frequency
+
@total_length = 0
@max_chr = @get_max_chr()
@@ -23,8 +28,9 @@ class Manhattan_Plot
[@chr_lengths, @cumulative_chr_lengths] = @get_chr_lengths()
# Buffer to allow for the ticks/labels to be drawn
- @x_buffer = @plot_width/30
- @y_buffer = @plot_height/20
+ @x_buffer = @width/30
+ @y_buffer = @height/20
+ @legend_buffer = 30 #Height minus buffer for legend
#@x_max = d3.max(@x_coords)
@x_max = @total_length
@@ -40,7 +46,7 @@ class Manhattan_Plot
@plot_coordinates = _.zip(@x_coords, @y_coords, @marker_names)
console.log("coordinates:", @plot_coordinates)
- @plot_height -= @y_buffer
+ @height -= @y_buffer
@create_scales()
@@ -88,7 +94,7 @@ class Manhattan_Plot
console.log("high_qtl_count:", high_qtl_count)
#if high_qtl_count > 10000
- @y_axis_filter = 2
+ @y_axis_filter = 0
#else if high_qtl_count > 1000
# @y_axis_filter = 1
#else
@@ -132,8 +138,8 @@ class Manhattan_Plot
svg = d3.select("#manhattan_plot")
.append("svg")
.attr("class", "manhattan_plot")
- .attr("width", @plot_width+@x_buffer)
- .attr("height", @plot_height+@y_buffer)
+ .attr("width", @width+@x_buffer)
+ .attr("height", @height+@y_buffer)
.append("g")
#.call(d3.behavior.zoom().x(@x_scale).y(@y_scale).scaleExtent([1,8]).on("zoom", () ->
# @svg.selectAll("circle")
@@ -149,7 +155,8 @@ class Manhattan_Plot
#transform: (d) ->
# return "translate(" + @x_scale(d[0]) + "," + @y_scale(d[1]) + ")"
- create_graph: () ->
+ create_graph: () ->
+ @create_legend()
@add_border()
@add_x_axis()
@add_y_axis()
@@ -160,12 +167,36 @@ class Manhattan_Plot
@add_plot_points()
#@create_zoom_pane()
+
+ create_legend: () ->
+ @svg.append("text")
+ .attr("class", "legend")
+ .text("Trait: " + @this_trait + " : " + @data_set)
+ .attr("x", @x_buffer)
+ .attr("y", 20)
+ .attr("dx", "0em")
+ .attr("text-anchor", "left")
+ .attr("font-family", "sans-serif")
+ .attr("font-size", "16px")
+ .attr("fill", "black")
+
+ @svg.append("text")
+ .attr("class", "legend")
+ .text("MAF: " + @maf)
+ .attr("x", @x_buffer)
+ .attr("y", 38)
+ .attr("dx", "0em")
+ .attr("text-anchor", "left")
+ .attr("font-family", "sans-serif")
+ .attr("font-size", "16px")
+ .attr("fill", "black")
+
add_border: () ->
- border_coords = [[@y_buffer, @plot_height, @x_buffer, @x_buffer],
- [@y_buffer, @plot_height, @plot_width, @plot_width],
- [@y_buffer, @y_buffer, @x_buffer, @plot_width],
- [@plot_height, @plot_height, @x_buffer, @plot_width]]
+ border_coords = [[@y_buffer + @legend_buffer, @height, @x_buffer, @x_buffer],
+ [@y_buffer + @legend_buffer, @height, @width, @width],
+ [@y_buffer + @legend_buffer, @y_buffer + @legend_buffer, @x_buffer, @width],
+ [@height, @height, @x_buffer, @width]]
@svg.selectAll("line")
.data(border_coords)
@@ -188,7 +219,7 @@ class Manhattan_Plot
create_scales: () ->
#@x_scale = d3.scale.linear()
# .domain([0, d3.max(@x_coords)])
- # .range([@x_buffer, @plot_width])
+ # .range([@x_buffer, @width])
console.log("y_axis_filter:", @y_axis_filter)
if '24' of @chromosomes
console.log("@chromosomes[24]:", @chromosomes['24'])
@@ -197,14 +228,14 @@ class Manhattan_Plot
console.log("d3.max(@xcoords):", d3.max(@x_coords))
@x_scale = d3.scale.linear()
.domain([0, (@total_length + @chromosomes['24'])])
- .range([@x_buffer, @plot_width])
+ .range([@x_buffer, @width])
else
@x_scale = d3.scale.linear()
.domain([0, (@total_length + @chromosomes['20'])])
- .range([@x_buffer, @plot_width])
+ .range([@x_buffer, @width])
@y_scale = d3.scale.linear()
.domain([@y_axis_filter, @y_max])
- .range([@plot_height, @y_buffer])
+ .range([@height, @y_buffer + @legend_buffer])
create_x_axis_tick_values: () ->
tick_vals = []
@@ -251,7 +282,7 @@ class Manhattan_Plot
@svg.append("g")
.attr("class", "x_axis")
- .attr("transform", "translate(0," + @plot_height + ")")
+ .attr("transform", "translate(0," + @height + ")")
.call(@xAxis)
.selectAll("text")
.attr("text-anchor", "right")
@@ -275,7 +306,7 @@ class Manhattan_Plot
add_axis_labels: () ->
@svg.append("text")
.attr("transform","rotate(-90)")
- .attr("y", 0 - (@plot_height / 2))
+ .attr("y", 0 - (@height / 2))
.attr("x", @x_buffer)
.attr("dy", "1em")
.style("text-anchor", "middle")
@@ -290,8 +321,8 @@ class Manhattan_Plot
.append("line")
.attr("x1", @x_scale)
.attr("x2", @x_scale)
- .attr("y1", @y_buffer)
- .attr("y2", @plot_height)
+ .attr("y1", @y_buffer + @legend_buffer)
+ .attr("y2", @height)
.style("stroke", "#ccc")
@@ -307,7 +338,7 @@ class Manhattan_Plot
.attr("x", (d, i) =>
return @x_scale(d[1] - d[0])
)
- .attr("y", @y_buffer + 2)
+ .attr("y", @y_buffer + @legend_buffer + 2)
.attr("width", (d, i) =>
starting = @x_scale(d[1] - d[0])
ending = @x_scale(@cumulative_chr_lengths[i])
@@ -315,7 +346,7 @@ class Manhattan_Plot
console.log("width:", d[0])
return width
)
- .attr("height", @plot_height-@y_buffer-3)
+ .attr("height", @height-@y_buffer - @legend_buffer-3)
.attr("fill", (d, i) =>
if (i+1)%2
return "none"
@@ -342,7 +373,7 @@ class Manhattan_Plot
# .attr("width", (d) =>
# return @x_scale(d[0])
# )
- # .attr("height", @plot_height-@y_buffer)
+ # .attr("height", @height-@y_buffer)
# .attr("fill", (d, i) =>
# return "whitesmoke"
# #if i%2
@@ -380,7 +411,7 @@ class Manhattan_Plot
.attr("x", (d) =>
return @x_scale(d[2] - d[1]/2)
)
- .attr("y", @plot_height * 0.1)
+ .attr("y", @height * 0.1 + @legend_buffer)
.attr("dx", "0em")
.attr("text-anchor", "middle")
.attr("font-family", "sans-serif")
@@ -468,8 +499,8 @@ class Manhattan_Plot
@svg.append("rect")
.attr("class", "pane")
- .attr("width", @plot_width)
- .attr("height", @plot_height)
+ .attr("width", @width)
+ .attr("height", @height)
.call(zoom)
draw: () ->
diff --git a/wqflask/wqflask/static/new/javascript/marker_regression.js b/wqflask/wqflask/static/new/javascript/marker_regression.js
index e3c316dd..8c235189 100755
--- a/wqflask/wqflask/static/new/javascript/marker_regression.js
+++ b/wqflask/wqflask/static/new/javascript/marker_regression.js
@@ -7,14 +7,17 @@
Manhattan_Plot = (function() {
- function Manhattan_Plot(plot_height, plot_width) {
+ function Manhattan_Plot(height, width) {
var _ref;
- this.plot_height = plot_height != null ? plot_height : 600;
- this.plot_width = plot_width != null ? plot_width : 1200;
+ this.height = height != null ? height : 800;
+ this.width = width != null ? width : 1200;
this.qtl_results = js_data.qtl_results;
console.log("qtl_results are:", this.qtl_results);
this.chromosomes = js_data.chromosomes;
console.log("chromosomes are:", this.chromosomes);
+ this.this_trait = js_data.this_trait;
+ this.data_set = js_data.data_set;
+ this.maf = js_data.maf;
this.total_length = 0;
this.max_chr = this.get_max_chr();
this.x_coords = [];
@@ -27,8 +30,9 @@
console.log("@y_coords: ", this.y_coords);
console.timeEnd('Create coordinates');
_ref = this.get_chr_lengths(), this.chr_lengths = _ref[0], this.cumulative_chr_lengths = _ref[1];
- this.x_buffer = this.plot_width / 30;
- this.y_buffer = this.plot_height / 20;
+ this.x_buffer = this.width / 30;
+ this.y_buffer = this.height / 20;
+ this.legend_buffer = 30;
this.x_max = this.total_length;
console.log("@x_max: ", this.x_max);
console.log("@x_buffer: ", this.x_buffer);
@@ -37,7 +41,7 @@
console.log("svg created");
this.plot_coordinates = _.zip(this.x_coords, this.y_coords, this.marker_names);
console.log("coordinates:", this.plot_coordinates);
- this.plot_height -= this.y_buffer;
+ this.height -= this.y_buffer;
this.create_scales();
console.time('Create graph');
this.create_graph();
@@ -94,7 +98,7 @@
}
}
console.log("high_qtl_count:", high_qtl_count);
- return this.y_axis_filter = 2;
+ return this.y_axis_filter = 0;
};
Manhattan_Plot.prototype.create_coordinates = function() {
@@ -143,11 +147,12 @@
Manhattan_Plot.prototype.create_svg = function() {
var svg;
- svg = d3.select("#manhattan_plot").append("svg").attr("class", "manhattan_plot").attr("width", this.plot_width + this.x_buffer).attr("height", this.plot_height + this.y_buffer).append("g");
+ svg = d3.select("#manhattan_plot").append("svg").attr("class", "manhattan_plot").attr("width", this.width + this.x_buffer).attr("height", this.height + this.y_buffer).append("g");
return svg;
};
Manhattan_Plot.prototype.create_graph = function() {
+ this.create_legend();
this.add_border();
this.add_x_axis();
this.add_y_axis();
@@ -158,10 +163,15 @@
return this.add_plot_points();
};
+ Manhattan_Plot.prototype.create_legend = function() {
+ this.svg.append("text").attr("class", "legend").text("Trait: " + this.this_trait + " : " + this.data_set).attr("x", this.x_buffer).attr("y", 20).attr("dx", "0em").attr("text-anchor", "left").attr("font-family", "sans-serif").attr("font-size", "16px").attr("fill", "black");
+ return this.svg.append("text").attr("class", "legend").text("MAF: " + this.maf).attr("x", this.x_buffer).attr("y", 38).attr("dx", "0em").attr("text-anchor", "left").attr("font-family", "sans-serif").attr("font-size", "16px").attr("fill", "black");
+ };
+
Manhattan_Plot.prototype.add_border = function() {
var border_coords,
_this = this;
- border_coords = [[this.y_buffer, this.plot_height, this.x_buffer, this.x_buffer], [this.y_buffer, this.plot_height, this.plot_width, this.plot_width], [this.y_buffer, this.y_buffer, this.x_buffer, this.plot_width], [this.plot_height, this.plot_height, this.x_buffer, this.plot_width]];
+ border_coords = [[this.y_buffer + this.legend_buffer, this.height, this.x_buffer, this.x_buffer], [this.y_buffer + this.legend_buffer, this.height, this.width, this.width], [this.y_buffer + this.legend_buffer, this.y_buffer + this.legend_buffer, this.x_buffer, this.width], [this.height, this.height, this.x_buffer, this.width]];
return this.svg.selectAll("line").data(border_coords).enter().append("line").attr("y1", function(d) {
return d[0];
}).attr("y2", function(d) {
@@ -180,11 +190,11 @@
console.log("@chromosomes[23]:", this.chromosomes['23']);
console.log("@total_length:", this.total_length);
console.log("d3.max(@xcoords):", d3.max(this.x_coords));
- this.x_scale = d3.scale.linear().domain([0, this.total_length + this.chromosomes['24']]).range([this.x_buffer, this.plot_width]);
+ this.x_scale = d3.scale.linear().domain([0, this.total_length + this.chromosomes['24']]).range([this.x_buffer, this.width]);
} else {
- this.x_scale = d3.scale.linear().domain([0, this.total_length + this.chromosomes['20']]).range([this.x_buffer, this.plot_width]);
+ this.x_scale = d3.scale.linear().domain([0, this.total_length + this.chromosomes['20']]).range([this.x_buffer, this.width]);
}
- return this.y_scale = d3.scale.linear().domain([this.y_axis_filter, this.y_max]).range([this.plot_height, this.y_buffer]);
+ return this.y_scale = d3.scale.linear().domain([this.y_axis_filter, this.y_max]).range([this.height, this.y_buffer + this.legend_buffer]);
};
Manhattan_Plot.prototype.create_x_axis_tick_values = function() {
@@ -237,7 +247,7 @@
}
return tick_val;
});
- return this.svg.append("g").attr("class", "x_axis").attr("transform", "translate(0," + this.plot_height + ")").call(this.xAxis).selectAll("text").attr("text-anchor", "right").attr("dx", "-1.6em").attr("transform", function(d) {
+ return this.svg.append("g").attr("class", "x_axis").attr("transform", "translate(0," + this.height + ")").call(this.xAxis).selectAll("text").attr("text-anchor", "right").attr("dx", "-1.6em").attr("transform", function(d) {
return "translate(-12,0) rotate(-90)";
});
};
@@ -248,14 +258,14 @@
};
Manhattan_Plot.prototype.add_axis_labels = function() {
- return this.svg.append("text").attr("transform", "rotate(-90)").attr("y", 0 - (this.plot_height / 2)).attr("x", this.x_buffer).attr("dy", "1em").style("text-anchor", "middle").text("LOD Score");
+ return this.svg.append("text").attr("transform", "rotate(-90)").attr("y", 0 - (this.height / 2)).attr("x", this.x_buffer).attr("dy", "1em").style("text-anchor", "middle").text("LOD Score");
};
Manhattan_Plot.prototype.add_chr_lines = function() {
var _this = this;
return this.svg.selectAll("line").data(this.cumulative_chr_lengths, function(d) {
return d;
- }).enter().append("line").attr("x1", this.x_scale).attr("x2", this.x_scale).attr("y1", this.y_buffer).attr("y2", this.plot_height).style("stroke", "#ccc");
+ }).enter().append("line").attr("x1", this.x_scale).attr("x2", this.x_scale).attr("y1", this.y_buffer + this.legend_buffer).attr("y2", this.height).style("stroke", "#ccc");
};
Manhattan_Plot.prototype.fill_chr_areas = function() {
@@ -266,14 +276,14 @@
return d;
}).enter().append("rect").attr("x", function(d, i) {
return _this.x_scale(d[1] - d[0]);
- }).attr("y", this.y_buffer + 2).attr("width", function(d, i) {
+ }).attr("y", this.y_buffer + this.legend_buffer + 2).attr("width", function(d, i) {
var ending, starting, width;
starting = _this.x_scale(d[1] - d[0]);
ending = _this.x_scale(_this.cumulative_chr_lengths[i]);
width = ending - starting;
console.log("width:", d[0]);
return width;
- }).attr("height", this.plot_height - this.y_buffer - 3).attr("fill", function(d, i) {
+ }).attr("height", this.height - this.y_buffer - this.legend_buffer - 3).attr("fill", function(d, i) {
if ((i + 1) % 2) {
return "none";
} else {
@@ -310,7 +320,7 @@
}
}).attr("x", function(d) {
return _this.x_scale(d[2] - d[1] / 2);
- }).attr("y", this.plot_height * 0.1).attr("dx", "0em").attr("text-anchor", "middle").attr("font-family", "sans-serif").attr("font-size", "18px").attr("cursor", "pointer").attr("fill", "black").on("click", function(d) {
+ }).attr("y", this.height * 0.1 + this.legend_buffer).attr("dx", "0em").attr("text-anchor", "middle").attr("font-family", "sans-serif").attr("font-size", "18px").attr("cursor", "pointer").attr("fill", "black").on("click", function(d) {
var this_chr;
this_chr = d;
return _this.redraw_plot(d);
@@ -359,7 +369,7 @@
Manhattan_Plot.prototype.create_zoom_pane = function() {
var zoom;
zoom = d3.behavior.zoom().on("zoom", draw);
- return this.svg.append("rect").attr("class", "pane").attr("width", this.plot_width).attr("height", this.plot_height).call(zoom);
+ return this.svg.append("rect").attr("class", "pane").attr("width", this.width).attr("height", this.height).call(zoom);
};
Manhattan_Plot.prototype.draw = function() {
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.coffee b/wqflask/wqflask/static/new/javascript/show_trait.coffee
index 6b31124c..1a7f6a0b 100755
--- a/wqflask/wqflask/static/new/javascript/show_trait.coffee
+++ b/wqflask/wqflask/static/new/javascript/show_trait.coffee
@@ -94,11 +94,15 @@ $ ->
all_samples = sample_lists[0].concat sample_lists[1]
new Box_Plot(all_samples)
-
d3.select("#select_compare_trait").on("click", =>
+ $('.qtlcharts').empty()
open_trait_selection()
)
+ d3.select("#clear_compare_trait").on("click", =>
+ $('.qtlcharts').empty()
+ )
+
open_trait_selection = () ->
$('#collections_holder').load('/collections/list?color_by_trait #collections_list', =>
$.colorbox(
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js
index 2f7dcf78..e1dc9e76 100755
--- a/wqflask/wqflask/static/new/javascript/show_trait.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait.js
@@ -94,8 +94,12 @@
}
});
d3.select("#select_compare_trait").on("click", function() {
+ $('.qtlcharts').empty();
return open_trait_selection();
});
+ d3.select("#clear_compare_trait").on("click", function() {
+ return $('.qtlcharts').empty();
+ });
open_trait_selection = function() {
var _this = this;
return $('#collections_holder').load('/collections/list?color_by_trait #collections_list', function() {
diff --git a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.coffee b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.coffee
index 6118eae8..b37cfe09 100755
--- a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.coffee
+++ b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.coffee
@@ -123,9 +123,9 @@ $ ->
$("#static_progress_bar_container").modal()
url = "/marker_regression"
$('input[name=method]').val("plink")
- $('input[name=mapping_display_all]').val($('input[name=display_all_plink]'))
- $('input[name=suggestive]').val($('input[name=suggestive_plink]'))
- $('input[name=maf]').val($('input[name=maf_plink]'))
+ $('input[name=mapping_display_all]').val($('input[name=display_all_plink]').val())
+ $('input[name=suggestive]').val($('input[name=suggestive_plink]').val())
+ $('input[name=maf]').val($('input[name=maf_plink]').val())
form_data = $('#trait_data_form').serialize()
console.log("form_data is:", form_data)
$.ajax(
@@ -153,9 +153,9 @@ $ ->
$("#static_progress_bar_container").modal()
url = "/marker_regression"
$('input[name=method]').val("gemma")
- $('input[name=mapping_display_all]').val($('input[name=display_all_gemma]'))
- $('input[name=suggestive]').val($('input[name=suggestive_gemma]'))
- $('input[name=maf]').val($('input[name=maf_gemma]'))
+ $('input[name=mapping_display_all]').val($('input[name=display_all_gemma]').val())
+ $('input[name=suggestive]').val($('input[name=suggestive_gemma]').val())
+ $('input[name=maf]').val($('input[name=maf_gemma]').val())
form_data = $('#trait_data_form').serialize()
console.log("form_data is:", form_data)
$.ajax(
diff --git a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js
index ee930c80..9b9070ba 100755
--- a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js
@@ -135,9 +135,9 @@
$("#static_progress_bar_container").modal();
url = "/marker_regression";
$('input[name=method]').val("plink");
- $('input[name=mapping_display_all]').val($('input[name=display_all_plink]'));
- $('input[name=suggestive]').val($('input[name=suggestive_plink]'));
- $('input[name=maf]').val($('input[name=maf_plink]'));
+ $('input[name=mapping_display_all]').val($('input[name=display_all_plink]').val());
+ $('input[name=suggestive]').val($('input[name=suggestive_plink]').val());
+ $('input[name=maf]').val($('input[name=maf_plink]').val());
form_data = $('#trait_data_form').serialize();
console.log("form_data is:", form_data);
$.ajax({
@@ -166,9 +166,9 @@
$("#static_progress_bar_container").modal();
url = "/marker_regression";
$('input[name=method]').val("gemma");
- $('input[name=mapping_display_all]').val($('input[name=display_all_gemma]'));
- $('input[name=suggestive]').val($('input[name=suggestive_gemma]'));
- $('input[name=maf]').val($('input[name=maf_gemma]'));
+ $('input[name=mapping_display_all]').val($('input[name=display_all_gemma]').val());
+ $('input[name=suggestive]').val($('input[name=suggestive_gemma]').val());
+ $('input[name=maf]').val($('input[name=maf_gemma]').val());
form_data = $('#trait_data_form').serialize();
console.log("form_data is:", form_data);
$.ajax({
diff --git a/wqflask/wqflask/templates/correlation_matrix.html b/wqflask/wqflask/templates/correlation_matrix.html
index b67ecb78..403d2a98 100755
--- a/wqflask/wqflask/templates/correlation_matrix.html
+++ b/wqflask/wqflask/templates/correlation_matrix.html
@@ -5,13 +5,16 @@
<link rel="stylesheet" type="text/css" href="/static/packages/DT_bootstrap/DT_bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/static/packages/TableTools/media/css/TableTools.css" />
<link rel="stylesheet" type="text/css" href="/static/new/css/corr_matrix.css" />
+ <link rel="stylesheet" type="text/css" href="/static/new/css/panelutil.css" />
+ <link rel="stylesheet" type="text/css" href="/static/new/css/d3-tip.min.css" />
{% endblock %}
{% block content %}
{{ header("Correlation Matrix") }}
<div class="container">
- <div class="row-fluid show-grid">
+ <div id="chart"></div>
+<!-- <div class="row-fluid show-grid">
<div class="col-md-12"> Pearon's R </div>
</div>
<div class="row-fluid show-grid">
@@ -48,16 +51,26 @@
</div>
</div>
- </div>
+ </div>-->
</div>
{% endblock %}
-{% block js %}
+{% block js %}
+
+ <script>
+ js_data = {{ js_data | safe }}
+ </script>
+
+ <script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
+ <script type="text/javascript" src="/static/new/js_external/d3-tip.min.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.dataTables.min.js"></script>
<script language="javascript" type="text/javascript" src="/static/packages/DT_bootstrap/DT_bootstrap.js"></script>
<script language="javascript" type="text/javascript" src="/static/packages/TableTools/media/js/TableTools.min.js"></script>
<script language="javascript" type="text/javascript" src="/static/packages/underscore/underscore-min.js"></script>
+ <script type="text/javascript" src="/static/new/javascript/panelutil.js"></script>
+ <script language="javascript" type="text/javascript" src="/static/new/javascript/corr_matrix.js"></script>
+ <script language="javascript" type="text/javascript" src="/static/new/javascript/create_corr_matrix.js"></script>
{% endblock %}
diff --git a/wqflask/wqflask/templates/interval_mapping.html b/wqflask/wqflask/templates/interval_mapping.html
index e3c164ea..ad174b7b 100755
--- a/wqflask/wqflask/templates/interval_mapping.html
+++ b/wqflask/wqflask/templates/interval_mapping.html
@@ -1,12 +1,12 @@
{% extends "base.html" %}
{% block title %}Interval Mapping{% endblock %}
{% block css %}
- <link rel="stylesheet" type="text/css" href="/static/new/css/interval_mapping.css" />
+<!-- <link rel="stylesheet" type="text/css" href="/static/new/css/interval_mapping.css" />-->
<link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/css/jquery.dataTables.css" />
<link rel="stylesheet" type="text/css" href="/static/packages/DT_bootstrap/DT_bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/static/packages/TableTools/media/css/TableTools.css" />
- <link rel="stylesheet" type="text/css" href="/static/new/css/panelutil.css" />
<link rel="stylesheet" type="text/css" href="/static/new/css/d3-tip.min.css" />
+ <link rel="stylesheet" type="text/css" href="/static/new/css/panelutil.css" />
{% endblock %}
{% block content %} <!-- Start of body -->
@@ -19,7 +19,7 @@
Whole Genome Mapping
</h2>
</div>
- <div id="topchart">
+ <div class="qtlcharts" id="topchart">
</div>
<div>
diff --git a/wqflask/wqflask/templates/show_trait_statistics_new.html b/wqflask/wqflask/templates/show_trait_statistics_new.html
index 9b6b37a4..a9f5dd43 100755
--- a/wqflask/wqflask/templates/show_trait_statistics_new.html
+++ b/wqflask/wqflask/templates/show_trait_statistics_new.html
@@ -87,7 +87,10 @@
<div class="btn-group">
<button type="button" class="btn" id="select_compare_trait">
- <i class="icon-th-large"></i> Select Trait
+ <i class="icon-th-large"></i> Select Traits
+ </button>
+ <button type="button" class="btn" id="clear_compare_trait">
+ <i class="icon-trash"></i> Clear
</button>
</div>
<div id="scatterplot_container">
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index aa33700f..7a484898 100755
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -208,7 +208,8 @@ def marker_regression_page():
'trait_id',
'dataset',
'method',
- 'suggestive'
+ 'suggestive',
+ 'maf'
)
start_vars = {}
@@ -323,6 +324,10 @@ def corr_compute_page():
def corr_matrix_page():
print("In corr_matrix, request.form is:", pf(request.form))
template_vars = show_corr_matrix.CorrelationMatrix(request.form)
+ template_vars.js_data = json.dumps(template_vars.js_data,
+ default=json_default_handler,
+ indent=" ")
+
return render_template("correlation_matrix.html", **template_vars.__dict__)
@app.route("/corr_scatter_plot")