File: splitIntoGroupsPseudo.R

package info (click to toggle)
r-bioc-edger 3.40.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,484 kB
  • sloc: cpp: 1,425; ansic: 1,109; sh: 21; makefile: 5
file content (9 lines) | stat: -rw-r--r-- 434 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
splitIntoGroupsPseudo<-function(pseudo,group,pair) 
# Written by Davis McCarthy, February 2009, idea suggested by Mark Robinson
# A function to extract the data for specified two groups from a matrix of pseudocounts pair <- levels(as.factor(pair))
{
	y1<-pseudo[,group==pair[1]]; if (is.vector(y1)) { y1<-matrix(y1,ncol=1) }
	y2<-pseudo[,group==pair[2]]; if (is.vector(y2)) { y2<-matrix(y2,ncol=1) }
	y<-list(y1=y1,y2=y2)
	y
}