1 #combines gebvs of traits of a population
8 allArgs
<- commandArgs()
10 inFile
<- grep("gebv_files",
17 outputFile
<- grep("combined_gebvs",
24 inputFiles
<- scan(inFile
,
32 for (i
in inputFiles
) {
34 traitGebv
<- read
.table(i
,
41 trait
<- colnames(traitGebv
)
44 traitGebv
<- traitGebv
[order(traitGebv$X
), ]
47 combinedGebvs
<- traitGebv
49 row
.names(combinedGebvs
) <- combinedGebvs
[, 1]
50 combinedGebvs
[, 1] <- NULL
53 row
.names(traitGebv
) <- traitGebv
[, 1]
54 traitGebv
[, 1] <- NULL
56 combinedGebvs
<- merge(traitGebv
,
62 rownames(combinedGebvs
) <- combinedGebvs
[, 1]
63 combinedGebvs$Row
.names
<- NULL
67 if (length(outputFile
) != 0 ) {
68 write
.table(combinedGebvs
,
76 q(save
= "no", runLast
= FALSE)