Commit c27e4a63 authored by Kunst, Jonathan's avatar Kunst, Jonathan
Browse files

Focussing on polyqtlR at the moment for first visualisations and adding...

Focussing on polyqtlR at the moment for first visualisations and adding functionality to the R Shiny buttons
parent aadd636e
library(polyqtlR)
data("phased_maplist.4x", "SNP_dosages.4x", "Phenotypes_4x")
# IBD estimation
IBD_4x <- estimate_IBD(phased_maplist = phased_maplist.4x,
genotypes = SNP_dosages.4x,
ploidy = 4,
bivalent_decoding = FALSE,
bivalent_decoding = TRUE,
ncores = 2)
??Rcpp_precious_remove
# haplo visualisation
vis_hap <- visualiseHaplo(IBD_list = IBD_4x,
display_by = "name",
linkage_group = 1,
select_offspring = colnames(SNP_dosages.4x)[3:11],
multiplot = c(3, 3))
# GIC visualisation
GIC_4x <- estimate_GIC(IBD_list = IBD_4x)
# Phenotypes structure
par(mfrow = c(2,1))
visualiseGIC(GIC_4x)
dim(Phenotypes_4x)
sapply(Phenotypes_4x, unique)
#QTL scan
qtl_LODs.4x <- QTLscan(IBD_list = IBD_4x,
Phenotype.df = Phenotypes_4x,
genotype.ID = "geno",
trait.ID = "pheno",
block = "year")
# visualise QTLs
plotQTL(LOD_data = qtl_LODs.4x,
multiplot = c(1,2), #1 row, 2 columns
col = "darkgreen")
# linear plot
plotLinearQTL(LOD_data = qtl_LODs.4x,
col = "dodgerblue")
# sig thresholds with permutation tests
qtl_LODs.4x <- QTLscan(IBD_list = IBD_4x,
Phenotype.df = Phenotypes_4x,
genotype.ID = "geno",
trait.ID = "pheno",
block = "year",
perm_test = TRUE,
ncores = 2)
plotLinearQTL(LOD_data = qtl_LODs.4x,
col = "dodgerblue")
# co-factor analysis
findPeak(qtl_LODs.4x, linkage_group = 1)
qtl_LODs.4x_cofactor <- QTLscan(IBD_list = IBD_4x,
Phenotype.df = Phenotypes_4x,
genotype.ID = "geno",
trait.ID = "pheno",
block = "year",
cofactor_df = data.frame("LG" = 1,
"cM" = 12.3),
perm_test = FALSE,
ncores = 2)#nc is the number of cores, defined earlier
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment