diff options
Diffstat (limited to 'gn3/api')
-rw-r--r-- | gn3/api/correlation.py | 8 | ||||
-rw-r--r-- | gn3/api/general.py | 4 | ||||
-rw-r--r-- | gn3/api/rqtl.py | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/gn3/api/correlation.py b/gn3/api/correlation.py index e7e89cf..46121f8 100644 --- a/gn3/api/correlation.py +++ b/gn3/api/correlation.py @@ -5,7 +5,7 @@ from flask import request from gn3.computations.correlations import compute_all_sample_correlation from gn3.computations.correlations import compute_all_lit_correlation -from gn3.computations.correlations import compute_all_tissue_correlation +from gn3.computations.correlations import compute_tissue_correlation from gn3.computations.correlations import map_shared_keys_to_values from gn3.db_utils import database_connector @@ -78,8 +78,8 @@ def compute_tissue_corr(corr_method="pearson"): primary_tissue_dict = tissue_input_data["primary_tissue"] target_tissues_dict = tissue_input_data["target_tissues_dict"] - results = compute_all_tissue_correlation(primary_tissue_dict=primary_tissue_dict, - target_tissues_data=target_tissues_dict, - corr_method=corr_method) + results = compute_tissue_correlation(primary_tissue_dict=primary_tissue_dict, + target_tissues_data=target_tissues_dict, + corr_method=corr_method) return jsonify(results) diff --git a/gn3/api/general.py b/gn3/api/general.py index cebb2e3..69ec343 100644 --- a/gn3/api/general.py +++ b/gn3/api/general.py @@ -11,6 +11,10 @@ from gn3.commands import run_cmd general = Blueprint("general", __name__) +@general.route("/version") +def version(): + """Get API version.""" + return jsonify("1.0") @general.route("/metadata/upload/", methods=["POST"], strict_slashes=False) diff --git a/gn3/api/rqtl.py b/gn3/api/rqtl.py index b0405f4..6548e1a 100644 --- a/gn3/api/rqtl.py +++ b/gn3/api/rqtl.py @@ -48,8 +48,8 @@ run the rqtl_wrapper script and return the results as JSON "output", rqtl_cmd.get('output_file'))): os.system(rqtl_cmd.get('rqtl_cmd')) - if "pairscan" in boolean_kwargs: - rqtl_output['results'] = process_rqtl_pairscan(rqtl_cmd.get('output_file')) + if "pairscan" in rqtl_bool_kwargs: + rqtl_output['results'] = process_rqtl_pairscan(rqtl_cmd.get('output_file'), genofile) else: rqtl_output['results'] = process_rqtl_mapping(rqtl_cmd.get('output_file')) |