mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-05 07:28:12 +08:00
request single expression for color action
This commit is contained in:
+27
-1
@@ -93,6 +93,31 @@ const requestGeneExpressionCounts = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const requestSingleGeneExpressionCountsForColoringPOST = (gene) => {
|
||||||
|
return (dispatch, getState) => {
|
||||||
|
dispatch({type: "get single gene expression for coloring started"})
|
||||||
|
fetch(`${globals.API.prefix}${globals.API.version}expression`, {
|
||||||
|
method: "POST",
|
||||||
|
body: JSON.stringify({
|
||||||
|
"genelist": [gene]
|
||||||
|
}),
|
||||||
|
headers: new Headers({
|
||||||
|
"accept": "application/json",
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(
|
||||||
|
data => dispatch({
|
||||||
|
type: "color by expression",
|
||||||
|
gene: gene,
|
||||||
|
data
|
||||||
|
}),
|
||||||
|
error => dispatch({type: "get single gene expression for coloring error", error})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const ___hardcoded___requestGeneExpressionCountsPOST = () => {
|
const ___hardcoded___requestGeneExpressionCountsPOST = () => {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
dispatch({type: "get expression started"})
|
dispatch({type: "get expression started"})
|
||||||
@@ -117,7 +142,7 @@ const ___hardcoded___requestGeneExpressionCountsPOST = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const requestDifferentialExpression = (celllist1, celllist2, num_genes = 10) => {
|
const requestDifferentialExpression = (celllist1, celllist2, num_genes = 7) => {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
dispatch({type: "request differential expression started"})
|
dispatch({type: "request differential expression started"})
|
||||||
fetch(`${globals.API.prefix}${globals.API.version}diffexpression`, {
|
fetch(`${globals.API.prefix}${globals.API.version}diffexpression`, {
|
||||||
@@ -145,6 +170,7 @@ export default {
|
|||||||
requestCells,
|
requestCells,
|
||||||
requestGeneExpressionCounts,
|
requestGeneExpressionCounts,
|
||||||
___hardcoded___requestGeneExpressionCountsPOST,
|
___hardcoded___requestGeneExpressionCountsPOST,
|
||||||
|
requestSingleGeneExpressionCountsForColoringPOST,
|
||||||
attemptCategoricalMetadataSelection,
|
attemptCategoricalMetadataSelection,
|
||||||
attemptCategoricalMetadataDeselection,
|
attemptCategoricalMetadataDeselection,
|
||||||
requestDifferentialExpression
|
requestDifferentialExpression
|
||||||
|
|||||||
Reference in New Issue
Block a user