R/create.pathway.df.R

Defines functions create.pathway.df

Documented in create.pathway.df

create.pathway.df <-function(genotypes,snps.paths){
	 mat=matrix(0,nrow=ncol(genotypes),ncol=length(snps.paths))
	 rownames(mat)=colnames(genotypes)
	 colnames(mat)=names(snps.paths)
	 for(p in 1:length(snps.paths)){
		inds=which(rownames(mat) %in% snps.paths[[p]])
		mat[inds,p]=1
	 }
	 data.frame(mat)
	}

Try the PAGWAS package in your browser

Any scripts or data that you put into this service are public.

PAGWAS documentation built on May 2, 2019, 3:26 p.m.