mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-06 01:18:11 +08:00
add diff exp action
This commit is contained in:
+24
-2
@@ -117,7 +117,28 @@ const ___hardcoded___requestGeneExpressionCountsPOST = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const requestDifferentialExpression = (celllist1, celllist2, num_genes = 5) => {
|
||||||
|
return (dispatch, getState) => {
|
||||||
|
dispatch({type: "request differential expression started"})
|
||||||
|
fetch(`${globals.API.prefix}${globals.API.version}diffexpression`, {
|
||||||
|
method: "POST",
|
||||||
|
body: JSON.stringify({
|
||||||
|
celllist1,
|
||||||
|
celllist2,
|
||||||
|
num_genes,
|
||||||
|
}),
|
||||||
|
headers: new Headers({
|
||||||
|
"accept": "application/json",
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(
|
||||||
|
data => dispatch({type: "request differential expression success", data}),
|
||||||
|
error => dispatch({type: "request differential expression error", error})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
initialize,
|
initialize,
|
||||||
@@ -125,5 +146,6 @@ export default {
|
|||||||
requestGeneExpressionCounts,
|
requestGeneExpressionCounts,
|
||||||
___hardcoded___requestGeneExpressionCountsPOST,
|
___hardcoded___requestGeneExpressionCountsPOST,
|
||||||
attemptCategoricalMetadataSelection,
|
attemptCategoricalMetadataSelection,
|
||||||
attemptCategoricalMetadataDeselection
|
attemptCategoricalMetadataDeselection,
|
||||||
|
requestDifferentialExpression
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user