Beispiel #1
0
def sv_variant(institute_id, case_name, variant_id):
    """Display a specific structural variant."""
    data = variant_controller(store, institute_id, case_name, variant_id, add_other=False)

    if current_app.config.get("LOQUSDB_SETTINGS"):
        LOG.debug("Fetching loqusdb information for %s", variant_id)
        data["observations"] = observations(store, loqusdb, data["case"], data["variant"])

    return data
Beispiel #2
0
def str_variant(institute_id, case_name, variant_id):
    """Display a specific STR variant."""
    data = variant_controller(
        store,
        institute_id,
        case_name,
        variant_id,
        add_other=False,
        get_overlapping=False,
    )

    return data
Beispiel #3
0
def variant(institute_id, case_name, variant_id):
    """Display a specific SNV variant."""
    LOG.debug("Variants view requesting data for variant %s", variant_id)

    data = variant_controller(store, institute_id, case_name, variant_id=variant_id)
    if data is None:
        LOG.warning(
            "An error occurred: variants view requesting data for variant {}".format(variant_id)
        )
        flash("An error occurred while retrieving variant object", "danger")
        return redirect(request.referrer)

    if current_app.config.get("LOQUSDB_SETTINGS"):
        LOG.debug("Fetching loqusdb information for %s", variant_id)
        data["observations"] = observations(store, loqusdb, data["case"], data["variant"])

    return data
Beispiel #4
0
def str_variant(institute_id, case_name, variant_id):
    """Display a specific STR variant."""
    data = variant_controller(
        store,
        institute_id,
        case_name,
        variant_id,
        add_other=False,
        get_overlapping=False,
    )
    if data is None:
        flash("An error occurred while retrieving variant object", "danger")
        return redirect(
            url_for("variants.str_variants",
                    institute_id=institute_id,
                    case_name=case_name))
    return data
Beispiel #5
0
def sv_variant(institute_id, case_name, variant_id):
    """Display a specific structural variant."""
    data = variant_controller(store,
                              institute_id,
                              case_name,
                              variant_id,
                              add_other=False)

    if data is None:
        flash("An error occurred while retrieving variant object", "danger")
        return redirect(
            url_for("variants.sv_variants",
                    institute_id=institute_id,
                    case_name=case_name))

    if current_app.config.get("LOQUSDB_SETTINGS"):
        LOG.debug("Fetching loqusdb information for %s", variant_id)
        data["observations"] = observations(store, loqusdb, data["case"],
                                            data["variant"])

    return data