-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from nfdi4health/main
Final KORA Version
- Loading branch information
Showing
35 changed files
with
774 additions
and
717 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Reconstruct dpes | ||
|
||
# Trigger workflow on push to the main branch | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# Define the job | ||
jobs: | ||
update_document: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Step 1: Checkout the repository | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
# Step 2: Set up the programming environment (e.g., R, Python, Node.js) | ||
- name: Set up R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: '4.3' | ||
|
||
# Step 3: Install dependencies | ||
- name: Install R packages | ||
run: | | ||
Rscript -e "install.packages(c('dplyr', 'readxl', 'writexl', 'here'), repos='https://cloud.r-project.org/')" | ||
# Step 4: Run the code to update the document | ||
- name: Run update script | ||
run: | | ||
Rscript create_mock_data/reconstructing_dpes.R | ||
# Step 5: Commit and push the updated document | ||
- name: Commit changes | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git add rmonize/DPE_KARMEN_P1_test.xlsx rmonize/DPE_KARMEN_P2_test.xlsx | ||
git commit -m "Update DPE_KARMEN_P1 and DPE_KARMEN_P2 files" | ||
git push |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
# Load necessary libraries | ||
library(dplyr) | ||
library(readxl) | ||
library(writexl) | ||
library(here) | ||
|
||
# Your code that uses these libraries | ||
|
||
|
||
##### Creating DPE_P1 and DPE_P2 | ||
dpe_tracy <- readxl::read_excel(here::here("Tracy/DPE_KARMEN_TRACY.xlsx"), sheet = 1) | ||
dpe_ines <- readxl::read_excel(here::here("Ines/DPE_KARMEN_INES.xlsx"), sheet = 1) | ||
dpe_franzi <- readxl::read_excel(here::here("Franzi/DPE_KARMEN_FRANZI.xlsx"), sheet = 1) | ||
|
||
|
||
dataschema_p1 <- list(Variables = tibble::tibble(readxl::read_excel(here::here("rmonize/data_schema/", "Dataschema_P1.xlsx"), sheet = 1)), | ||
Categories = tibble::tibble(readxl::read_excel(here::here("rmonize/data_schema/", "Dataschema_P1.xlsx"), sheet = 2))) | ||
dataschema_p2 <- list(Variables = tibble::tibble(readxl::read_excel(here::here("rmonize/data_schema/", "Dataschema_P2.xlsx"), sheet = 1)), | ||
Categories = tibble::tibble(readxl::read_excel(here::here("rmonize/data_schema/", "Dataschema_P2.xlsx"), sheet = 2))) | ||
|
||
# Assuming these are data.frames | ||
combined_data <- bind_rows(dpe_tracy, dpe_ines, dpe_franzi) | ||
|
||
# Subset for dpe_p1 | ||
dpe_p1 <- combined_data %>% | ||
filter(dataschema_variable %in% dataschema_p1$Variables$name) %>% | ||
slice(match(dataschema_p1$Variables$index, row_number())) %>% | ||
mutate(input_dataset = "KARMEN_P1") | ||
|
||
# Subset for dpe_p2 | ||
dpe_p2 <- combined_data %>% | ||
filter(dataschema_variable %in% dataschema_p2$Variables$name) %>% | ||
slice(match(dataschema_p2$Variables$index, row_number())) %>% | ||
mutate(input_dataset = "KARMEN_P2") | ||
|
||
writexl::write_xlsx(dpe_p1, paste0("rmonize/DPE_KARMEN_P1_test.xlsx")) | ||
writexl::write_xlsx(dpe_p2, paste0("rmonize/DPE_KARMEN_P2_test.xlsx")) |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.