diff options
-rwxr-xr-x | wqflask/base/data_set.py | 5 | ||||
-rwxr-xr-x | wqflask/wqflask/marker_regression/marker_regression.py | 3 | ||||
-rw-r--r-- | wqflask/wqflask/search_results.py | 22 | ||||
-rwxr-xr-x | wqflask/wqflask/show_trait/show_trait.py | 4 | ||||
-rw-r--r-- | wqflask/wqflask/templates/index_page.html | 4 |
5 files changed, 28 insertions, 10 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index 10f047f8..71efc9b2 100755 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -185,9 +185,8 @@ class DataSet(object): self.group = DatasetGroup(self) # sets self.group and self.group_id and gets genotype self.species = species.TheSpecies(self) - - - + + def get_desc(self): """Gets overridden later, at least for Temp...used by trait's get_given_name""" return None diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py index 9278c80d..1a0efcee 100755 --- a/wqflask/wqflask/marker_regression/marker_regression.py +++ b/wqflask/wqflask/marker_regression/marker_regression.py @@ -65,6 +65,9 @@ class MarkerRegression(object): pheno_vector = np.array([float(val) for val in self.vals if val!="x"]) genotype_matrix = np.array(trimmed_genotype_data).T + print("pheno_vector is: ", pf(pheno_vector)) + print("genotype_matrix is: ", pf(genotype_matrix)) + t_stats, p_values = lmm.run( pheno_vector, genotype_matrix, diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py index fde30944..080568f0 100644 --- a/wqflask/wqflask/search_results.py +++ b/wqflask/wqflask/search_results.py @@ -57,15 +57,18 @@ class SearchResultPage(): # self.dataset_groups = map(lambda x: x[1], results) # self.dataset_group_ids = map(lambda x: x[2], results) #else: - if kw['q']: + + self.results = [] + + if 'q' in kw: self.quick_search = True self.search_terms = kw['q'] + self.quick_search() else: self.quick_search = False self.search_terms = kw['search_terms'] self.dataset = create_dataset(kw['dataset']) - - self.search() + self.search() self.gen_search_result() @@ -95,13 +98,24 @@ class SearchResultPage(): self.trait_list.append(this_trait) self.dataset.get_trait_info(self.trait_list, species) + + def quick_search(self): + + return True + + #search_gene + #search_geno + #searhch_pheno + #search_mrn + #searhc_publish def search(self): self.search_terms = parser.parse(self.search_terms) print("After parsing:", self.search_terms) - self.results = [] + + for a_search in self.search_terms: print("[kodak] item is:", pf(a_search)) search_term = a_search['search_term'] diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py index 12d512b2..5c064359 100755 --- a/wqflask/wqflask/show_trait/show_trait.py +++ b/wqflask/wqflask/show_trait/show_trait.py @@ -1552,8 +1552,10 @@ class ShowTrait(object): all_samples_ordered = (self.dataset.group.parlist + self.dataset.group.f1list + self.dataset.group.samplelist) - else: + elif self.dataset.group.f1list: all_samples_ordered = self.dataset.group.f1list + self.dataset.group.samplelist + else: + all_samples_ordered = self.dataset.group.samplelist this_trait_samples = set(this_trait.data.keys()) diff --git a/wqflask/wqflask/templates/index_page.html b/wqflask/wqflask/templates/index_page.html index 8a05173f..46a307b7 100644 --- a/wqflask/wqflask/templates/index_page.html +++ b/wqflask/wqflask/templates/index_page.html @@ -34,10 +34,10 @@ </div> <form method="get" action="/search" name="SEARCHFORM"> <fieldset> - <label for="tfor">Search:</label> + <label for="quick">Search:</label> <div class="input-append"> <input class="input-xlarge" - id="tfor" name="q" + id="quick" name="q" type="text" maxlength="500"> <input id="btsearch" type="submit" |