def test_get_search_expressions_slice_by_feature_name_h5(test_client):
    """
    get_search_expressions
    """
    context = test_client[3]

    with context:
        # feature name list (200)
        result, code = operations.get_search_expressions(
            featureNameList=['TSPAN6', 'TNMD'], format='h5')
        assert len(result) == 1
        assert code == 200
def test_get_search_expressions_filter_project(test_client):
    """
    get_search_expressions
    """
    sample_project, sample_study, sample_expression, context = test_client

    with context:
        # search by projectID
        result, code = operations.get_search_expressions(
            projectID=sample_project['id'])
        assert result[0]['id'] == uuid.UUID(sample_expression['id'])
        assert code == 200
Exemple #3
0
def test_get_search_expressions_slice_by_threshold_loom(test_client):
    """
    get_search_expressions
    """
    context = test_client[3]

    with context:
        # minExpression (200)
        threshold_query = [{"featureName": "TSPAN6", "threshold": 0.1}, {"featureName": "TNMD", "threshold": 0.2}]
        result, code = operations.get_search_expressions(
            minExpression=json.dumps(threshold_query).split(","), format='loom')
        assert len(result) == 1
        assert result[0]['fileType'] == 'loom'
        assert code == 200

        # maxExpression (200)
        threshold_query = [{"featureName": "TSPAN6", "threshold": 1.0}, {"featureName": "TNMD", "threshold": 2.0}]
        result, code = operations.get_search_expressions(
            maxExpression=json.dumps(threshold_query).split(","), format='loom')
        assert len(result) == 1
        assert result[0]['fileType'] == 'loom'
        assert code == 200
Exemple #4
0
def test_get_search_expressions_slice_by_feature_sample_loom(test_client):
    """
    get_search_expressions
    """
    context = test_client[3]

    with context:
        # feature name list (200)
        result, code = operations.get_search_expressions(
            featureNameList=['TSPAN6', 'TNMD'], sampleIDList=['DO221123'], format='loom')
        assert len(result) == 1
        assert result[0]['fileType'] == 'loom'
        assert code == 200
Exemple #5
0
def test_get_search_expressions_slice_by_feature_id_json(test_client):
    """
    get_search_expressions
    """
    context = test_client[3]

    with context:
        # feature ID list (200)
        result, code = operations.get_search_expressions(
            featureIDList=['ENSG00000000003', 'ENSG00000000005'], format='json')
        assert len(result) == 1
        assert result[0]['fileType'] == 'json'
        assert code == 200
        tmp_id = result[0]['id']
        tmp_response = tmp_download(str(tmp_id))
        assert tmp_response.status_code == 200