Created
July 13, 2017 20:58
-
-
Save nievergeltlab/76dbf18d0e6e3323aa76ef6afc56e229 to your computer and use it in GitHub Desktop.
Print tables of phenotype information from list of .fam files
This file contains hidden or 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
| args <- commandArgs(trailingOnly = TRUE) | |
| family_files <- args[1] | |
| dat <- read.table(family_files) | |
| for (i in dat$V1) | |
| { | |
| options(stringsAsFactors=F) | |
| dat <- read.table(i,header=F) | |
| names(dat) <- c("FIDL","IID","M","F","G","P") | |
| print(i) | |
| print(table(dat$P)) | |
| } |
This file contains hidden or 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
| ls /home/laramie/CLEANED_DATA/SAFR_PTSD_wave1 | grep .fam | awk '{print "/home/laramie/CLEANED_DATA/SAFR_PTSD_wave1/"$1}' >> famlist.txt | |
| Rscript familycounter.Rscript famlist.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment