partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
test
sv_variant
Display a specific structural variant.
scout/server/blueprints/variants/views.py
def sv_variant(institute_id, case_name, variant_id): """Display a specific structural variant.""" data = controllers.sv_variant(store, institute_id, case_name, variant_id) return data
def sv_variant(institute_id, case_name, variant_id): """Display a specific structural variant.""" data = controllers.sv_variant(store, institute_id, case_name, variant_id) return data
[ "Display", "a", "specific", "structural", "variant", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/views.py#L299-L302
[ "def", "sv_variant", "(", "institute_id", ",", "case_name", ",", "variant_id", ")", ":", "data", "=", "controllers", ".", "sv_variant", "(", "store", ",", "institute_id", ",", "case_name", ",", "variant_id", ")", "return", "data" ]
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
str_variant
Display a specific STR variant.
scout/server/blueprints/variants/views.py
def str_variant(institute_id, case_name, variant_id): """Display a specific STR variant.""" data = controllers.str_variant(store, institute_id, case_name, variant_id) return data
def str_variant(institute_id, case_name, variant_id): """Display a specific STR variant.""" data = controllers.str_variant(store, institute_id, case_name, variant_id) return data
[ "Display", "a", "specific", "STR", "variant", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/views.py#L306-L309
[ "def", "str_variant", "(", "institute_id", ",", "case_name", ",", "variant_id", ")", ":", "data", "=", "controllers", ".", "str_variant", "(", "store", ",", "institute_id", ",", "case_name", ",", "variant_id", ")", "return", "data" ]
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
variant_update
Update user-defined information about a variant: manual rank & ACMG.
scout/server/blueprints/variants/views.py
def variant_update(institute_id, case_name, variant_id): """Update user-defined information about a variant: manual rank & ACMG.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) variant_obj = store.variant(variant_id) user_obj = store.user(current_user.email) link = re...
def variant_update(institute_id, case_name, variant_id): """Update user-defined information about a variant: manual rank & ACMG.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) variant_obj = store.variant(variant_id) user_obj = store.user(current_user.email) link = re...
[ "Update", "user", "-", "defined", "information", "about", "a", "variant", ":", "manual", "rank", "&", "ACMG", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/views.py#L312-L364
[ "def", "variant_update", "(", "institute_id", ",", "case_name", ",", "variant_id", ")", ":", "institute_obj", ",", "case_obj", "=", "institute_and_case", "(", "store", ",", "institute_id", ",", "case_name", ")", "variant_obj", "=", "store", ".", "variant", "(", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
verify
Start procedure to validate variant using other techniques.
scout/server/blueprints/variants/views.py
def verify(institute_id, case_name, variant_id, variant_category, order): """Start procedure to validate variant using other techniques.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) variant_obj = store.variant(variant_id) user_obj = store.user(current_user.email) ...
def verify(institute_id, case_name, variant_id, variant_category, order): """Start procedure to validate variant using other techniques.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) variant_obj = store.variant(variant_id) user_obj = store.user(current_user.email) ...
[ "Start", "procedure", "to", "validate", "variant", "using", "other", "techniques", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/views.py#L368-L382
[ "def", "verify", "(", "institute_id", ",", "case_name", ",", "variant_id", ",", "variant_category", ",", "order", ")", ":", "institute_obj", ",", "case_obj", "=", "institute_and_case", "(", "store", ",", "institute_id", ",", "case_name", ")", "variant_obj", "=",...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
clinvar
Build a clinVar submission form for a variant.
scout/server/blueprints/variants/views.py
def clinvar(institute_id, case_name, variant_id): """Build a clinVar submission form for a variant.""" data = controllers.clinvar_export(store, institute_id, case_name, variant_id) if request.method == 'GET': return data else: #POST form_dict = request.form.to_dict() submission_o...
def clinvar(institute_id, case_name, variant_id): """Build a clinVar submission form for a variant.""" data = controllers.clinvar_export(store, institute_id, case_name, variant_id) if request.method == 'GET': return data else: #POST form_dict = request.form.to_dict() submission_o...
[ "Build", "a", "clinVar", "submission", "form", "for", "a", "variant", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/views.py#L387-L402
[ "def", "clinvar", "(", "institute_id", ",", "case_name", ",", "variant_id", ")", ":", "data", "=", "controllers", ".", "clinvar_export", "(", "store", ",", "institute_id", ",", "case_name", ",", "variant_id", ")", "if", "request", ".", "method", "==", "'GET'...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
cancer_variants
Show cancer variants overview.
scout/server/blueprints/variants/views.py
def cancer_variants(institute_id, case_name): """Show cancer variants overview.""" data = controllers.cancer_variants(store, request.args, institute_id, case_name) return data
def cancer_variants(institute_id, case_name): """Show cancer variants overview.""" data = controllers.cancer_variants(store, request.args, institute_id, case_name) return data
[ "Show", "cancer", "variants", "overview", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/views.py#L407-L410
[ "def", "cancer_variants", "(", "institute_id", ",", "case_name", ")", ":", "data", "=", "controllers", ".", "cancer_variants", "(", "store", ",", "request", ".", "args", ",", "institute_id", ",", "case_name", ")", "return", "data" ]
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
variant_acmg
ACMG classification form.
scout/server/blueprints/variants/views.py
def variant_acmg(institute_id, case_name, variant_id): """ACMG classification form.""" if request.method == 'GET': data = controllers.variant_acmg(store, institute_id, case_name, variant_id) return data else: criteria = [] criteria_terms = request.form.getlist('criteria') ...
def variant_acmg(institute_id, case_name, variant_id): """ACMG classification form.""" if request.method == 'GET': data = controllers.variant_acmg(store, institute_id, case_name, variant_id) return data else: criteria = [] criteria_terms = request.form.getlist('criteria') ...
[ "ACMG", "classification", "form", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/views.py#L415-L433
[ "def", "variant_acmg", "(", "institute_id", ",", "case_name", ",", "variant_id", ")", ":", "if", "request", ".", "method", "==", "'GET'", ":", "data", "=", "controllers", ".", "variant_acmg", "(", "store", ",", "institute_id", ",", "case_name", ",", "variant...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
evaluation
Show or delete an ACMG evaluation.
scout/server/blueprints/variants/views.py
def evaluation(evaluation_id): """Show or delete an ACMG evaluation.""" evaluation_obj = store.get_evaluation(evaluation_id) controllers.evaluation(store, evaluation_obj) if request.method == 'POST': link = url_for('.variant', institute_id=evaluation_obj['institute']['_id'], ...
def evaluation(evaluation_id): """Show or delete an ACMG evaluation.""" evaluation_obj = store.get_evaluation(evaluation_id) controllers.evaluation(store, evaluation_obj) if request.method == 'POST': link = url_for('.variant', institute_id=evaluation_obj['institute']['_id'], ...
[ "Show", "or", "delete", "an", "ACMG", "evaluation", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/views.py#L438-L450
[ "def", "evaluation", "(", "evaluation_id", ")", ":", "evaluation_obj", "=", "store", ".", "get_evaluation", "(", "evaluation_id", ")", "controllers", ".", "evaluation", "(", "store", ",", "evaluation_obj", ")", "if", "request", ".", "method", "==", "'POST'", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
acmg
Calculate an ACMG classification from submitted criteria.
scout/server/blueprints/variants/views.py
def acmg(): """Calculate an ACMG classification from submitted criteria.""" criteria = request.args.getlist('criterion') classification = get_acmg(criteria) return jsonify(dict(classification=classification))
def acmg(): """Calculate an ACMG classification from submitted criteria.""" criteria = request.args.getlist('criterion') classification = get_acmg(criteria) return jsonify(dict(classification=classification))
[ "Calculate", "an", "ACMG", "classification", "from", "submitted", "criteria", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/views.py#L455-L459
[ "def", "acmg", "(", ")", ":", "criteria", "=", "request", ".", "args", ".", "getlist", "(", "'criterion'", ")", "classification", "=", "get_acmg", "(", "criteria", ")", "return", "jsonify", "(", "dict", "(", "classification", "=", "classification", ")", ")...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
upload_panel
Parse gene panel file and fill in HGNC symbols for filter.
scout/server/blueprints/variants/views.py
def upload_panel(institute_id, case_name): """Parse gene panel file and fill in HGNC symbols for filter.""" file = form.symbol_file.data if file.filename == '': flash('No selected file', 'warning') return redirect(request.referrer) try: stream = io.StringIO(file.stream.read().d...
def upload_panel(institute_id, case_name): """Parse gene panel file and fill in HGNC symbols for filter.""" file = form.symbol_file.data if file.filename == '': flash('No selected file', 'warning') return redirect(request.referrer) try: stream = io.StringIO(file.stream.read().d...
[ "Parse", "gene", "panel", "file", "and", "fill", "in", "HGNC", "symbols", "for", "filter", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/views.py#L463-L496
[ "def", "upload_panel", "(", "institute_id", ",", "case_name", ")", ":", "file", "=", "form", ".", "symbol_file", ".", "data", "if", "file", ".", "filename", "==", "''", ":", "flash", "(", "'No selected file'", ",", "'warning'", ")", "return", "redirect", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
download_verified
Download all verified variants for user's cases
scout/server/blueprints/variants/views.py
def download_verified(): """Download all verified variants for user's cases""" user_obj = store.user(current_user.email) user_institutes = user_obj.get('institutes') temp_excel_dir = os.path.join(variants_bp.static_folder, 'verified_folder') os.makedirs(temp_excel_dir, exist_ok=True) written_fi...
def download_verified(): """Download all verified variants for user's cases""" user_obj = store.user(current_user.email) user_institutes = user_obj.get('institutes') temp_excel_dir = os.path.join(variants_bp.static_folder, 'verified_folder') os.makedirs(temp_excel_dir, exist_ok=True) written_fi...
[ "Download", "all", "verified", "variants", "for", "user", "s", "cases" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/views.py#L500-L529
[ "def", "download_verified", "(", ")", ":", "user_obj", "=", "store", ".", "user", "(", "current_user", ".", "email", ")", "user_institutes", "=", "user_obj", ".", "get", "(", "'institutes'", ")", "temp_excel_dir", "=", "os", ".", "path", ".", "join", "(", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
genes_by_alias
Return a dictionary with hgnc symbols as keys Value of the dictionaries are information about the hgnc ids for a symbol. If the symbol is primary for a gene then 'true_id' will exist. A list of hgnc ids that the symbol points to is in ids. Args: hgnc_genes(dict): a dictionary with hgnc_id as k...
scout/utils/link.py
def genes_by_alias(hgnc_genes): """Return a dictionary with hgnc symbols as keys Value of the dictionaries are information about the hgnc ids for a symbol. If the symbol is primary for a gene then 'true_id' will exist. A list of hgnc ids that the symbol points to is in ids. Args: hgnc_gene...
def genes_by_alias(hgnc_genes): """Return a dictionary with hgnc symbols as keys Value of the dictionaries are information about the hgnc ids for a symbol. If the symbol is primary for a gene then 'true_id' will exist. A list of hgnc ids that the symbol points to is in ids. Args: hgnc_gene...
[ "Return", "a", "dictionary", "with", "hgnc", "symbols", "as", "keys" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/link.py#L18-L57
[ "def", "genes_by_alias", "(", "hgnc_genes", ")", ":", "alias_genes", "=", "{", "}", "for", "hgnc_id", "in", "hgnc_genes", ":", "gene", "=", "hgnc_genes", "[", "hgnc_id", "]", "# This is the primary symbol:", "hgnc_symbol", "=", "gene", "[", "'hgnc_symbol'", "]",...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
add_ensembl_info
Add the coordinates from ensembl Args: genes(dict): Dictionary with all genes ensembl_lines(iteable): Iteable with raw ensembl info
scout/utils/link.py
def add_ensembl_info(genes, ensembl_lines): """Add the coordinates from ensembl Args: genes(dict): Dictionary with all genes ensembl_lines(iteable): Iteable with raw ensembl info """ LOG.info("Adding ensembl coordinates") # Parse and add the ensembl gene info if isinsta...
def add_ensembl_info(genes, ensembl_lines): """Add the coordinates from ensembl Args: genes(dict): Dictionary with all genes ensembl_lines(iteable): Iteable with raw ensembl info """ LOG.info("Adding ensembl coordinates") # Parse and add the ensembl gene info if isinsta...
[ "Add", "the", "coordinates", "from", "ensembl", "Args", ":", "genes", "(", "dict", ")", ":", "Dictionary", "with", "all", "genes", "ensembl_lines", "(", "iteable", ")", ":", "Iteable", "with", "raw", "ensembl", "info" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/link.py#L59-L83
[ "def", "add_ensembl_info", "(", "genes", ",", "ensembl_lines", ")", ":", "LOG", ".", "info", "(", "\"Adding ensembl coordinates\"", ")", "# Parse and add the ensembl gene info", "if", "isinstance", "(", "ensembl_lines", ",", "DataFrame", ")", ":", "ensembl_genes", "="...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
add_exac_info
Add information from the exac genes Currently we only add the pLi score on gene level The exac resource only use HGNC symbol to identify genes so we need our alias mapping. Args: genes(dict): Dictionary with all genes alias_genes(dict): Genes mapped to all aliases ...
scout/utils/link.py
def add_exac_info(genes, alias_genes, exac_lines): """Add information from the exac genes Currently we only add the pLi score on gene level The exac resource only use HGNC symbol to identify genes so we need our alias mapping. Args: genes(dict): Dictionary with all genes ...
def add_exac_info(genes, alias_genes, exac_lines): """Add information from the exac genes Currently we only add the pLi score on gene level The exac resource only use HGNC symbol to identify genes so we need our alias mapping. Args: genes(dict): Dictionary with all genes ...
[ "Add", "information", "from", "the", "exac", "genes", "Currently", "we", "only", "add", "the", "pLi", "score", "on", "gene", "level", "The", "exac", "resource", "only", "use", "HGNC", "symbol", "to", "identify", "genes", "so", "we", "need", "our", "alias",...
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/link.py#L85-L105
[ "def", "add_exac_info", "(", "genes", ",", "alias_genes", ",", "exac_lines", ")", ":", "LOG", ".", "info", "(", "\"Add exac pli scores\"", ")", "for", "exac_gene", "in", "parse_exac_genes", "(", "exac_lines", ")", ":", "hgnc_symbol", "=", "exac_gene", "[", "'h...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
add_omim_info
Add omim information We collect information on what phenotypes that are associated with a gene, what inheritance models that are associated and the correct omim id. Args: genes(dict): Dictionary with all genes alias_genes(dict): Genes mapped to all aliases genemap_lines(ite...
scout/utils/link.py
def add_omim_info(genes, alias_genes, genemap_lines, mim2gene_lines): """Add omim information We collect information on what phenotypes that are associated with a gene, what inheritance models that are associated and the correct omim id. Args: genes(dict): Dictionary with all genes ...
def add_omim_info(genes, alias_genes, genemap_lines, mim2gene_lines): """Add omim information We collect information on what phenotypes that are associated with a gene, what inheritance models that are associated and the correct omim id. Args: genes(dict): Dictionary with all genes ...
[ "Add", "omim", "information", "We", "collect", "information", "on", "what", "phenotypes", "that", "are", "associated", "with", "a", "gene", "what", "inheritance", "models", "that", "are", "associated", "and", "the", "correct", "omim", "id", ".", "Args", ":", ...
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/link.py#L107-L134
[ "def", "add_omim_info", "(", "genes", ",", "alias_genes", ",", "genemap_lines", ",", "mim2gene_lines", ")", ":", "LOG", ".", "info", "(", "\"Add omim info\"", ")", "omim_genes", "=", "get_mim_genes", "(", "genemap_lines", ",", "mim2gene_lines", ")", "for", "hgnc...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
add_incomplete_penetrance
Add information of incomplete penetrance
scout/utils/link.py
def add_incomplete_penetrance(genes, alias_genes, hpo_lines): """Add information of incomplete penetrance""" LOG.info("Add incomplete penetrance info") for hgnc_symbol in get_incomplete_penetrance_genes(hpo_lines): for hgnc_id in get_correct_ids(hgnc_symbol, alias_genes): genes[hgnc_id][...
def add_incomplete_penetrance(genes, alias_genes, hpo_lines): """Add information of incomplete penetrance""" LOG.info("Add incomplete penetrance info") for hgnc_symbol in get_incomplete_penetrance_genes(hpo_lines): for hgnc_id in get_correct_ids(hgnc_symbol, alias_genes): genes[hgnc_id][...
[ "Add", "information", "of", "incomplete", "penetrance" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/link.py#L136-L141
[ "def", "add_incomplete_penetrance", "(", "genes", ",", "alias_genes", ",", "hpo_lines", ")", ":", "LOG", ".", "info", "(", "\"Add incomplete penetrance info\"", ")", "for", "hgnc_symbol", "in", "get_incomplete_penetrance_genes", "(", "hpo_lines", ")", ":", "for", "h...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
get_correct_ids
Try to get the correct gene based on hgnc_symbol The HGNC symbol is unfortunately not a persistent gene identifier. Many of the resources that are used by Scout only provides the hgnc symbol to identify a gene. We need a way to guess what gene is pointed at. Args: hgnc_symbol(str): Th...
scout/utils/link.py
def get_correct_ids(hgnc_symbol, alias_genes): """Try to get the correct gene based on hgnc_symbol The HGNC symbol is unfortunately not a persistent gene identifier. Many of the resources that are used by Scout only provides the hgnc symbol to identify a gene. We need a way to guess what gene is p...
def get_correct_ids(hgnc_symbol, alias_genes): """Try to get the correct gene based on hgnc_symbol The HGNC symbol is unfortunately not a persistent gene identifier. Many of the resources that are used by Scout only provides the hgnc symbol to identify a gene. We need a way to guess what gene is p...
[ "Try", "to", "get", "the", "correct", "gene", "based", "on", "hgnc_symbol", "The", "HGNC", "symbol", "is", "unfortunately", "not", "a", "persistent", "gene", "identifier", ".", "Many", "of", "the", "resources", "that", "are", "used", "by", "Scout", "only", ...
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/link.py#L144-L167
[ "def", "get_correct_ids", "(", "hgnc_symbol", ",", "alias_genes", ")", ":", "hgnc_ids", "=", "set", "(", ")", "hgnc_symbol", "=", "hgnc_symbol", ".", "upper", "(", ")", "if", "hgnc_symbol", "in", "alias_genes", ":", "hgnc_id_info", "=", "alias_genes", "[", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
link_genes
Gather information from different sources and return a gene dict Extract information collected from a number of sources and combine them into a gene dict with HGNC symbols as keys. hgnc_id works as the primary symbol and it is from this source we gather as much information as possible (hgnc_complete_s...
scout/utils/link.py
def link_genes(ensembl_lines, hgnc_lines, exac_lines, mim2gene_lines, genemap_lines, hpo_lines): """Gather information from different sources and return a gene dict Extract information collected from a number of sources and combine them into a gene dict with HGNC symbols as keys. hgnc_i...
def link_genes(ensembl_lines, hgnc_lines, exac_lines, mim2gene_lines, genemap_lines, hpo_lines): """Gather information from different sources and return a gene dict Extract information collected from a number of sources and combine them into a gene dict with HGNC symbols as keys. hgnc_i...
[ "Gather", "information", "from", "different", "sources", "and", "return", "a", "gene", "dict" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/link.py#L169-L215
[ "def", "link_genes", "(", "ensembl_lines", ",", "hgnc_lines", ",", "exac_lines", ",", "mim2gene_lines", ",", "genemap_lines", ",", "hpo_lines", ")", ":", "genes", "=", "{", "}", "LOG", ".", "info", "(", "\"Linking genes\"", ")", "# HGNC genes are the main source, ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
matchmaker_request
Send a request to MatchMaker and return its response Args: url(str): url to send request to token(str): MME server authorization token method(str): 'GET', 'POST' or 'DELETE' content_type(str): MME request Content-Type accept(str): accepted response data(dict): eventu...
scout/utils/matchmaker.py
def matchmaker_request(url, token, method, content_type=None, accept=None, data=None): """Send a request to MatchMaker and return its response Args: url(str): url to send request to token(str): MME server authorization token method(str): 'GET', 'POST' or 'DELETE' content_type(st...
def matchmaker_request(url, token, method, content_type=None, accept=None, data=None): """Send a request to MatchMaker and return its response Args: url(str): url to send request to token(str): MME server authorization token method(str): 'GET', 'POST' or 'DELETE' content_type(st...
[ "Send", "a", "request", "to", "MatchMaker", "and", "return", "its", "response" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/matchmaker.py#L10-L58
[ "def", "matchmaker_request", "(", "url", ",", "token", ",", "method", ",", "content_type", "=", "None", ",", "accept", "=", "None", ",", "data", "=", "None", ")", ":", "headers", "=", "Headers", "(", ")", "headers", "=", "{", "'X-Auth-Token'", ":", "to...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
mme_nodes
Return the available MatchMaker nodes Args: mme_base_url(str): base URL of MME service token(str): MME server authorization token Returns: nodes(list): a list of node disctionaries
scout/utils/matchmaker.py
def mme_nodes(mme_base_url, token): """Return the available MatchMaker nodes Args: mme_base_url(str): base URL of MME service token(str): MME server authorization token Returns: nodes(list): a list of node disctionaries """ nodes = [] if not mme_base_url or not token: ...
def mme_nodes(mme_base_url, token): """Return the available MatchMaker nodes Args: mme_base_url(str): base URL of MME service token(str): MME server authorization token Returns: nodes(list): a list of node disctionaries """ nodes = [] if not mme_base_url or not token: ...
[ "Return", "the", "available", "MatchMaker", "nodes" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/matchmaker.py#L61-L77
[ "def", "mme_nodes", "(", "mme_base_url", ",", "token", ")", ":", "nodes", "=", "[", "]", "if", "not", "mme_base_url", "or", "not", "token", ":", "return", "nodes", "url", "=", "''", ".", "join", "(", "[", "mme_base_url", ",", "'/nodes'", "]", ")", "n...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
get_cytoband_coordinates
Get the cytoband coordinate for a position Args: chrom(str) pos(int) Returns: coordinate(str)
scout/parse/variant/coordinates.py
def get_cytoband_coordinates(chrom, pos): """Get the cytoband coordinate for a position Args: chrom(str) pos(int) Returns: coordinate(str) """ coordinate = "" if chrom in CYTOBANDS: for interval in CYTOBANDS[chrom][pos]: coordinate = interval.data ...
def get_cytoband_coordinates(chrom, pos): """Get the cytoband coordinate for a position Args: chrom(str) pos(int) Returns: coordinate(str) """ coordinate = "" if chrom in CYTOBANDS: for interval in CYTOBANDS[chrom][pos]: coordinate = interval.data ...
[ "Get", "the", "cytoband", "coordinate", "for", "a", "position" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/parse/variant/coordinates.py#L3-L19
[ "def", "get_cytoband_coordinates", "(", "chrom", ",", "pos", ")", ":", "coordinate", "=", "\"\"", "if", "chrom", "in", "CYTOBANDS", ":", "for", "interval", "in", "CYTOBANDS", "[", "chrom", "]", "[", "pos", "]", ":", "coordinate", "=", "interval", ".", "d...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
get_sub_category
Get the subcategory for a VCF variant The sub categories are: 'snv', 'indel', 'del', 'ins', 'dup', 'bnd', 'inv' Args: alt_len(int) ref_len(int) category(str) svtype(str) Returns: subcategory(str)
scout/parse/variant/coordinates.py
def get_sub_category(alt_len, ref_len, category, svtype=None): """Get the subcategory for a VCF variant The sub categories are: 'snv', 'indel', 'del', 'ins', 'dup', 'bnd', 'inv' Args: alt_len(int) ref_len(int) category(str) svtype(str) Returns: subcateg...
def get_sub_category(alt_len, ref_len, category, svtype=None): """Get the subcategory for a VCF variant The sub categories are: 'snv', 'indel', 'del', 'ins', 'dup', 'bnd', 'inv' Args: alt_len(int) ref_len(int) category(str) svtype(str) Returns: subcateg...
[ "Get", "the", "subcategory", "for", "a", "VCF", "variant" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/parse/variant/coordinates.py#L21-L46
[ "def", "get_sub_category", "(", "alt_len", ",", "ref_len", ",", "category", ",", "svtype", "=", "None", ")", ":", "subcategory", "=", "''", "if", "category", "in", "(", "'snv'", ",", "'indel'", ",", "'cancer'", ")", ":", "if", "ref_len", "==", "alt_len",...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
get_length
Return the length of a variant Args: alt_len(int) ref_len(int) category(str) svtype(str) svlen(int)
scout/parse/variant/coordinates.py
def get_length(alt_len, ref_len, category, pos, end, svtype=None, svlen=None): """Return the length of a variant Args: alt_len(int) ref_len(int) category(str) svtype(str) svlen(int) """ # -1 would indicate uncertain length length = -1 if category in ('snv...
def get_length(alt_len, ref_len, category, pos, end, svtype=None, svlen=None): """Return the length of a variant Args: alt_len(int) ref_len(int) category(str) svtype(str) svlen(int) """ # -1 would indicate uncertain length length = -1 if category in ('snv...
[ "Return", "the", "length", "of", "a", "variant" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/parse/variant/coordinates.py#L48-L76
[ "def", "get_length", "(", "alt_len", ",", "ref_len", ",", "category", ",", "pos", ",", "end", ",", "svtype", "=", "None", ",", "svlen", "=", "None", ")", ":", "# -1 would indicate uncertain length", "length", "=", "-", "1", "if", "category", "in", "(", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
get_end
Return the end coordinate for a variant Args: pos(int) alt(str) category(str) snvend(str) svend(int) svlen(int) Returns: end(int)
scout/parse/variant/coordinates.py
def get_end(pos, alt, category, snvend=None, svend=None, svlen=None): """Return the end coordinate for a variant Args: pos(int) alt(str) category(str) snvend(str) svend(int) svlen(int) Returns: end(int) """ # If nothing is known we set end to...
def get_end(pos, alt, category, snvend=None, svend=None, svlen=None): """Return the end coordinate for a variant Args: pos(int) alt(str) category(str) snvend(str) svend(int) svlen(int) Returns: end(int) """ # If nothing is known we set end to...
[ "Return", "the", "end", "coordinate", "for", "a", "variant" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/parse/variant/coordinates.py#L78-L115
[ "def", "get_end", "(", "pos", ",", "alt", ",", "category", ",", "snvend", "=", "None", ",", "svend", "=", "None", ",", "svlen", "=", "None", ")", ":", "# If nothing is known we set end to be same as start", "end", "=", "pos", "# If variant is snv or indel we know ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
parse_coordinates
Find out the coordinates for a variant Args: variant(cyvcf2.Variant) Returns: coordinates(dict): A dictionary on the form: { 'position':<int>, 'end':<int>, 'end_chrom':<str>, 'length':<int>, 'sub_category':<str>, '...
scout/parse/variant/coordinates.py
def parse_coordinates(variant, category): """Find out the coordinates for a variant Args: variant(cyvcf2.Variant) Returns: coordinates(dict): A dictionary on the form: { 'position':<int>, 'end':<int>, 'end_chrom':<str>, 'length':<int>...
def parse_coordinates(variant, category): """Find out the coordinates for a variant Args: variant(cyvcf2.Variant) Returns: coordinates(dict): A dictionary on the form: { 'position':<int>, 'end':<int>, 'end_chrom':<str>, 'length':<int>...
[ "Find", "out", "the", "coordinates", "for", "a", "variant" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/parse/variant/coordinates.py#L117-L192
[ "def", "parse_coordinates", "(", "variant", ",", "category", ")", ":", "ref", "=", "variant", ".", "REF", "if", "variant", ".", "ALT", ":", "alt", "=", "variant", ".", "ALT", "[", "0", "]", "if", "category", "==", "\"str\"", "and", "not", "variant", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
parse_cytoband
Parse iterable with cytoband coordinates Args: lines(iterable): Strings on format "chr1\t2300000\t5400000\tp36.32\tgpos25" Returns: cytobands(dict): Dictionary with chromosome names as keys and interval trees as values
scout/parse/cytoband.py
def parse_cytoband(lines): """Parse iterable with cytoband coordinates Args: lines(iterable): Strings on format "chr1\t2300000\t5400000\tp36.32\tgpos25" Returns: cytobands(dict): Dictionary with chromosome names as keys and interval trees as values ...
def parse_cytoband(lines): """Parse iterable with cytoband coordinates Args: lines(iterable): Strings on format "chr1\t2300000\t5400000\tp36.32\tgpos25" Returns: cytobands(dict): Dictionary with chromosome names as keys and interval trees as values ...
[ "Parse", "iterable", "with", "cytoband", "coordinates", "Args", ":", "lines", "(", "iterable", ")", ":", "Strings", "on", "format", "chr1", "\\", "t2300000", "\\", "t5400000", "\\", "tp36", ".", "32", "\\", "tgpos25", "Returns", ":", "cytobands", "(", "dic...
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/parse/cytoband.py#L5-L35
[ "def", "parse_cytoband", "(", "lines", ")", ":", "cytobands", "=", "{", "}", "for", "line", "in", "lines", ":", "line", "=", "line", ".", "rstrip", "(", ")", "splitted_line", "=", "line", ".", "split", "(", "'\\t'", ")", "chrom", "=", "splitted_line", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
cli
docstring for cli
scout/parse/cytoband.py
def cli(infile): """docstring for cli""" lines = get_file_handle(infile) cytobands = parse_cytoband(lines) print("Check some coordinates:") print("checking chrom 1 pos 2") intervals = cytobands['1'][2] for interval in intervals: print(interval) print(interval.begin)...
def cli(infile): """docstring for cli""" lines = get_file_handle(infile) cytobands = parse_cytoband(lines) print("Check some coordinates:") print("checking chrom 1 pos 2") intervals = cytobands['1'][2] for interval in intervals: print(interval) print(interval.begin)...
[ "docstring", "for", "cli" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/parse/cytoband.py#L44-L65
[ "def", "cli", "(", "infile", ")", ":", "lines", "=", "get_file_handle", "(", "infile", ")", "cytobands", "=", "parse_cytoband", "(", "lines", ")", "print", "(", "\"Check some coordinates:\"", ")", "print", "(", "\"checking chrom 1 pos 2\"", ")", "intervals", "="...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
update_panel
Update a gene panel in the database We need to update the actual gene panel and then all cases that refers to the panel. Args: adapter(scout.adapter.MongoAdapter) panel_name(str): Unique name for a gene panel panel_version(float) new_version(float) new_date(date...
scout/update/panel.py
def update_panel(adapter, panel_name, panel_version, new_version=None, new_date=None): """Update a gene panel in the database We need to update the actual gene panel and then all cases that refers to the panel. Args: adapter(scout.adapter.MongoAdapter) panel_name(str): Unique name ...
def update_panel(adapter, panel_name, panel_version, new_version=None, new_date=None): """Update a gene panel in the database We need to update the actual gene panel and then all cases that refers to the panel. Args: adapter(scout.adapter.MongoAdapter) panel_name(str): Unique name ...
[ "Update", "a", "gene", "panel", "in", "the", "database", "We", "need", "to", "update", "the", "actual", "gene", "panel", "and", "then", "all", "cases", "that", "refers", "to", "the", "panel", ".", "Args", ":", "adapter", "(", "scout", ".", "adapter", "...
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/update/panel.py#L9-L45
[ "def", "update_panel", "(", "adapter", ",", "panel_name", ",", "panel_version", ",", "new_version", "=", "None", ",", "new_date", "=", "None", ")", ":", "panel_obj", "=", "adapter", ".", "gene_panel", "(", "panel_name", ",", "panel_version", ")", "if", "not"...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
cli
scout: manage interactions with a scout instance.
scout/commands/base.py
def cli(context, mongodb, username, password, authdb, host, port, loglevel, config, demo): """scout: manage interactions with a scout instance.""" # log_format = "%(message)s" if sys.stdout.isatty() else None log_format = None coloredlogs.install(level=loglevel, fmt=log_format) LOG.info("Running sco...
def cli(context, mongodb, username, password, authdb, host, port, loglevel, config, demo): """scout: manage interactions with a scout instance.""" # log_format = "%(message)s" if sys.stdout.isatty() else None log_format = None coloredlogs.install(level=loglevel, fmt=log_format) LOG.info("Running sco...
[ "scout", ":", "manage", "interactions", "with", "a", "scout", "instance", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/commands/base.py#L57-L111
[ "def", "cli", "(", "context", ",", "mongodb", ",", "username", ",", "password", ",", "authdb", ",", "host", ",", "port", ",", "loglevel", ",", "config", ",", "demo", ")", ":", "# log_format = \"%(message)s\" if sys.stdout.isatty() else None", "log_format", "=", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
parse_exac_line
Parse an exac formated line Args: line(list): A list with exac gene info header(list): A list with the header info Returns: exac_info(dict): A dictionary with the relevant info
scout/parse/exac.py
def parse_exac_line(line, header): """Parse an exac formated line Args: line(list): A list with exac gene info header(list): A list with the header info Returns: exac_info(dict): A dictionary with the relevant info """ exac_gene = {} spli...
def parse_exac_line(line, header): """Parse an exac formated line Args: line(list): A list with exac gene info header(list): A list with the header info Returns: exac_info(dict): A dictionary with the relevant info """ exac_gene = {} spli...
[ "Parse", "an", "exac", "formated", "line", "Args", ":", "line", "(", "list", ")", ":", "A", "list", "with", "exac", "gene", "info", "header", "(", "list", ")", ":", "A", "list", "with", "the", "header", "info", "Returns", ":", "exac_info", "(", "dict...
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/parse/exac.py#L5-L22
[ "def", "parse_exac_line", "(", "line", ",", "header", ")", ":", "exac_gene", "=", "{", "}", "splitted_line", "=", "line", ".", "rstrip", "(", ")", ".", "split", "(", "'\\t'", ")", "exac_gene", "=", "dict", "(", "zip", "(", "header", ",", "splitted_line...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
parse_exac_genes
Parse lines with exac formated genes This is designed to take a dump with genes from exac. This is downloaded from: ftp.broadinstitute.org/pub/ExAC_release//release0.3/functional_gene_constraint/ fordist_cleaned_exac_r03_march16_z_pli_rec_null_data.txt Args...
scout/parse/exac.py
def parse_exac_genes(lines): """Parse lines with exac formated genes This is designed to take a dump with genes from exac. This is downloaded from: ftp.broadinstitute.org/pub/ExAC_release//release0.3/functional_gene_constraint/ fordist_cleaned_exac_r03_march16_z_pli...
def parse_exac_genes(lines): """Parse lines with exac formated genes This is designed to take a dump with genes from exac. This is downloaded from: ftp.broadinstitute.org/pub/ExAC_release//release0.3/functional_gene_constraint/ fordist_cleaned_exac_r03_march16_z_pli...
[ "Parse", "lines", "with", "exac", "formated", "genes", "This", "is", "designed", "to", "take", "a", "dump", "with", "genes", "from", "exac", ".", "This", "is", "downloaded", "from", ":", "ftp", ".", "broadinstitute", ".", "org", "/", "pub", "/", "ExAC_re...
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/parse/exac.py#L24-L45
[ "def", "parse_exac_genes", "(", "lines", ")", ":", "header", "=", "[", "]", "logger", ".", "info", "(", "\"Parsing exac genes...\"", ")", "for", "index", ",", "line", "in", "enumerate", "(", "lines", ")", ":", "if", "index", "==", "0", ":", "header", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
panels
Show all panels for a case.
scout/server/blueprints/panels/views.py
def panels(): """Show all panels for a case.""" if request.method == 'POST': # update an existing panel csv_file = request.files['csv_file'] content = csv_file.stream.read() lines = None try: if b'\n' in content: lines = content.decode('utf-8',...
def panels(): """Show all panels for a case.""" if request.method == 'POST': # update an existing panel csv_file = request.files['csv_file'] content = csv_file.stream.read() lines = None try: if b'\n' in content: lines = content.decode('utf-8',...
[ "Show", "all", "panels", "for", "a", "case", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/panels/views.py#L20-L81
[ "def", "panels", "(", ")", ":", "if", "request", ".", "method", "==", "'POST'", ":", "# update an existing panel", "csv_file", "=", "request", ".", "files", "[", "'csv_file'", "]", "content", "=", "csv_file", ".", "stream", ".", "read", "(", ")", "lines", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
panel
Display (and add pending updates to) a specific gene panel.
scout/server/blueprints/panels/views.py
def panel(panel_id): """Display (and add pending updates to) a specific gene panel.""" panel_obj = store.gene_panel(panel_id) or store.panel(panel_id) if request.method == 'POST': raw_hgnc_id = request.form['hgnc_id'] if '|' in raw_hgnc_id: raw_hgnc_id = raw_hgnc_id.split(' | ', ...
def panel(panel_id): """Display (and add pending updates to) a specific gene panel.""" panel_obj = store.gene_panel(panel_id) or store.panel(panel_id) if request.method == 'POST': raw_hgnc_id = request.form['hgnc_id'] if '|' in raw_hgnc_id: raw_hgnc_id = raw_hgnc_id.split(' | ', ...
[ "Display", "(", "and", "add", "pending", "updates", "to", ")", "a", "specific", "gene", "panel", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/panels/views.py#L86-L123
[ "def", "panel", "(", "panel_id", ")", ":", "panel_obj", "=", "store", ".", "gene_panel", "(", "panel_id", ")", "or", "store", ".", "panel", "(", "panel_id", ")", "if", "request", ".", "method", "==", "'POST'", ":", "raw_hgnc_id", "=", "request", ".", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
panel_update
Update panel to a new version.
scout/server/blueprints/panels/views.py
def panel_update(panel_id): """Update panel to a new version.""" panel_obj = store.panel(panel_id) update_version = request.form.get('version', None) new_panel_id = store.apply_pending(panel_obj, update_version) return redirect(url_for('panels.panel', panel_id=new_panel_id))
def panel_update(panel_id): """Update panel to a new version.""" panel_obj = store.panel(panel_id) update_version = request.form.get('version', None) new_panel_id = store.apply_pending(panel_obj, update_version) return redirect(url_for('panels.panel', panel_id=new_panel_id))
[ "Update", "panel", "to", "a", "new", "version", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/panels/views.py#L127-L132
[ "def", "panel_update", "(", "panel_id", ")", ":", "panel_obj", "=", "store", ".", "panel", "(", "panel_id", ")", "update_version", "=", "request", ".", "form", ".", "get", "(", "'version'", ",", "None", ")", "new_panel_id", "=", "store", ".", "apply_pendin...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
panel_export
Export panel to PDF file
scout/server/blueprints/panels/views.py
def panel_export(panel_id): """Export panel to PDF file""" panel_obj = store.panel(panel_id) data = controllers.panel_export(store, panel_obj) data['report_created_at'] = datetime.datetime.now().strftime("%Y-%m-%d") html_report = render_template('panels/panel_pdf_simple.html', **data) return ren...
def panel_export(panel_id): """Export panel to PDF file""" panel_obj = store.panel(panel_id) data = controllers.panel_export(store, panel_obj) data['report_created_at'] = datetime.datetime.now().strftime("%Y-%m-%d") html_report = render_template('panels/panel_pdf_simple.html', **data) return ren...
[ "Export", "panel", "to", "PDF", "file" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/panels/views.py#L136-L142
[ "def", "panel_export", "(", "panel_id", ")", ":", "panel_obj", "=", "store", ".", "panel", "(", "panel_id", ")", "data", "=", "controllers", ".", "panel_export", "(", "store", ",", "panel_obj", ")", "data", "[", "'report_created_at'", "]", "=", "datetime", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
gene_edit
Edit additional information about a panel gene.
scout/server/blueprints/panels/views.py
def gene_edit(panel_id, hgnc_id): """Edit additional information about a panel gene.""" panel_obj = store.panel(panel_id) hgnc_gene = store.hgnc_gene(hgnc_id) panel_gene = controllers.existing_gene(store, panel_obj, hgnc_id) form = PanelGeneForm() transcript_choices = [] for transcript in h...
def gene_edit(panel_id, hgnc_id): """Edit additional information about a panel gene.""" panel_obj = store.panel(panel_id) hgnc_gene = store.hgnc_gene(hgnc_id) panel_gene = controllers.existing_gene(store, panel_obj, hgnc_id) form = PanelGeneForm() transcript_choices = [] for transcript in h...
[ "Edit", "additional", "information", "about", "a", "panel", "gene", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/panels/views.py#L147-L177
[ "def", "gene_edit", "(", "panel_id", ",", "hgnc_id", ")", ":", "panel_obj", "=", "store", ".", "panel", "(", "panel_id", ")", "hgnc_gene", "=", "store", ".", "hgnc_gene", "(", "hgnc_id", ")", "panel_gene", "=", "controllers", ".", "existing_gene", "(", "st...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
delivery_report
Add delivery report to an existing case.
scout/commands/load/report.py
def delivery_report(context, case_id, report_path, update): """Add delivery report to an existing case.""" adapter = context.obj['adapter'] try: load_delivery_report(adapter=adapter, case_id=case_id, report_path=report_path, update=update) L...
def delivery_report(context, case_id, report_path, update): """Add delivery report to an existing case.""" adapter = context.obj['adapter'] try: load_delivery_report(adapter=adapter, case_id=case_id, report_path=report_path, update=update) L...
[ "Add", "delivery", "report", "to", "an", "existing", "case", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/commands/load/report.py#L14-L26
[ "def", "delivery_report", "(", "context", ",", "case_id", ",", "report_path", ",", "update", ")", ":", "adapter", "=", "context", ".", "obj", "[", "'adapter'", "]", "try", ":", "load_delivery_report", "(", "adapter", "=", "adapter", ",", "case_id", "=", "c...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
parse_peddy_ped
Parse a peddy.ped file Args: lines(iterable(str)) Returns: peddy_ped(list(dict))
scout/parse/peddy.py
def parse_peddy_ped(lines): """Parse a peddy.ped file Args: lines(iterable(str)) Returns: peddy_ped(list(dict)) """ peddy_ped = [] header = [] for i,line in enumerate(lines): line = line.rstrip() if i == 0: # Header line heade...
def parse_peddy_ped(lines): """Parse a peddy.ped file Args: lines(iterable(str)) Returns: peddy_ped(list(dict)) """ peddy_ped = [] header = [] for i,line in enumerate(lines): line = line.rstrip() if i == 0: # Header line heade...
[ "Parse", "a", "peddy", ".", "ped", "file", "Args", ":", "lines", "(", "iterable", "(", "str", "))", "Returns", ":", "peddy_ped", "(", "list", "(", "dict", "))" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/parse/peddy.py#L3-L41
[ "def", "parse_peddy_ped", "(", "lines", ")", ":", "peddy_ped", "=", "[", "]", "header", "=", "[", "]", "for", "i", ",", "line", "in", "enumerate", "(", "lines", ")", ":", "line", "=", "line", ".", "rstrip", "(", ")", "if", "i", "==", "0", ":", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
parse_peddy_ped_check
Parse a .ped_check.csv file Args: lines(iterable(str)) Returns: ped_check(list(dict))
scout/parse/peddy.py
def parse_peddy_ped_check(lines): """Parse a .ped_check.csv file Args: lines(iterable(str)) Returns: ped_check(list(dict)) """ ped_check = [] header = [] for i,line in enumerate(lines): line = line.rstrip() if i == 0: # Header line ...
def parse_peddy_ped_check(lines): """Parse a .ped_check.csv file Args: lines(iterable(str)) Returns: ped_check(list(dict)) """ ped_check = [] header = [] for i,line in enumerate(lines): line = line.rstrip() if i == 0: # Header line ...
[ "Parse", "a", ".", "ped_check", ".", "csv", "file", "Args", ":", "lines", "(", "iterable", "(", "str", "))", "Returns", ":", "ped_check", "(", "list", "(", "dict", "))" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/parse/peddy.py#L43-L108
[ "def", "parse_peddy_ped_check", "(", "lines", ")", ":", "ped_check", "=", "[", "]", "header", "=", "[", "]", "for", "i", ",", "line", "in", "enumerate", "(", "lines", ")", ":", "line", "=", "line", ".", "rstrip", "(", ")", "if", "i", "==", "0", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
parse_peddy_sex_check
Parse a .ped_check.csv file Args: lines(iterable(str)) Returns: sex_check(list(dict))
scout/parse/peddy.py
def parse_peddy_sex_check(lines): """Parse a .ped_check.csv file Args: lines(iterable(str)) Returns: sex_check(list(dict)) """ sex_check = [] header = [] for i,line in enumerate(lines): line = line.rstrip() if i == 0: # Header line ...
def parse_peddy_sex_check(lines): """Parse a .ped_check.csv file Args: lines(iterable(str)) Returns: sex_check(list(dict)) """ sex_check = [] header = [] for i,line in enumerate(lines): line = line.rstrip() if i == 0: # Header line ...
[ "Parse", "a", ".", "ped_check", ".", "csv", "file", "Args", ":", "lines", "(", "iterable", "(", "str", "))", "Returns", ":", "sex_check", "(", "list", "(", "dict", "))" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/parse/peddy.py#L110-L145
[ "def", "parse_peddy_sex_check", "(", "lines", ")", ":", "sex_check", "=", "[", "]", "header", "=", "[", "]", "for", "i", ",", "line", "in", "enumerate", "(", "lines", ")", ":", "line", "=", "line", ".", "rstrip", "(", ")", "if", "i", "==", "0", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
hpo_terms
Retrieves a list of HPO terms from scout database Args: store (obj): an adapter to the scout database query (str): the term to search in the database limit (str): the number of desired results Returns: hpo_phenotypes (dict): the complete list of HPO objects stored in scout
scout/server/blueprints/phenotypes/controllers.py
def hpo_terms(store, query = None, limit = None): """Retrieves a list of HPO terms from scout database Args: store (obj): an adapter to the scout database query (str): the term to search in the database limit (str): the number of desired results Returns: hpo_phenotypes (dic...
def hpo_terms(store, query = None, limit = None): """Retrieves a list of HPO terms from scout database Args: store (obj): an adapter to the scout database query (str): the term to search in the database limit (str): the number of desired results Returns: hpo_phenotypes (dic...
[ "Retrieves", "a", "list", "of", "HPO", "terms", "from", "scout", "database" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/phenotypes/controllers.py#L3-L20
[ "def", "hpo_terms", "(", "store", ",", "query", "=", "None", ",", "limit", "=", "None", ")", ":", "hpo_phenotypes", "=", "{", "}", "if", "limit", ":", "limit", "=", "int", "(", "limit", ")", "hpo_phenotypes", "[", "'phenotypes'", "]", "=", "list", "(...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
whitelist
Show all objects in the whitelist collection
scout/commands/view/whitelist.py
def whitelist(context): """Show all objects in the whitelist collection""" LOG.info("Running scout view users") adapter = context.obj['adapter'] ## TODO add a User interface to the adapter for whitelist_obj in adapter.whitelist_collection.find(): click.echo(whitelist_obj['_id'])
def whitelist(context): """Show all objects in the whitelist collection""" LOG.info("Running scout view users") adapter = context.obj['adapter'] ## TODO add a User interface to the adapter for whitelist_obj in adapter.whitelist_collection.find(): click.echo(whitelist_obj['_id'])
[ "Show", "all", "objects", "in", "the", "whitelist", "collection" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/commands/view/whitelist.py#L9-L16
[ "def", "whitelist", "(", "context", ")", ":", "LOG", ".", "info", "(", "\"Running scout view users\"", ")", "adapter", "=", "context", ".", "obj", "[", "'adapter'", "]", "## TODO add a User interface to the adapter", "for", "whitelist_obj", "in", "adapter", ".", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
build_phenotype
Build a small phenotype object Build a dictionary with phenotype_id and description Args: phenotype_id (str): The phenotype id adapter (scout.adapter.MongoAdapter) Returns: phenotype_obj (dict): dict( phenotype_id = str, feature = str, # descri...
scout/build/case.py
def build_phenotype(phenotype_id, adapter): """Build a small phenotype object Build a dictionary with phenotype_id and description Args: phenotype_id (str): The phenotype id adapter (scout.adapter.MongoAdapter) Returns: phenotype_obj (dict): dict( phen...
def build_phenotype(phenotype_id, adapter): """Build a small phenotype object Build a dictionary with phenotype_id and description Args: phenotype_id (str): The phenotype id adapter (scout.adapter.MongoAdapter) Returns: phenotype_obj (dict): dict( phen...
[ "Build", "a", "small", "phenotype", "object" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/build/case.py#L11-L33
[ "def", "build_phenotype", "(", "phenotype_id", ",", "adapter", ")", ":", "phenotype_obj", "=", "{", "}", "phenotype", "=", "adapter", ".", "hpo_term", "(", "phenotype_id", ")", "if", "phenotype", ":", "phenotype_obj", "[", "'phenotype_id'", "]", "=", "phenotyp...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
build_case
Build a case object that is to be inserted to the database Args: case_data (dict): A dictionary with the relevant case information adapter (scout.adapter.MongoAdapter) Returns: case_obj (dict): A case object dict( case_id = str, # required=True, unique display_name...
scout/build/case.py
def build_case(case_data, adapter): """Build a case object that is to be inserted to the database Args: case_data (dict): A dictionary with the relevant case information adapter (scout.adapter.MongoAdapter) Returns: case_obj (dict): A case object dict( case_id = str, #...
def build_case(case_data, adapter): """Build a case object that is to be inserted to the database Args: case_data (dict): A dictionary with the relevant case information adapter (scout.adapter.MongoAdapter) Returns: case_obj (dict): A case object dict( case_id = str, #...
[ "Build", "a", "case", "object", "that", "is", "to", "be", "inserted", "to", "the", "database" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/build/case.py#L35-L239
[ "def", "build_case", "(", "case_data", ",", "adapter", ")", ":", "log", ".", "info", "(", "\"build case with id: {0}\"", ".", "format", "(", "case_data", "[", "'case_id'", "]", ")", ")", "case_obj", "=", "{", "'_id'", ":", "case_data", "[", "'case_id'", "]...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
gene
Parse information about a gene.
scout/server/blueprints/genes/controllers.py
def gene(store, hgnc_id): """Parse information about a gene.""" res = {'builds': {'37': None, '38': None}, 'symbol': None, 'description': None, 'ensembl_id': None, 'record': None} for build in res['builds']: record = store.hgnc_gene(hgnc_id, build=build) if record: record['posi...
def gene(store, hgnc_id): """Parse information about a gene.""" res = {'builds': {'37': None, '38': None}, 'symbol': None, 'description': None, 'ensembl_id': None, 'record': None} for build in res['builds']: record = store.hgnc_gene(hgnc_id, build=build) if record: record['posi...
[ "Parse", "information", "about", "a", "gene", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/genes/controllers.py#L6-L44
[ "def", "gene", "(", "store", ",", "hgnc_id", ")", ":", "res", "=", "{", "'builds'", ":", "{", "'37'", ":", "None", ",", "'38'", ":", "None", "}", ",", "'symbol'", ":", "None", ",", "'description'", ":", "None", ",", "'ensembl_id'", ":", "None", ","...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
genes_to_json
Fetch matching genes and convert to JSON.
scout/server/blueprints/genes/controllers.py
def genes_to_json(store, query): """Fetch matching genes and convert to JSON.""" gene_query = store.hgnc_genes(query, search=True) json_terms = [{'name': "{} | {} ({})".format(gene['hgnc_id'], gene['hgnc_symbol'], ', '.join(gene['aliases'])), ...
def genes_to_json(store, query): """Fetch matching genes and convert to JSON.""" gene_query = store.hgnc_genes(query, search=True) json_terms = [{'name': "{} | {} ({})".format(gene['hgnc_id'], gene['hgnc_symbol'], ', '.join(gene['aliases'])), ...
[ "Fetch", "matching", "genes", "and", "convert", "to", "JSON", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/genes/controllers.py#L48-L54
[ "def", "genes_to_json", "(", "store", ",", "query", ")", ":", "gene_query", "=", "store", ".", "hgnc_genes", "(", "query", ",", "search", "=", "True", ")", "json_terms", "=", "[", "{", "'name'", ":", "\"{} | {} ({})\"", ".", "format", "(", "gene", "[", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
index
Display the Scout dashboard.
scout/server/blueprints/dashboard/views.py
def index(): """Display the Scout dashboard.""" accessible_institutes = current_user.institutes if not 'admin' in current_user.roles: accessible_institutes = current_user.institutes if not accessible_institutes: flash('Not allowed to see information - please visit the dashboard l...
def index(): """Display the Scout dashboard.""" accessible_institutes = current_user.institutes if not 'admin' in current_user.roles: accessible_institutes = current_user.institutes if not accessible_institutes: flash('Not allowed to see information - please visit the dashboard l...
[ "Display", "the", "Scout", "dashboard", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/dashboard/views.py#L18-L70
[ "def", "index", "(", ")", ":", "accessible_institutes", "=", "current_user", ".", "institutes", "if", "not", "'admin'", "in", "current_user", ".", "roles", ":", "accessible_institutes", "=", "current_user", ".", "institutes", "if", "not", "accessible_institutes", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
weekday
Simple tag - returns the weekday of the given (year, month, day) or of given (weekday_number). Usage (in template): {% weekday 2014 3 3 %} Result: Mon Return abbreviation by default. To return full name: pass full=True {% weekday 2014 3 3 full=True %} Result: Monday When only number ...
happenings/templatetags/weekday.py
def weekday(year_or_num, month=None, day=None, full=False): """Simple tag - returns the weekday of the given (year, month, day) or of given (weekday_number). Usage (in template): {% weekday 2014 3 3 %} Result: Mon Return abbreviation by default. To return full name: pass full=True {% weekda...
def weekday(year_or_num, month=None, day=None, full=False): """Simple tag - returns the weekday of the given (year, month, day) or of given (weekday_number). Usage (in template): {% weekday 2014 3 3 %} Result: Mon Return abbreviation by default. To return full name: pass full=True {% weekda...
[ "Simple", "tag", "-", "returns", "the", "weekday", "of", "the", "given", "(", "year", "month", "day", ")", "or", "of", "given", "(", "weekday_number", ")", "." ]
wreckage/django-happenings
python
https://github.com/wreckage/django-happenings/blob/7bca5576efa6cd4c4e87356bf9e5b8cd538ae91d/happenings/templatetags/weekday.py#L12-L48
[ "def", "weekday", "(", "year_or_num", ",", "month", "=", "None", ",", "day", "=", "None", ",", "full", "=", "False", ")", ":", "if", "any", "(", "[", "month", ",", "day", "]", ")", "and", "not", "all", "(", "[", "month", ",", "day", "]", ")", ...
7bca5576efa6cd4c4e87356bf9e5b8cd538ae91d
test
get_request
Return a requests response from url Args: url(str) Returns: decoded_data(str): Decoded response
scout/utils/requests.py
def get_request(url): """Return a requests response from url Args: url(str) Returns: decoded_data(str): Decoded response """ try: LOG.info("Requesting %s", url) response = urllib.request.urlopen(url) if url.endswith('.gz'): LOG.info("Deco...
def get_request(url): """Return a requests response from url Args: url(str) Returns: decoded_data(str): Decoded response """ try: LOG.info("Requesting %s", url) response = urllib.request.urlopen(url) if url.endswith('.gz'): LOG.info("Deco...
[ "Return", "a", "requests", "response", "from", "url", "Args", ":", "url", "(", "str", ")", "Returns", ":", "decoded_data", "(", "str", ")", ":", "Decoded", "response" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/requests.py#L15-L43
[ "def", "get_request", "(", "url", ")", ":", "try", ":", "LOG", ".", "info", "(", "\"Requesting %s\"", ",", "url", ")", "response", "=", "urllib", ".", "request", ".", "urlopen", "(", "url", ")", "if", "url", ".", "endswith", "(", "'.gz'", ")", ":", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
fetch_resource
Fetch a resource and return the resulting lines in a list Send file_name to get more clean log messages Args: url(str) Returns: lines(list(str))
scout/utils/requests.py
def fetch_resource(url): """Fetch a resource and return the resulting lines in a list Send file_name to get more clean log messages Args: url(str) Returns: lines(list(str)) """ try: data = get_request(url) lines = data.split('\n') except Exception as...
def fetch_resource(url): """Fetch a resource and return the resulting lines in a list Send file_name to get more clean log messages Args: url(str) Returns: lines(list(str)) """ try: data = get_request(url) lines = data.split('\n') except Exception as...
[ "Fetch", "a", "resource", "and", "return", "the", "resulting", "lines", "in", "a", "list", "Send", "file_name", "to", "get", "more", "clean", "log", "messages", "Args", ":", "url", "(", "str", ")", "Returns", ":", "lines", "(", "list", "(", "str", "))"...
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/requests.py#L46-L62
[ "def", "fetch_resource", "(", "url", ")", ":", "try", ":", "data", "=", "get_request", "(", "url", ")", "lines", "=", "data", ".", "split", "(", "'\\n'", ")", "except", "Exception", "as", "err", ":", "raise", "err", "return", "lines" ]
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
fetch_mim_files
Fetch the necessary mim files using a api key Args: api_key(str): A api key necessary to fetch mim data Returns: mim_files(dict): A dictionary with the neccesary files
scout/utils/requests.py
def fetch_mim_files(api_key, mim2genes=False, mimtitles=False, morbidmap=False, genemap2=False): """Fetch the necessary mim files using a api key Args: api_key(str): A api key necessary to fetch mim data Returns: mim_files(dict): A dictionary with the neccesary files """ L...
def fetch_mim_files(api_key, mim2genes=False, mimtitles=False, morbidmap=False, genemap2=False): """Fetch the necessary mim files using a api key Args: api_key(str): A api key necessary to fetch mim data Returns: mim_files(dict): A dictionary with the neccesary files """ L...
[ "Fetch", "the", "necessary", "mim", "files", "using", "a", "api", "key", "Args", ":", "api_key", "(", "str", ")", ":", "A", "api", "key", "necessary", "to", "fetch", "mim", "data", "Returns", ":", "mim_files", "(", "dict", ")", ":", "A", "dictionary", ...
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/requests.py#L64-L96
[ "def", "fetch_mim_files", "(", "api_key", ",", "mim2genes", "=", "False", ",", "mimtitles", "=", "False", ",", "morbidmap", "=", "False", ",", "genemap2", "=", "False", ")", ":", "LOG", ".", "info", "(", "\"Fetching OMIM files from https://omim.org/\"", ")", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
fetch_ensembl_genes
Fetch the ensembl genes Args: build(str): ['37', '38']
scout/utils/requests.py
def fetch_ensembl_genes(build='37'): """Fetch the ensembl genes Args: build(str): ['37', '38'] """ if build == '37': url = 'http://grch37.ensembl.org' else: url = 'http://www.ensembl.org' LOG.info("Fetching ensembl genes from %s", url) dataset_name = 'hsapie...
def fetch_ensembl_genes(build='37'): """Fetch the ensembl genes Args: build(str): ['37', '38'] """ if build == '37': url = 'http://grch37.ensembl.org' else: url = 'http://www.ensembl.org' LOG.info("Fetching ensembl genes from %s", url) dataset_name = 'hsapie...
[ "Fetch", "the", "ensembl", "genes", "Args", ":", "build", "(", "str", ")", ":", "[", "37", "38", "]" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/requests.py#L144-L179
[ "def", "fetch_ensembl_genes", "(", "build", "=", "'37'", ")", ":", "if", "build", "==", "'37'", ":", "url", "=", "'http://grch37.ensembl.org'", "else", ":", "url", "=", "'http://www.ensembl.org'", "LOG", ".", "info", "(", "\"Fetching ensembl genes from %s\"", ",",...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
fetch_ensembl_exons
Fetch the ensembl genes Args: build(str): ['37', '38']
scout/utils/requests.py
def fetch_ensembl_exons(build='37'): """Fetch the ensembl genes Args: build(str): ['37', '38'] """ LOG.info("Fetching ensembl exons build %s ...", build) if build == '37': url = 'http://grch37.ensembl.org' else: url = 'http://www.ensembl.org' dataset_name = ...
def fetch_ensembl_exons(build='37'): """Fetch the ensembl genes Args: build(str): ['37', '38'] """ LOG.info("Fetching ensembl exons build %s ...", build) if build == '37': url = 'http://grch37.ensembl.org' else: url = 'http://www.ensembl.org' dataset_name = ...
[ "Fetch", "the", "ensembl", "genes", "Args", ":", "build", "(", "str", ")", ":", "[", "37", "38", "]" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/requests.py#L225-L265
[ "def", "fetch_ensembl_exons", "(", "build", "=", "'37'", ")", ":", "LOG", ".", "info", "(", "\"Fetching ensembl exons build %s ...\"", ",", "build", ")", "if", "build", "==", "'37'", ":", "url", "=", "'http://grch37.ensembl.org'", "else", ":", "url", "=", "'ht...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
fetch_hgnc
Fetch the hgnc genes file from ftp://ftp.ebi.ac.uk/pub/databases/genenames/new/tsv/hgnc_complete_set.txt Returns: hgnc_gene_lines(list(str))
scout/utils/requests.py
def fetch_hgnc(): """Fetch the hgnc genes file from ftp://ftp.ebi.ac.uk/pub/databases/genenames/new/tsv/hgnc_complete_set.txt Returns: hgnc_gene_lines(list(str)) """ file_name = "hgnc_complete_set.txt" url = 'ftp://ftp.ebi.ac.uk/pub/databases/genenames/new/tsv/{0}'.format(file_...
def fetch_hgnc(): """Fetch the hgnc genes file from ftp://ftp.ebi.ac.uk/pub/databases/genenames/new/tsv/hgnc_complete_set.txt Returns: hgnc_gene_lines(list(str)) """ file_name = "hgnc_complete_set.txt" url = 'ftp://ftp.ebi.ac.uk/pub/databases/genenames/new/tsv/{0}'.format(file_...
[ "Fetch", "the", "hgnc", "genes", "file", "from", "ftp", ":", "//", "ftp", ".", "ebi", ".", "ac", ".", "uk", "/", "pub", "/", "databases", "/", "genenames", "/", "new", "/", "tsv", "/", "hgnc_complete_set", ".", "txt", "Returns", ":", "hgnc_gene_lines",...
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/requests.py#L267-L280
[ "def", "fetch_hgnc", "(", ")", ":", "file_name", "=", "\"hgnc_complete_set.txt\"", "url", "=", "'ftp://ftp.ebi.ac.uk/pub/databases/genenames/new/tsv/{0}'", ".", "format", "(", "file_name", ")", "LOG", ".", "info", "(", "\"Fetching HGNC genes\"", ")", "hgnc_lines", "=", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
fetch_exac_constraint
Fetch the file with exac constraint scores Returns: exac_lines(iterable(str))
scout/utils/requests.py
def fetch_exac_constraint(): """Fetch the file with exac constraint scores Returns: exac_lines(iterable(str)) """ file_name = 'fordist_cleaned_exac_r03_march16_z_pli_rec_null_data.txt' url = ('ftp://ftp.broadinstitute.org/pub/ExAC_release/release0.3/functional_gene_constraint' ...
def fetch_exac_constraint(): """Fetch the file with exac constraint scores Returns: exac_lines(iterable(str)) """ file_name = 'fordist_cleaned_exac_r03_march16_z_pli_rec_null_data.txt' url = ('ftp://ftp.broadinstitute.org/pub/ExAC_release/release0.3/functional_gene_constraint' ...
[ "Fetch", "the", "file", "with", "exac", "constraint", "scores", "Returns", ":", "exac_lines", "(", "iterable", "(", "str", "))" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/requests.py#L282-L304
[ "def", "fetch_exac_constraint", "(", ")", ":", "file_name", "=", "'fordist_cleaned_exac_r03_march16_z_pli_rec_null_data.txt'", "url", "=", "(", "'ftp://ftp.broadinstitute.org/pub/ExAC_release/release0.3/functional_gene_constraint'", "'/{0}'", ")", ".", "format", "(", "file_name", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
fetch_hpo_files
Fetch the necessary mim files using a api key Args: api_key(str): A api key necessary to fetch mim data Returns: mim_files(dict): A dictionary with the neccesary files
scout/utils/requests.py
def fetch_hpo_files(hpogenes=False, hpoterms=False, phenotype_to_terms=False, hpodisease=False): """Fetch the necessary mim files using a api key Args: api_key(str): A api key necessary to fetch mim data Returns: mim_files(dict): A dictionary with the neccesary files """ L...
def fetch_hpo_files(hpogenes=False, hpoterms=False, phenotype_to_terms=False, hpodisease=False): """Fetch the necessary mim files using a api key Args: api_key(str): A api key necessary to fetch mim data Returns: mim_files(dict): A dictionary with the neccesary files """ L...
[ "Fetch", "the", "necessary", "mim", "files", "using", "a", "api", "key", "Args", ":", "api_key", "(", "str", ")", ":", "A", "api", "key", "necessary", "to", "fetch", "mim", "data", "Returns", ":", "mim_files", "(", "dict", ")", ":", "A", "dictionary", ...
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/utils/requests.py#L306-L340
[ "def", "fetch_hpo_files", "(", "hpogenes", "=", "False", ",", "hpoterms", "=", "False", ",", "phenotype_to_terms", "=", "False", ",", "hpodisease", "=", "False", ")", ":", "LOG", ".", "info", "(", "\"Fetching HPO information from http://compbio.charite.de\"", ")", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
transcripts
Show all transcripts in the database
scout/commands/view/transcripts.py
def transcripts(context, build, hgnc_id, json): """Show all transcripts in the database""" LOG.info("Running scout view transcripts") adapter = context.obj['adapter'] if not json: click.echo("Chromosome\tstart\tend\ttranscript_id\thgnc_id\trefseq\tis_primary") for tx_obj in adapter.transcri...
def transcripts(context, build, hgnc_id, json): """Show all transcripts in the database""" LOG.info("Running scout view transcripts") adapter = context.obj['adapter'] if not json: click.echo("Chromosome\tstart\tend\ttranscript_id\thgnc_id\trefseq\tis_primary") for tx_obj in adapter.transcri...
[ "Show", "all", "transcripts", "in", "the", "database" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/commands/view/transcripts.py#L13-L32
[ "def", "transcripts", "(", "context", ",", "build", ",", "hgnc_id", ",", "json", ")", ":", "LOG", ".", "info", "(", "\"Running scout view transcripts\"", ")", "adapter", "=", "context", ".", "obj", "[", "'adapter'", "]", "if", "not", "json", ":", "click", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
add_occurrences
Adds an occurrence key to the event object w/ a list of occurrences and adds a popover (for use with twitter bootstrap). The occurrence is added so that each event can be aware of what day(s) it occurs in the month.
happenings/utils/displays.py
def add_occurrences(events, count): """ Adds an occurrence key to the event object w/ a list of occurrences and adds a popover (for use with twitter bootstrap). The occurrence is added so that each event can be aware of what day(s) it occurs in the month. """ for day in count: for it...
def add_occurrences(events, count): """ Adds an occurrence key to the event object w/ a list of occurrences and adds a popover (for use with twitter bootstrap). The occurrence is added so that each event can be aware of what day(s) it occurs in the month. """ for day in count: for it...
[ "Adds", "an", "occurrence", "key", "to", "the", "event", "object", "w", "/", "a", "list", "of", "occurrences", "and", "adds", "a", "popover", "(", "for", "use", "with", "twitter", "bootstrap", ")", ".", "The", "occurrence", "is", "added", "so", "that", ...
wreckage/django-happenings
python
https://github.com/wreckage/django-happenings/blob/7bca5576efa6cd4c4e87356bf9e5b8cd538ae91d/happenings/utils/displays.py#L25-L40
[ "def", "add_occurrences", "(", "events", ",", "count", ")", ":", "for", "day", "in", "count", ":", "for", "item", "in", "count", "[", "day", "]", ":", "for", "event", "in", "events", ":", "if", "event", ".", "pk", "==", "item", "[", "1", "]", ":"...
7bca5576efa6cd4c4e87356bf9e5b8cd538ae91d
test
month_display
A function that returns an html calendar for the given month in the given year, with the number of events for that month shown on the generated calendar. Start_day is the day the calendar should start on (default is Monday).
happenings/utils/displays.py
def month_display(year, month, all_month_events, start_day, net, qs, mini=False, request=None, context=None): """ A function that returns an html calendar for the given month in the given year, with the number of events for that month shown on the generated calendar. Start_day is the d...
def month_display(year, month, all_month_events, start_day, net, qs, mini=False, request=None, context=None): """ A function that returns an html calendar for the given month in the given year, with the number of events for that month shown on the generated calendar. Start_day is the d...
[ "A", "function", "that", "returns", "an", "html", "calendar", "for", "the", "given", "month", "in", "the", "given", "year", "with", "the", "number", "of", "events", "for", "that", "month", "shown", "on", "the", "generated", "calendar", ".", "Start_day", "i...
wreckage/django-happenings
python
https://github.com/wreckage/django-happenings/blob/7bca5576efa6cd4c4e87356bf9e5b8cd538ae91d/happenings/utils/displays.py#L43-L83
[ "def", "month_display", "(", "year", ",", "month", ",", "all_month_events", ",", "start_day", ",", "net", ",", "qs", ",", "mini", "=", "False", ",", "request", "=", "None", ",", "context", "=", "None", ")", ":", "# count the number of times events happen on a ...
7bca5576efa6cd4c4e87356bf9e5b8cd538ae91d
test
day_display
Returns the events that occur on the given day. Works by getting all occurrences for the month, then drilling down to only those occurring on the given day.
happenings/utils/displays.py
def day_display(year, month, all_month_events, day): """ Returns the events that occur on the given day. Works by getting all occurrences for the month, then drilling down to only those occurring on the given day. """ # Get a dict with all of the events for the month count = CountHandler(yea...
def day_display(year, month, all_month_events, day): """ Returns the events that occur on the given day. Works by getting all occurrences for the month, then drilling down to only those occurring on the given day. """ # Get a dict with all of the events for the month count = CountHandler(yea...
[ "Returns", "the", "events", "that", "occur", "on", "the", "given", "day", ".", "Works", "by", "getting", "all", "occurrences", "for", "the", "month", "then", "drilling", "down", "to", "only", "those", "occurring", "on", "the", "given", "day", "." ]
wreckage/django-happenings
python
https://github.com/wreckage/django-happenings/blob/7bca5576efa6cd4c4e87356bf9e5b8cd538ae91d/happenings/utils/displays.py#L86-L100
[ "def", "day_display", "(", "year", ",", "month", ",", "all_month_events", ",", "day", ")", ":", "# Get a dict with all of the events for the month", "count", "=", "CountHandler", "(", "year", ",", "month", ",", "all_month_events", ")", ".", "get_count", "(", ")", ...
7bca5576efa6cd4c4e87356bf9e5b8cd538ae91d
test
variants
Pre-process list of variants.
scout/server/blueprints/variants/controllers.py
def variants(store, institute_obj, case_obj, variants_query, page=1, per_page=50): """Pre-process list of variants.""" variant_count = variants_query.count() skip_count = per_page * max(page - 1, 0) more_variants = True if variant_count > (skip_count + per_page) else False variant_res = variants_que...
def variants(store, institute_obj, case_obj, variants_query, page=1, per_page=50): """Pre-process list of variants.""" variant_count = variants_query.count() skip_count = per_page * max(page - 1, 0) more_variants = True if variant_count > (skip_count + per_page) else False variant_res = variants_que...
[ "Pre", "-", "process", "list", "of", "variants", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L34-L55
[ "def", "variants", "(", "store", ",", "institute_obj", ",", "case_obj", ",", "variants_query", ",", "page", "=", "1", ",", "per_page", "=", "50", ")", ":", "variant_count", "=", "variants_query", ".", "count", "(", ")", "skip_count", "=", "per_page", "*", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
sv_variants
Pre-process list of SV variants.
scout/server/blueprints/variants/controllers.py
def sv_variants(store, institute_obj, case_obj, variants_query, page=1, per_page=50): """Pre-process list of SV variants.""" skip_count = (per_page * max(page - 1, 0)) more_variants = True if variants_query.count() > (skip_count + per_page) else False genome_build = case_obj.get('genome_build', '37') ...
def sv_variants(store, institute_obj, case_obj, variants_query, page=1, per_page=50): """Pre-process list of SV variants.""" skip_count = (per_page * max(page - 1, 0)) more_variants = True if variants_query.count() > (skip_count + per_page) else False genome_build = case_obj.get('genome_build', '37') ...
[ "Pre", "-", "process", "list", "of", "SV", "variants", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L57-L70
[ "def", "sv_variants", "(", "store", ",", "institute_obj", ",", "case_obj", ",", "variants_query", ",", "page", "=", "1", ",", "per_page", "=", "50", ")", ":", "skip_count", "=", "(", "per_page", "*", "max", "(", "page", "-", "1", ",", "0", ")", ")", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
str_variants
Pre-process list of STR variants.
scout/server/blueprints/variants/controllers.py
def str_variants(store, institute_obj, case_obj, variants_query, page=1, per_page=50): """Pre-process list of STR variants.""" # Nothing unique to STRs on this level. Inheritance? return variants(store, institute_obj, case_obj, variants_query, page, per_page)
def str_variants(store, institute_obj, case_obj, variants_query, page=1, per_page=50): """Pre-process list of STR variants.""" # Nothing unique to STRs on this level. Inheritance? return variants(store, institute_obj, case_obj, variants_query, page, per_page)
[ "Pre", "-", "process", "list", "of", "STR", "variants", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L72-L75
[ "def", "str_variants", "(", "store", ",", "institute_obj", ",", "case_obj", ",", "variants_query", ",", "page", "=", "1", ",", "per_page", "=", "50", ")", ":", "# Nothing unique to STRs on this level. Inheritance?", "return", "variants", "(", "store", ",", "instit...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
str_variant
Pre-process an STR variant entry for detail page. Adds information to display variant Args: store(scout.adapter.MongoAdapter) institute_id(str) case_name(str) variant_id(str) Returns: detailed_information(dict): { 'institute': <institute_obj>, ...
scout/server/blueprints/variants/controllers.py
def str_variant(store, institute_id, case_name, variant_id): """Pre-process an STR variant entry for detail page. Adds information to display variant Args: store(scout.adapter.MongoAdapter) institute_id(str) case_name(str) variant_id(str) Returns: detailed_info...
def str_variant(store, institute_id, case_name, variant_id): """Pre-process an STR variant entry for detail page. Adds information to display variant Args: store(scout.adapter.MongoAdapter) institute_id(str) case_name(str) variant_id(str) Returns: detailed_info...
[ "Pre", "-", "process", "an", "STR", "variant", "entry", "for", "detail", "page", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L77-L121
[ "def", "str_variant", "(", "store", ",", "institute_id", ",", "case_name", ",", "variant_id", ")", ":", "institute_obj", ",", "case_obj", "=", "institute_and_case", "(", "store", ",", "institute_id", ",", "case_name", ")", "variant_obj", "=", "store", ".", "va...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
sv_variant
Pre-process an SV variant entry for detail page. Adds information to display variant Args: store(scout.adapter.MongoAdapter) institute_id(str) case_name(str) variant_id(str) variant_obj(dcit) add_case(bool): If information about case files should be added R...
scout/server/blueprints/variants/controllers.py
def sv_variant(store, institute_id, case_name, variant_id=None, variant_obj=None, add_case=True, get_overlapping=True): """Pre-process an SV variant entry for detail page. Adds information to display variant Args: store(scout.adapter.MongoAdapter) institute_id(str) c...
def sv_variant(store, institute_id, case_name, variant_id=None, variant_obj=None, add_case=True, get_overlapping=True): """Pre-process an SV variant entry for detail page. Adds information to display variant Args: store(scout.adapter.MongoAdapter) institute_id(str) c...
[ "Pre", "-", "process", "an", "SV", "variant", "entry", "for", "detail", "page", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L123-L202
[ "def", "sv_variant", "(", "store", ",", "institute_id", ",", "case_name", ",", "variant_id", "=", "None", ",", "variant_obj", "=", "None", ",", "add_case", "=", "True", ",", "get_overlapping", "=", "True", ")", ":", "institute_obj", ",", "case_obj", "=", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
parse_variant
Parse information about variants. - Adds information about compounds - Updates the information about compounds if necessary and 'update=True' Args: store(scout.adapter.MongoAdapter) institute_obj(scout.models.Institute) case_obj(scout.models.Case) variant_obj(scout.models.V...
scout/server/blueprints/variants/controllers.py
def parse_variant(store, institute_obj, case_obj, variant_obj, update=False, genome_build='37', get_compounds = True): """Parse information about variants. - Adds information about compounds - Updates the information about compounds if necessary and 'update=True' Args: store(...
def parse_variant(store, institute_obj, case_obj, variant_obj, update=False, genome_build='37', get_compounds = True): """Parse information about variants. - Adds information about compounds - Updates the information about compounds if necessary and 'update=True' Args: store(...
[ "Parse", "information", "about", "variants", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L205-L277
[ "def", "parse_variant", "(", "store", ",", "institute_obj", ",", "case_obj", ",", "variant_obj", ",", "update", "=", "False", ",", "genome_build", "=", "'37'", ",", "get_compounds", "=", "True", ")", ":", "has_changed", "=", "False", "compounds", "=", "varia...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
variant_export_lines
Get variants info to be exported to file, one list (line) per variant. Args: store(scout.adapter.MongoAdapter) case_obj(scout.models.Case) variants_query: a list of variant objects, each one is a dictionary Returns: export_variants: a list of strings. Ea...
scout/server/blueprints/variants/controllers.py
def variant_export_lines(store, case_obj, variants_query): """Get variants info to be exported to file, one list (line) per variant. Args: store(scout.adapter.MongoAdapter) case_obj(scout.models.Case) variants_query: a list of variant objects, each one is a dictionary ...
def variant_export_lines(store, case_obj, variants_query): """Get variants info to be exported to file, one list (line) per variant. Args: store(scout.adapter.MongoAdapter) case_obj(scout.models.Case) variants_query: a list of variant objects, each one is a dictionary ...
[ "Get", "variants", "info", "to", "be", "exported", "to", "file", "one", "list", "(", "line", ")", "per", "variant", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L280-L349
[ "def", "variant_export_lines", "(", "store", ",", "case_obj", ",", "variants_query", ")", ":", "export_variants", "=", "[", "]", "for", "variant", "in", "variants_query", ":", "variant_line", "=", "[", "]", "position", "=", "variant", "[", "'position'", "]", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
variants_export_header
Returns a header for the CSV file with the filtered variants to be exported. Args: case_obj(scout.models.Case) Returns: header: includes the fields defined in scout.constants.variants_export EXPORT_HEADER + AD_reference, AD_alternate, GT_quality for each sam...
scout/server/blueprints/variants/controllers.py
def variants_export_header(case_obj): """Returns a header for the CSV file with the filtered variants to be exported. Args: case_obj(scout.models.Case) Returns: header: includes the fields defined in scout.constants.variants_export EXPORT_HEADER + AD_ref...
def variants_export_header(case_obj): """Returns a header for the CSV file with the filtered variants to be exported. Args: case_obj(scout.models.Case) Returns: header: includes the fields defined in scout.constants.variants_export EXPORT_HEADER + AD_ref...
[ "Returns", "a", "header", "for", "the", "CSV", "file", "with", "the", "filtered", "variants", "to", "be", "exported", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L352-L370
[ "def", "variants_export_header", "(", "case_obj", ")", ":", "header", "=", "[", "]", "header", "=", "header", "+", "EXPORT_HEADER", "# Add fields specific for case samples", "for", "individual", "in", "case_obj", "[", "'individuals'", "]", ":", "display_name", "=", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
get_variant_info
Get variant information
scout/server/blueprints/variants/controllers.py
def get_variant_info(genes): """Get variant information""" data = {'canonical_transcripts': []} for gene_obj in genes: if not gene_obj.get('canonical_transcripts'): tx = gene_obj['transcripts'][0] tx_id = tx['transcript_id'] exon = tx.get('exon', '-') ...
def get_variant_info(genes): """Get variant information""" data = {'canonical_transcripts': []} for gene_obj in genes: if not gene_obj.get('canonical_transcripts'): tx = gene_obj['transcripts'][0] tx_id = tx['transcript_id'] exon = tx.get('exon', '-') ...
[ "Get", "variant", "information" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L373-L397
[ "def", "get_variant_info", "(", "genes", ")", ":", "data", "=", "{", "'canonical_transcripts'", ":", "[", "]", "}", "for", "gene_obj", "in", "genes", ":", "if", "not", "gene_obj", ".", "get", "(", "'canonical_transcripts'", ")", ":", "tx", "=", "gene_obj",...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
get_predictions
Get sift predictions from genes.
scout/server/blueprints/variants/controllers.py
def get_predictions(genes): """Get sift predictions from genes.""" data = { 'sift_predictions': [], 'polyphen_predictions': [], 'region_annotations': [], 'functional_annotations': [] } for gene_obj in genes: for pred_key in data: gene_key = pred_key[:-...
def get_predictions(genes): """Get sift predictions from genes.""" data = { 'sift_predictions': [], 'polyphen_predictions': [], 'region_annotations': [], 'functional_annotations': [] } for gene_obj in genes: for pred_key in data: gene_key = pred_key[:-...
[ "Get", "sift", "predictions", "from", "genes", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L400-L418
[ "def", "get_predictions", "(", "genes", ")", ":", "data", "=", "{", "'sift_predictions'", ":", "[", "]", ",", "'polyphen_predictions'", ":", "[", "]", ",", "'region_annotations'", ":", "[", "]", ",", "'functional_annotations'", ":", "[", "]", "}", "for", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
variant_case
Pre-process case for the variant view. Adds information about files from case obj to variant Args: store(scout.adapter.MongoAdapter) case_obj(scout.models.Case) variant_obj(scout.models.Variant)
scout/server/blueprints/variants/controllers.py
def variant_case(store, case_obj, variant_obj): """Pre-process case for the variant view. Adds information about files from case obj to variant Args: store(scout.adapter.MongoAdapter) case_obj(scout.models.Case) variant_obj(scout.models.Variant) """ case_obj['bam_files'] = ...
def variant_case(store, case_obj, variant_obj): """Pre-process case for the variant view. Adds information about files from case obj to variant Args: store(scout.adapter.MongoAdapter) case_obj(scout.models.Case) variant_obj(scout.models.Variant) """ case_obj['bam_files'] = ...
[ "Pre", "-", "process", "case", "for", "the", "variant", "view", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L421-L467
[ "def", "variant_case", "(", "store", ",", "case_obj", ",", "variant_obj", ")", ":", "case_obj", "[", "'bam_files'", "]", "=", "[", "]", "case_obj", "[", "'mt_bams'", "]", "=", "[", "]", "case_obj", "[", "'bai_files'", "]", "=", "[", "]", "case_obj", "[...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
find_bai_file
Find out BAI file by extension given the BAM file.
scout/server/blueprints/variants/controllers.py
def find_bai_file(bam_file): """Find out BAI file by extension given the BAM file.""" bai_file = bam_file.replace('.bam', '.bai') if not os.path.exists(bai_file): # try the other convention bai_file = "{}.bai".format(bam_file) return bai_file
def find_bai_file(bam_file): """Find out BAI file by extension given the BAM file.""" bai_file = bam_file.replace('.bam', '.bai') if not os.path.exists(bai_file): # try the other convention bai_file = "{}.bai".format(bam_file) return bai_file
[ "Find", "out", "BAI", "file", "by", "extension", "given", "the", "BAM", "file", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L470-L476
[ "def", "find_bai_file", "(", "bam_file", ")", ":", "bai_file", "=", "bam_file", ".", "replace", "(", "'.bam'", ",", "'.bai'", ")", "if", "not", "os", ".", "path", ".", "exists", "(", "bai_file", ")", ":", "# try the other convention", "bai_file", "=", "\"{...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
variant
Pre-process a single variant for the detailed variant view. Adds information from case and institute that is not present on the variant object Args: store(scout.adapter.MongoAdapter) institute_obj(scout.models.Institute) case_obj(scout.models.Case) variant_id(str) v...
scout/server/blueprints/variants/controllers.py
def variant(store, institute_obj, case_obj, variant_id=None, variant_obj=None, add_case=True, add_other=True, get_overlapping=True): """Pre-process a single variant for the detailed variant view. Adds information from case and institute that is not present on the variant object Args: ...
def variant(store, institute_obj, case_obj, variant_id=None, variant_obj=None, add_case=True, add_other=True, get_overlapping=True): """Pre-process a single variant for the detailed variant view. Adds information from case and institute that is not present on the variant object Args: ...
[ "Pre", "-", "process", "a", "single", "variant", "for", "the", "detailed", "variant", "view", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L479-L629
[ "def", "variant", "(", "store", ",", "institute_obj", ",", "case_obj", ",", "variant_id", "=", "None", ",", "variant_obj", "=", "None", ",", "add_case", "=", "True", ",", "add_other", "=", "True", ",", "get_overlapping", "=", "True", ")", ":", "# If the va...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
observations
Query observations for a variant.
scout/server/blueprints/variants/controllers.py
def observations(store, loqusdb, case_obj, variant_obj): """Query observations for a variant.""" composite_id = ("{this[chromosome]}_{this[position]}_{this[reference]}_" "{this[alternative]}".format(this=variant_obj)) obs_data = loqusdb.get_variant({'_id': composite_id}) or {} obs_da...
def observations(store, loqusdb, case_obj, variant_obj): """Query observations for a variant.""" composite_id = ("{this[chromosome]}_{this[position]}_{this[reference]}_" "{this[alternative]}".format(this=variant_obj)) obs_data = loqusdb.get_variant({'_id': composite_id}) or {} obs_da...
[ "Query", "observations", "for", "a", "variant", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L631-L646
[ "def", "observations", "(", "store", ",", "loqusdb", ",", "case_obj", ",", "variant_obj", ")", ":", "composite_id", "=", "(", "\"{this[chromosome]}_{this[position]}_{this[reference]}_\"", "\"{this[alternative]}\"", ".", "format", "(", "this", "=", "variant_obj", ")", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
parse_gene
Parse variant genes.
scout/server/blueprints/variants/controllers.py
def parse_gene(gene_obj, build=None): """Parse variant genes.""" build = build or 37 if gene_obj.get('common'): add_gene_links(gene_obj, build) refseq_transcripts = [] for tx_obj in gene_obj['transcripts']: parse_transcript(gene_obj, tx_obj, build) # select ...
def parse_gene(gene_obj, build=None): """Parse variant genes.""" build = build or 37 if gene_obj.get('common'): add_gene_links(gene_obj, build) refseq_transcripts = [] for tx_obj in gene_obj['transcripts']: parse_transcript(gene_obj, tx_obj, build) # select ...
[ "Parse", "variant", "genes", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L649-L665
[ "def", "parse_gene", "(", "gene_obj", ",", "build", "=", "None", ")", ":", "build", "=", "build", "or", "37", "if", "gene_obj", ".", "get", "(", "'common'", ")", ":", "add_gene_links", "(", "gene_obj", ",", "build", ")", "refseq_transcripts", "=", "[", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
parse_transcript
Parse variant gene transcript (VEP).
scout/server/blueprints/variants/controllers.py
def parse_transcript(gene_obj, tx_obj, build=None): """Parse variant gene transcript (VEP).""" build = build or 37 add_tx_links(tx_obj, build) if tx_obj.get('refseq_id'): gene_name = (gene_obj['common']['hgnc_symbol'] if gene_obj['common'] else gene_obj['hgnc_id']) ...
def parse_transcript(gene_obj, tx_obj, build=None): """Parse variant gene transcript (VEP).""" build = build or 37 add_tx_links(tx_obj, build) if tx_obj.get('refseq_id'): gene_name = (gene_obj['common']['hgnc_symbol'] if gene_obj['common'] else gene_obj['hgnc_id']) ...
[ "Parse", "variant", "gene", "transcript", "(", "VEP", ")", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L667-L675
[ "def", "parse_transcript", "(", "gene_obj", ",", "tx_obj", ",", "build", "=", "None", ")", ":", "build", "=", "build", "or", "37", "add_tx_links", "(", "tx_obj", ",", "build", ")", "if", "tx_obj", ".", "get", "(", "'refseq_id'", ")", ":", "gene_name", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
transcript_str
Generate amino acid change as a string.
scout/server/blueprints/variants/controllers.py
def transcript_str(transcript_obj, gene_name=None): """Generate amino acid change as a string.""" if transcript_obj.get('exon'): gene_part, part_count_raw = 'exon', transcript_obj['exon'] elif transcript_obj.get('intron'): gene_part, part_count_raw = 'intron', transcript_obj['intron'] el...
def transcript_str(transcript_obj, gene_name=None): """Generate amino acid change as a string.""" if transcript_obj.get('exon'): gene_part, part_count_raw = 'exon', transcript_obj['exon'] elif transcript_obj.get('intron'): gene_part, part_count_raw = 'intron', transcript_obj['intron'] el...
[ "Generate", "amino", "acid", "change", "as", "a", "string", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L677-L697
[ "def", "transcript_str", "(", "transcript_obj", ",", "gene_name", "=", "None", ")", ":", "if", "transcript_obj", ".", "get", "(", "'exon'", ")", ":", "gene_part", ",", "part_count_raw", "=", "'exon'", ",", "transcript_obj", "[", "'exon'", "]", "elif", "trans...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
end_position
Calculate end position for a variant.
scout/server/blueprints/variants/controllers.py
def end_position(variant_obj): """Calculate end position for a variant.""" alt_bases = len(variant_obj['alternative']) num_bases = max(len(variant_obj['reference']), alt_bases) return variant_obj['position'] + (num_bases - 1)
def end_position(variant_obj): """Calculate end position for a variant.""" alt_bases = len(variant_obj['alternative']) num_bases = max(len(variant_obj['reference']), alt_bases) return variant_obj['position'] + (num_bases - 1)
[ "Calculate", "end", "position", "for", "a", "variant", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L700-L704
[ "def", "end_position", "(", "variant_obj", ")", ":", "alt_bases", "=", "len", "(", "variant_obj", "[", "'alternative'", "]", ")", "num_bases", "=", "max", "(", "len", "(", "variant_obj", "[", "'reference'", "]", ")", ",", "alt_bases", ")", "return", "varia...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
frequency
Returns a judgement on the overall frequency of the variant. Combines multiple metrics into a single call.
scout/server/blueprints/variants/controllers.py
def frequency(variant_obj): """Returns a judgement on the overall frequency of the variant. Combines multiple metrics into a single call. """ most_common_frequency = max(variant_obj.get('thousand_genomes_frequency') or 0, variant_obj.get('exac_frequency') or 0) if mo...
def frequency(variant_obj): """Returns a judgement on the overall frequency of the variant. Combines multiple metrics into a single call. """ most_common_frequency = max(variant_obj.get('thousand_genomes_frequency') or 0, variant_obj.get('exac_frequency') or 0) if mo...
[ "Returns", "a", "judgement", "on", "the", "overall", "frequency", "of", "the", "variant", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L707-L719
[ "def", "frequency", "(", "variant_obj", ")", ":", "most_common_frequency", "=", "max", "(", "variant_obj", ".", "get", "(", "'thousand_genomes_frequency'", ")", "or", "0", ",", "variant_obj", ".", "get", "(", "'exac_frequency'", ")", "or", "0", ")", "if", "m...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
clinsig_human
Convert to human readable version of CLINSIG evaluation.
scout/server/blueprints/variants/controllers.py
def clinsig_human(variant_obj): """Convert to human readable version of CLINSIG evaluation.""" for clinsig_obj in variant_obj['clnsig']: # The clinsig objects allways have a accession if isinstance(clinsig_obj['accession'], int): # New version link = "https://www.ncbi.nlm...
def clinsig_human(variant_obj): """Convert to human readable version of CLINSIG evaluation.""" for clinsig_obj in variant_obj['clnsig']: # The clinsig objects allways have a accession if isinstance(clinsig_obj['accession'], int): # New version link = "https://www.ncbi.nlm...
[ "Convert", "to", "human", "readable", "version", "of", "CLINSIG", "evaluation", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L722-L746
[ "def", "clinsig_human", "(", "variant_obj", ")", ":", "for", "clinsig_obj", "in", "variant_obj", "[", "'clnsig'", "]", ":", "# The clinsig objects allways have a accession", "if", "isinstance", "(", "clinsig_obj", "[", "'accession'", "]", ",", "int", ")", ":", "# ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
thousandg_link
Compose link to 1000G page for detailed information.
scout/server/blueprints/variants/controllers.py
def thousandg_link(variant_obj, build=None): """Compose link to 1000G page for detailed information.""" dbsnp_id = variant_obj.get('dbsnp_id') build = build or 37 if not dbsnp_id: return None if build == 37: url_template = ("http://grch37.ensembl.org/Homo_sapiens/Variation/Explore"...
def thousandg_link(variant_obj, build=None): """Compose link to 1000G page for detailed information.""" dbsnp_id = variant_obj.get('dbsnp_id') build = build or 37 if not dbsnp_id: return None if build == 37: url_template = ("http://grch37.ensembl.org/Homo_sapiens/Variation/Explore"...
[ "Compose", "link", "to", "1000G", "page", "for", "detailed", "information", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L749-L764
[ "def", "thousandg_link", "(", "variant_obj", ",", "build", "=", "None", ")", ":", "dbsnp_id", "=", "variant_obj", ".", "get", "(", "'dbsnp_id'", ")", "build", "=", "build", "or", "37", "if", "not", "dbsnp_id", ":", "return", "None", "if", "build", "==", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
cosmic_link
Compose link to COSMIC Database. Args: variant_obj(scout.models.Variant) Returns: url_template(str): Link to COSMIIC database if cosmic id is present
scout/server/blueprints/variants/controllers.py
def cosmic_link(variant_obj): """Compose link to COSMIC Database. Args: variant_obj(scout.models.Variant) Returns: url_template(str): Link to COSMIIC database if cosmic id is present """ cosmic_ids = variant_obj.get('cosmic_ids') if not cosmic_ids: return None els...
def cosmic_link(variant_obj): """Compose link to COSMIC Database. Args: variant_obj(scout.models.Variant) Returns: url_template(str): Link to COSMIIC database if cosmic id is present """ cosmic_ids = variant_obj.get('cosmic_ids') if not cosmic_ids: return None els...
[ "Compose", "link", "to", "COSMIC", "Database", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L788-L807
[ "def", "cosmic_link", "(", "variant_obj", ")", ":", "cosmic_ids", "=", "variant_obj", ".", "get", "(", "'cosmic_ids'", ")", "if", "not", "cosmic_ids", ":", "return", "None", "else", ":", "cosmic_id", "=", "cosmic_ids", "[", "0", "]", "url_template", "=", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
beacon_link
Compose link to Beacon Network.
scout/server/blueprints/variants/controllers.py
def beacon_link(variant_obj, build=None): """Compose link to Beacon Network.""" build = build or 37 url_template = ("https://beacon-network.org/#/search?pos={this[position]}&" "chrom={this[chromosome]}&allele={this[alternative]}&" "ref={this[reference]}&rs=GRCh37") ...
def beacon_link(variant_obj, build=None): """Compose link to Beacon Network.""" build = build or 37 url_template = ("https://beacon-network.org/#/search?pos={this[position]}&" "chrom={this[chromosome]}&allele={this[alternative]}&" "ref={this[reference]}&rs=GRCh37") ...
[ "Compose", "link", "to", "Beacon", "Network", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L809-L821
[ "def", "beacon_link", "(", "variant_obj", ",", "build", "=", "None", ")", ":", "build", "=", "build", "or", "37", "url_template", "=", "(", "\"https://beacon-network.org/#/search?pos={this[position]}&\"", "\"chrom={this[chromosome]}&allele={this[alternative]}&\"", "\"ref={thi...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
ucsc_link
Compose link to UCSC.
scout/server/blueprints/variants/controllers.py
def ucsc_link(variant_obj, build=None): """Compose link to UCSC.""" build = build or 37 url_template = ("http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg19&" "position=chr{this[chromosome]}:{this[position]}" "-{this[position]}&dgv=pack&knownGene=pack&omimGene=pac...
def ucsc_link(variant_obj, build=None): """Compose link to UCSC.""" build = build or 37 url_template = ("http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg19&" "position=chr{this[chromosome]}:{this[position]}" "-{this[position]}&dgv=pack&knownGene=pack&omimGene=pac...
[ "Compose", "link", "to", "UCSC", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L824-L835
[ "def", "ucsc_link", "(", "variant_obj", ",", "build", "=", "None", ")", ":", "build", "=", "build", "or", "37", "url_template", "=", "(", "\"http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg19&\"", "\"position=chr{this[chromosome]}:{this[position]}\"", "\"-{this[position]}&dgv=pa...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
spidex_human
Translate SPIDEX annotation to human readable string.
scout/server/blueprints/variants/controllers.py
def spidex_human(variant_obj): """Translate SPIDEX annotation to human readable string.""" if variant_obj.get('spidex') is None: return 'not_reported' elif abs(variant_obj['spidex']) < SPIDEX_HUMAN['low']['pos'][1]: return 'low' elif abs(variant_obj['spidex']) < SPIDEX_HUMAN['medium']['p...
def spidex_human(variant_obj): """Translate SPIDEX annotation to human readable string.""" if variant_obj.get('spidex') is None: return 'not_reported' elif abs(variant_obj['spidex']) < SPIDEX_HUMAN['low']['pos'][1]: return 'low' elif abs(variant_obj['spidex']) < SPIDEX_HUMAN['medium']['p...
[ "Translate", "SPIDEX", "annotation", "to", "human", "readable", "string", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L844-L853
[ "def", "spidex_human", "(", "variant_obj", ")", ":", "if", "variant_obj", ".", "get", "(", "'spidex'", ")", "is", "None", ":", "return", "'not_reported'", "elif", "abs", "(", "variant_obj", "[", "'spidex'", "]", ")", "<", "SPIDEX_HUMAN", "[", "'low'", "]",...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
expected_inheritance
Gather information from common gene information.
scout/server/blueprints/variants/controllers.py
def expected_inheritance(variant_obj): """Gather information from common gene information.""" manual_models = set() for gene in variant_obj.get('genes', []): manual_models.update(gene.get('manual_inheritance', [])) return list(manual_models)
def expected_inheritance(variant_obj): """Gather information from common gene information.""" manual_models = set() for gene in variant_obj.get('genes', []): manual_models.update(gene.get('manual_inheritance', [])) return list(manual_models)
[ "Gather", "information", "from", "common", "gene", "information", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L856-L861
[ "def", "expected_inheritance", "(", "variant_obj", ")", ":", "manual_models", "=", "set", "(", ")", "for", "gene", "in", "variant_obj", ".", "get", "(", "'genes'", ",", "[", "]", ")", ":", "manual_models", ".", "update", "(", "gene", ".", "get", "(", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
callers
Return info about callers.
scout/server/blueprints/variants/controllers.py
def callers(variant_obj, category='snv'): """Return info about callers.""" calls = set() for caller in CALLERS[category]: if variant_obj.get(caller['id']): calls.add((caller['name'], variant_obj[caller['id']])) return list(calls)
def callers(variant_obj, category='snv'): """Return info about callers.""" calls = set() for caller in CALLERS[category]: if variant_obj.get(caller['id']): calls.add((caller['name'], variant_obj[caller['id']])) return list(calls)
[ "Return", "info", "about", "callers", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L864-L871
[ "def", "callers", "(", "variant_obj", ",", "category", "=", "'snv'", ")", ":", "calls", "=", "set", "(", ")", "for", "caller", "in", "CALLERS", "[", "category", "]", ":", "if", "variant_obj", ".", "get", "(", "caller", "[", "'id'", "]", ")", ":", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
variant_verification
Sand a verification email and register the verification in the database Args: store(scout.adapter.MongoAdapter) mail(scout.server.extensions.mail): an instance of flask_mail.Mail institute_obj(dict): an institute object case_obj(dict): a case object u...
scout/server/blueprints/variants/controllers.py
def variant_verification(store, mail, institute_obj, case_obj, user_obj, variant_obj, sender, variant_url, order, comment, url_builder=url_for): """Sand a verification email and register the verification in the database Args: store(scout.adapter.MongoAdapter) mail(scout.server.exten...
def variant_verification(store, mail, institute_obj, case_obj, user_obj, variant_obj, sender, variant_url, order, comment, url_builder=url_for): """Sand a verification email and register the verification in the database Args: store(scout.adapter.MongoAdapter) mail(scout.server.exten...
[ "Sand", "a", "verification", "email", "and", "register", "the", "verification", "in", "the", "database" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L874-L997
[ "def", "variant_verification", "(", "store", ",", "mail", ",", "institute_obj", ",", "case_obj", ",", "user_obj", ",", "variant_obj", ",", "sender", ",", "variant_url", ",", "order", ",", "comment", ",", "url_builder", "=", "url_for", ")", ":", "recipients", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
verification_email_body
Builds the html code for the variant verification emails (order verification and cancel verification) Args: case_name(str): case display name url(str): the complete url to the variant, accessible when clicking on the email link display_name(str): a display name for the varia...
scout/server/blueprints/variants/controllers.py
def verification_email_body(case_name, url, display_name, category, subcategory, breakpoint_1, breakpoint_2, hgnc_symbol, panels, gtcalls, tx_changes, name, comment): """ Builds the html code for the variant verification emails (order verification and cancel verification) Args: case_nam...
def verification_email_body(case_name, url, display_name, category, subcategory, breakpoint_1, breakpoint_2, hgnc_symbol, panels, gtcalls, tx_changes, name, comment): """ Builds the html code for the variant verification emails (order verification and cancel verification) Args: case_nam...
[ "Builds", "the", "html", "code", "for", "the", "variant", "verification", "emails", "(", "order", "verification", "and", "cancel", "verification", ")" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L1000-L1055
[ "def", "verification_email_body", "(", "case_name", ",", "url", ",", "display_name", ",", "category", ",", "subcategory", ",", "breakpoint_1", ",", "breakpoint_2", ",", "hgnc_symbol", ",", "panels", ",", "gtcalls", ",", "tx_changes", ",", "name", ",", "comment",...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
cancer_variants
Fetch data related to cancer variants for a case.
scout/server/blueprints/variants/controllers.py
def cancer_variants(store, request_args, institute_id, case_name): """Fetch data related to cancer variants for a case.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) form = CancerFiltersForm(request_args) variants_query = store.variants(case_obj['_id'], category='cancer...
def cancer_variants(store, request_args, institute_id, case_name): """Fetch data related to cancer variants for a case.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) form = CancerFiltersForm(request_args) variants_query = store.variants(case_obj['_id'], category='cancer...
[ "Fetch", "data", "related", "to", "cancer", "variants", "for", "a", "case", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L1058-L1071
[ "def", "cancer_variants", "(", "store", ",", "request_args", ",", "institute_id", ",", "case_name", ")", ":", "institute_obj", ",", "case_obj", "=", "institute_and_case", "(", "store", ",", "institute_id", ",", "case_name", ")", "form", "=", "CancerFiltersForm", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
clinvar_export
Gather the required data for creating the clinvar submission form Args: store(scout.adapter.MongoAdapter) institute_id(str): Institute ID case_name(str): case ID variant_id(str): variant._id Returns: a dictionary with all the required data (c...
scout/server/blueprints/variants/controllers.py
def clinvar_export(store, institute_id, case_name, variant_id): """Gather the required data for creating the clinvar submission form Args: store(scout.adapter.MongoAdapter) institute_id(str): Institute ID case_name(str): case ID variant_id(str): variant._id ...
def clinvar_export(store, institute_id, case_name, variant_id): """Gather the required data for creating the clinvar submission form Args: store(scout.adapter.MongoAdapter) institute_id(str): Institute ID case_name(str): case ID variant_id(str): variant._id ...
[ "Gather", "the", "required", "data", "for", "creating", "the", "clinvar", "submission", "form" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L1073-L1097
[ "def", "clinvar_export", "(", "store", ",", "institute_id", ",", "case_name", ",", "variant_id", ")", ":", "institute_obj", ",", "case_obj", "=", "institute_and_case", "(", "store", ",", "institute_id", ",", "case_name", ")", "pinned", "=", "[", "store", ".", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
get_clinvar_submission
Collects all variants from the clinvar submission collection with a specific submission_id Args: store(scout.adapter.MongoAdapter) institute_id(str): Institute ID case_name(str): case ID variant_id(str): variant._id submission_id(str): clinvar submiss...
scout/server/blueprints/variants/controllers.py
def get_clinvar_submission(store, institute_id, case_name, variant_id, submission_id): """Collects all variants from the clinvar submission collection with a specific submission_id Args: store(scout.adapter.MongoAdapter) institute_id(str): Institute ID case_name(str): ca...
def get_clinvar_submission(store, institute_id, case_name, variant_id, submission_id): """Collects all variants from the clinvar submission collection with a specific submission_id Args: store(scout.adapter.MongoAdapter) institute_id(str): Institute ID case_name(str): ca...
[ "Collects", "all", "variants", "from", "the", "clinvar", "submission", "collection", "with", "a", "specific", "submission_id" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L1099-L1125
[ "def", "get_clinvar_submission", "(", "store", ",", "institute_id", ",", "case_name", ",", "variant_id", ",", "submission_id", ")", ":", "institute_obj", ",", "case_obj", "=", "institute_and_case", "(", "store", ",", "institute_id", ",", "case_name", ")", "pinned"...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
variant_acmg
Collect data relevant for rendering ACMG classification form.
scout/server/blueprints/variants/controllers.py
def variant_acmg(store, institute_id, case_name, variant_id): """Collect data relevant for rendering ACMG classification form.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) variant_obj = store.variant(variant_id) return dict(institute=institute_obj, case=case_obj, varia...
def variant_acmg(store, institute_id, case_name, variant_id): """Collect data relevant for rendering ACMG classification form.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) variant_obj = store.variant(variant_id) return dict(institute=institute_obj, case=case_obj, varia...
[ "Collect", "data", "relevant", "for", "rendering", "ACMG", "classification", "form", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L1128-L1133
[ "def", "variant_acmg", "(", "store", ",", "institute_id", ",", "case_name", ",", "variant_id", ")", ":", "institute_obj", ",", "case_obj", "=", "institute_and_case", "(", "store", ",", "institute_id", ",", "case_name", ")", "variant_obj", "=", "store", ".", "v...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
variant_acmg_post
Calculate an ACMG classification based on a list of criteria.
scout/server/blueprints/variants/controllers.py
def variant_acmg_post(store, institute_id, case_name, variant_id, user_email, criteria): """Calculate an ACMG classification based on a list of criteria.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) variant_obj = store.variant(variant_id) user_obj = store.user(user_ema...
def variant_acmg_post(store, institute_id, case_name, variant_id, user_email, criteria): """Calculate an ACMG classification based on a list of criteria.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) variant_obj = store.variant(variant_id) user_obj = store.user(user_ema...
[ "Calculate", "an", "ACMG", "classification", "based", "on", "a", "list", "of", "criteria", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L1136-L1151
[ "def", "variant_acmg_post", "(", "store", ",", "institute_id", ",", "case_name", ",", "variant_id", ",", "user_email", ",", "criteria", ")", ":", "institute_obj", ",", "case_obj", "=", "institute_and_case", "(", "store", ",", "institute_id", ",", "case_name", ")...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
evaluation
Fetch and fill-in evaluation object.
scout/server/blueprints/variants/controllers.py
def evaluation(store, evaluation_obj): """Fetch and fill-in evaluation object.""" evaluation_obj['institute'] = store.institute(evaluation_obj['institute_id']) evaluation_obj['case'] = store.case(evaluation_obj['case_id']) evaluation_obj['variant'] = store.variant(evaluation_obj['variant_specific']) ...
def evaluation(store, evaluation_obj): """Fetch and fill-in evaluation object.""" evaluation_obj['institute'] = store.institute(evaluation_obj['institute_id']) evaluation_obj['case'] = store.case(evaluation_obj['case_id']) evaluation_obj['variant'] = store.variant(evaluation_obj['variant_specific']) ...
[ "Fetch", "and", "fill", "-", "in", "evaluation", "object", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L1154-L1162
[ "def", "evaluation", "(", "store", ",", "evaluation_obj", ")", ":", "evaluation_obj", "[", "'institute'", "]", "=", "store", ".", "institute", "(", "evaluation_obj", "[", "'institute_id'", "]", ")", "evaluation_obj", "[", "'case'", "]", "=", "store", ".", "c...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
upload_panel
Parse out HGNC symbols from a stream.
scout/server/blueprints/variants/controllers.py
def upload_panel(store, institute_id, case_name, stream): """Parse out HGNC symbols from a stream.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) raw_symbols = [line.strip().split('\t')[0] for line in stream if line and not line.startswith('#')] # chec...
def upload_panel(store, institute_id, case_name, stream): """Parse out HGNC symbols from a stream.""" institute_obj, case_obj = institute_and_case(store, institute_id, case_name) raw_symbols = [line.strip().split('\t')[0] for line in stream if line and not line.startswith('#')] # chec...
[ "Parse", "out", "HGNC", "symbols", "from", "a", "stream", "." ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L1165-L1177
[ "def", "upload_panel", "(", "store", ",", "institute_id", ",", "case_name", ",", "stream", ")", ":", "institute_obj", ",", "case_obj", "=", "institute_and_case", "(", "store", ",", "institute_id", ",", "case_name", ")", "raw_symbols", "=", "[", "line", ".", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
verified_excel_file
Collect all verified variants in a list on institutes and save them to file Args: store(adapter.MongoAdapter) institute_list(list): a list of institute ids temp_excel_dir(os.Path): folder where the temp excel files are written to Returns: written_files(int): the number of files...
scout/server/blueprints/variants/controllers.py
def verified_excel_file(store, institute_list, temp_excel_dir): """Collect all verified variants in a list on institutes and save them to file Args: store(adapter.MongoAdapter) institute_list(list): a list of institute ids temp_excel_dir(os.Path): folder where the temp excel files are w...
def verified_excel_file(store, institute_list, temp_excel_dir): """Collect all verified variants in a list on institutes and save them to file Args: store(adapter.MongoAdapter) institute_list(list): a list of institute ids temp_excel_dir(os.Path): folder where the temp excel files are w...
[ "Collect", "all", "verified", "variants", "in", "a", "list", "on", "institutes", "and", "save", "them", "to", "file" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/server/blueprints/variants/controllers.py#L1180-L1226
[ "def", "verified_excel_file", "(", "store", ",", "institute_list", ",", "temp_excel_dir", ")", ":", "document_lines", "=", "[", "]", "written_files", "=", "0", "today", "=", "datetime", ".", "datetime", ".", "now", "(", ")", ".", "strftime", "(", "'%Y-%m-%d'...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
build_hpo_term
Build a hpo_term object Check that the information is correct and add the correct hgnc ids to the array of genes. Args: hpo_info(dict) Returns: hpo_obj(scout.models.HpoTerm): A dictionary with hpo information
scout/build/hpo.py
def build_hpo_term(hpo_info): """Build a hpo_term object Check that the information is correct and add the correct hgnc ids to the array of genes. Args: hpo_info(dict) Returns: hpo_obj(scout.models.HpoTerm): A dictionary with hpo information ...
def build_hpo_term(hpo_info): """Build a hpo_term object Check that the information is correct and add the correct hgnc ids to the array of genes. Args: hpo_info(dict) Returns: hpo_obj(scout.models.HpoTerm): A dictionary with hpo information ...
[ "Build", "a", "hpo_term", "object", "Check", "that", "the", "information", "is", "correct", "and", "add", "the", "correct", "hgnc", "ids", "to", "the", "array", "of", "genes", ".", "Args", ":", "hpo_info", "(", "dict", ")", "Returns", ":", "hpo_obj", "("...
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/build/hpo.py#L7-L44
[ "def", "build_hpo_term", "(", "hpo_info", ")", ":", "try", ":", "hpo_id", "=", "hpo_info", "[", "'hpo_id'", "]", "except", "KeyError", ":", "raise", "KeyError", "(", "\"Hpo terms has to have a hpo_id\"", ")", "LOG", ".", "debug", "(", "\"Building hpo term %s\"", ...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
export_genes
Export all genes from the database
scout/export/gene.py
def export_genes(adapter, build='37'): """Export all genes from the database""" LOG.info("Exporting all genes to .bed format") for gene_obj in adapter.all_genes(build=build): yield gene_obj
def export_genes(adapter, build='37'): """Export all genes from the database""" LOG.info("Exporting all genes to .bed format") for gene_obj in adapter.all_genes(build=build): yield gene_obj
[ "Export", "all", "genes", "from", "the", "database" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/export/gene.py#L5-L10
[ "def", "export_genes", "(", "adapter", ",", "build", "=", "'37'", ")", ":", "LOG", ".", "info", "(", "\"Exporting all genes to .bed format\"", ")", "for", "gene_obj", "in", "adapter", ".", "all_genes", "(", "build", "=", "build", ")", ":", "yield", "gene_obj...
90a551e2e1653a319e654c2405c2866f93d0ebb9
test
parse_clnsig
Get the clnsig information Args: acc(str): The clnsig accession number, raw from vcf sig(str): The clnsig significance score, raw from vcf revstat(str): The clnsig revstat, raw from vcf transcripts(iterable(dict)) Returns: clnsig_accsessions(list): A list with clnsig ac...
scout/parse/variant/clnsig.py
def parse_clnsig(acc, sig, revstat, transcripts): """Get the clnsig information Args: acc(str): The clnsig accession number, raw from vcf sig(str): The clnsig significance score, raw from vcf revstat(str): The clnsig revstat, raw from vcf transcripts(iterable(dict)) Returns...
def parse_clnsig(acc, sig, revstat, transcripts): """Get the clnsig information Args: acc(str): The clnsig accession number, raw from vcf sig(str): The clnsig significance score, raw from vcf revstat(str): The clnsig revstat, raw from vcf transcripts(iterable(dict)) Returns...
[ "Get", "the", "clnsig", "information" ]
Clinical-Genomics/scout
python
https://github.com/Clinical-Genomics/scout/blob/90a551e2e1653a319e654c2405c2866f93d0ebb9/scout/parse/variant/clnsig.py#L8-L72
[ "def", "parse_clnsig", "(", "acc", ",", "sig", ",", "revstat", ",", "transcripts", ")", ":", "clnsig_accsessions", "=", "[", "]", "if", "acc", ":", "# New format of clinvar allways have integers as accession numbers", "try", ":", "acc", "=", "int", "(", "acc", "...
90a551e2e1653a319e654c2405c2866f93d0ebb9