VEuPathDB / service-eda

Repo containing EDA web service
Apache License 2.0
0 stars 0 forks source link

migrate saved analyses for correlations api update #6

Closed d-callan closed 4 months ago

d-callan commented 4 months ago

impact to mbio saved analyses.

weve updated the api for correlations apps. there used to be two compute endpoints, one for correlation assay X assay and one for correlation assay X metadata, and now there is just the one that handles both cases.

a (probably poor) attempt at a summary: correlationassayassay and correlationassaymetadata -> correlation in the url collectionVariable -> data in the post request collectionVariable used to be of type CollectionSpec, but data is CorrelationInputData which is something like {"dataType":"metadata"} or {"dataType":"collection","collectonSpec": {A_COLLECTION_SPEC}}

some examples to help: OLD ONES

/eda/computes/correlationassaymetadata
{
    "config": {
        "prefilterThresholds": {
            "proportionNonZero": 0.05,
            "variance": 0,
            "standardDeviation": 0
        },
        "collectionVariable": {
            "entityId": "OBI_0002623",
            "collectionId": "EUPATH_0009256"
        },
        "correlationMethod": "spearman"
    },
    "derivedVariables": [],
    "filters": [],
    "studyId": "BONUS-1"
}
eda/computes/correlationassayassay
{
    "config": {
        "prefilterThresholds": {
            "proportionNonZero": 0.05,
            "variance": 0,
            "standardDeviation": 0
        },
        "collectionVariable1": {
            "entityId": "OBI_0002623",
            "collectionId": "EUPATH_0009256"
        },
        "collectionVariable2": {
            "entityId": "OBI_0002623",
            "collectionId": "EUPATH_0009248"
        },
        "correlationMethod": "spearman"
    },
    "derivedVariables": [],
    "filters": [],
    "studyId": "BONUS-1"
}

NEW ONES

eda/computes/correlation
{
    "config": {
        "prefilterThresholds": {
            "proportionNonZero": 0.05,
            "variance": 0,
            "standardDeviation": 0
        },
        "data1": {
            "dataType":"collection",
            "collectionSpec":{
                "entityId": "OBI_0002623",
                "collectionId": "EUPATH_0009256"
            }
        },
        "data2": {
            "dataType": "metadata"
        },
        "correlationMethod": "spearman"
    },
    "derivedVariables": [],
    "filters": [],
    "studyId": "BONUS-1"
}
eda/computes/correlation
{
    "config": {
        "prefilterThresholds": {
            "proportionNonZero": 0.05,
            "variance": 0,
            "standardDeviation": 0
        },
        "data1": {
            "dataType":"collection",
            "collectionSpec":{
                "entityId": "OBI_0002623",
                "collectionId": "EUPATH_0009256"
            }
        },
        "data2": {
            "dataType":"collection",
            "collectionSpec":{
                "entityId": "OBI_0002623",
                "collectionId": "EUPATH_0009248"
            }
        },
        "correlationMethod": "spearman"
    },
    "derivedVariables": [],
    "filters": [],
    "studyId": "BONUS-1"
}