Gene_search¶
-
NetExplorer.views.pages.gene_search.
gene_search
(request)¶ Search for planarian genes and transcripts using their identifiers or any of their annotations (PFAM, GO, homologs).
- Accepts:
GET
- Parameters
genesymbol (str) – Search term with gene symbol(s).
database (str) – Database in which to search for gene symbol(s).
- Response:
res (list of Nodes): Results to be displayed.
summary (str): Summary of the search.
search_error (int): Indicates if there was an error in the search.
valid_query (bool): Indicates if query is valid.
- Template:
NetExplorer/gene_search.html
-
NetExplorer.views.pages.gene_search.
get_search_summary
(datasets, results)¶ Cretes a summary of the searched performed in gene_search.
- Parameters
datasets (list of str) – List of all datasets to which User has permissions to.
results (list of Node) – List of Node objects that match the serach.
- Returns
List of tuples with each one of them having the name of the Dataset and the second having the number of hits for that dataset.
- Return type
list of tuple
-
NetExplorer.views.pages.gene_search.
sort_results
(datasets, results)¶ - Sorts gene/node results by:
1- Dataset (Smesgene - Human - AllContigs by year) 2- Gene Name. 3- Contig/Gene symbol.
Also removes results from not allowed datasets.
- Parameters
datasets (list of
Dataset
) – list of allowed Datasets.results (
GraphCytoscape
) – GraphCytoscape of search results to sort.
- Returns
Lists of tuples. Each tuple has (dataset, node name, node symbol).
- Return type
list of tuple