aboutsummaryrefslogtreecommitdiff
path: root/scripts/ctl_analysis.R
blob: 6c3b22f81ac1a51ee71ecdc09a6e216d89f9ace8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
library(ctl)

# The genotypes.csv file containing the genotype matrix is stored individuals (rows) x genetic marker (columns):


genotypes <- read.csv("genotypes.csv",row.names=1, header=FALSE, sep="\t")
# The phenotypes.csv file containing individuals (rows) x traits (columns) measurements:
traits <- read.csv("phenotypes.csv",row.names=1, header=FALSE, sep="\t")


ctls <- CTLscan(geno,traits,strategy=input$strategy,
	nperm=input$nperms,parametric =input$parametric,
	nthreads=6,verbose=TRUE)



#output matrix significant CTL interactions with 4 columns: trait, marker, trait, lod
sign <- CTLsignificant(ctls,significance = input$significance)