Skip to content

Update combine_PRS.R#4

Open
soren944 wants to merge 6 commits intobuutrg:mainfrom
soren944:main
Open

Update combine_PRS.R#4
soren944 wants to merge 6 commits intobuutrg:mainfrom
soren944:main

Conversation

@soren944
Copy link
Copy Markdown

@soren944 soren944 commented Jun 4, 2025

I came across PGS files with an alternate column name "#IID" instead of "IID". Instead of manually changing the column name for every PGS file it will now recognize altered names. The only prerequisite is that the IID column's alternate name contains the pattern "IID". The name is subsequently changed to "IID" only if there is not a complete pattern match to allow for IID merging later in the script.

soren944 added 6 commits June 4, 2025 13:57
I came across PGS files with a alternate column name "#IID" instead of "IID". Instead of manually changing the column name for every PGS file it will now recognize altered names. The only prerequisite is that the IID column's alternate name contains the pattern "IID". The name is subsequently change to "IID" only if there is not a complete pattern match to allow for IID merging later in the script.
The current script cannot handle multiple PGS score files that share the same name for SUM column. Created a new option to specify the new names for the columns. I also altered the sub-setting of trait specific PGS to reflect the change in names. Added an error statement to indicate whether the new name list does not have the same length as the number of PGS scores under consideration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant