Description Usage Format Examples
A simulated example dataset of ECCO. The variables are as follows:
1 |
Contains the following objects:
a vector containg the names of all genes.
a matrix containing the whole gene expression data.
a data list containing the whole gene expression data after removing the PEER factors.
a data list containing the whole genotype data.
the phenotype data.
the number of peer factors to be examined.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | data(exampledata)
attach(exampledata)
N=length(gene_name)
iv_snp=c()
summary0=c()
for(ind in 1:N)
{
tryCatch({
gene=M_matrix[,ind]
geno=snp_raw[[ind]]
genename=gene_name[ind]
result=ecco0(gene,genename,gene_name,geno,ind,Y)
iv_snp=rbind(iv_snp,result$iv_snp)
summary0=rbind(summary0,result$summary)
},
error=function(e){})
}
res=c()
summary_total=summary0
for(num_peer in 1:length(peerlist))
{
tryCatch({
pheno=Y
gene=M_matrix
gene_name=gene_name
peerlist=c(1,2,5)
summary<-ecco(pheno,peer[[num_peer]],gene_name,iv_snp,peerlist[num_peer],summary0)
},
error=function(e){})
summary_total=rbind(summary_total,summary)
res=rbind(res,c(cor(as.numeric(summary[,4]),as.numeric(summary[,5])),peerlist[num_peer]))
}
res=data.frame(res)
optimal_num_peer=res[which(res[,1]==max(res[,1])),2]
closeAllConnections()
detach(exampledata)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.