umx_file_load_pseudo: Read in files from pseudocons.

umx_file_load_pseudoR Documentation

Read in files from pseudocons.

Description

Read in PRS scored files from pseudocons.

  1. Read the file

  2. Break it into pseudo and real rows

  3. Clean-up by deleting the pseudo suffix

  4. Rename NT vars with a suffix

  5. Merge files on ID and return

ID FID BMIS1 BMIS2 BMIS3 BMIS4 ...
1 1234501 12345 -0.032 -0.77 -0.40 -3.87 ...
2 1234501-pseudo-1 12345 0.117 -0.66 -0.33 -4.08 ...

Usage

umx_file_load_pseudo(fn, bp, suffix = "_NT", chosenp = "S5")

Arguments

fn

The filename

bp

The path to the folder containing the file

suffix

to add to the NT columns (Default = "_NT")

chosenp

The suffix (pvalue) we desire to use (Default = "S5")

Value

  • dataframe of real and pseudo PRS columns

See Also

Other File Functions: dl_from_dropbox(), umx, umx_make_sql_from_excel(), umx_move_file(), umx_open(), umx_rename_file(), umx_write_to_clipboard()

Examples

## Not run: 
basepath = "~/Dropbox/2016 (1). project EA/2018/EA3/"
tmp = umx_file_load_pseudo("PRS_EA3_R9_autosomes_HRC1.1_pseudo.txt", bp = bp)
str(tmp)
head(tmp[, c("BMIS4", "BMIS4_NT")]

## End(Not run)

tbates/umx documentation built on Dec. 14, 2024, 11:28 a.m.