# Download data files
load_datafiles()
# Format data
format_mQTL(phenofile,genofile,physiodat,cleandat,cleangen)
# Constant Sum normlisation
nmeth<-'CS'
normalise_mQTL(cleandat,CSnorm,nmeth)
# Alignment
align_mQTL(CSnorm,aligdat)
# Dimensionality reduction
met="rectangle" # choose the statistical summarizing measure ("max","sum","trapez",...)
RedMet="SRV" # reduction method ("SRV" or "bin")
pre_mQTL(aligdat, reducedF, RedMet="SRV",met, corrT=0.9)
# mQTL mapping
results<- list() # a list to stock the mQTL mapping results
nperm<- 0 # number of permutations if required
results<-process_mQTL(reducedF, cleangen, nperm)
## Post-Process
post_mQTL(results)
## Summarize
redfile<-"rectangle_SRV.ppm"
summary_mQTL(results,redfile,T=8)
#plot circular genome
circle_mQTL(results, Th=8,spacing=0)
## visualisation and metabolite identification
#plot NMR profile
simple.plot(file=cleandat,lo=3.02,hi=3.08,k=1:20,title="NMR profile")
#plot SRV regions
SRV.plot(file1=cleandat,file2=rectangle_SRV,lo=3.02,hi=3.08,k=1:20,title="Cluster plot")
#plot lod for the region of interest
SRV_lod.plot(results,rectangle_SRV,Th=1)
#plot top lod SRV regions
Top_SRV.plot(file1=cleandat,file2=rectangle_SRV,results=results,met=met,intMeth="mean")
Run the code above in your browser using DataLab