Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d28725f

Browse files
fix(pipeline): separated all pipelines
1 parent 3fc3d3b commit d28725f

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

‎api/code/heatmap_api_pipeline.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ result <- extract_lfc_multiple(gene_list, csv_files, column_names)
2121

2222
# Save the result to a CSV file with a timestamp
2323
timestamp <- format(Sys.time(), "%Y.%m.%d_%H.%M.%S")
24-
file_name <- paste0("files/Heatmap_data.csv")
24+
file_name <- paste0("files/heatmap_data.csv")
2525
write.csv(result, file = file_name, row.names = FALSE)
2626

2727
cat("Data extraction complete. Saved to", file_name, "\n")

‎api/routers/operation_router.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,26 @@
2323
R_CODE_DIRECTORY = os.path.join(os.path.dirname(__file__), '../code')
2424

2525

26+
@router.post('/preinit')
27+
async def preinit(user_info: dict = Depends(verify_token)):
28+
29+
try:
30+
31+
os.makedirs(os.path.join(R_CODE_DIRECTORY, str(user_info['user_id'])), exist_ok=True)
32+
os.makedirs(os.path.join(R_CODE_DIRECTORY, str(user_info['user_id']), "rds"), exist_ok=True)
33+
os.makedirs(os.path.join(R_CODE_DIRECTORY, str(user_info['user_id']), "files"), exist_ok=True)
34+
os.makedirs(os.path.join(R_CODE_DIRECTORY, str(user_info['user_id']), "figures"), exist_ok=True)
35+
36+
FILE_DIR = os.path.join(R_CODE_DIRECTORY, f"{user_info['user_id']}", "files")
37+
robjects.r['setwd'](R_CODE_DIRECTORY + f"/{user_info['user_id']}")
38+
39+
40+
return {"message": "Process initialized"}
41+
42+
except Exception as e:
43+
return {"message": "Error in preinit", "error": str(e)}
44+
45+
2646

2747
@router.post('/init')
2848
async def init(count_data: UploadFile = File(...), meta_data: UploadFile = File(...), user_info: dict = Depends(verify_token)):

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /