View source: R/R_funclib_movAPA.r
| subsetPACds | R Documentation | 
subsetPACds returns a subset of PACdataset.
subsetPACds(
  pacds,
  group = NULL,
  cond1 = NULL,
  cond2 = NULL,
  conds = NULL,
  avgPACtag = 0,
  avgGeneTag = 0,
  totPACtag = 0,
  choosePA = NULL,
  PAs = NULL,
  genes = NULL,
  chrs = NULL,
  noIntergenic = FALSE,
  avg = FALSE,
  pool = FALSE,
  clearPAT = 0,
  minExprConds = 1,
  verbose = FALSE
)
pacds | 
 A PACdataset object.  | 
group | 
 a sample group, must be present in PACds@colData. If NULL, then parameters of cond1, cond2, and avg are not in use.  | 
cond1 | 
 a condition, must be present in PACds@colData.  | 
cond2 | 
 a condition, must be present in PACds@colData. If cond1 or cond2 is NULL, then both cond1 and cond2 are set NULL.  | 
conds | 
 to subset multiple conditions.  | 
avgPACtag | 
 if >0, then filter PACs with average PAT number across all samples >= avgPACtag, after subseting by group and conds.  | 
avgGeneTag | 
 similar to avgPACtag, but for gene.  | 
totPACtag | 
 filter PACs with total PAT number of all samples >=totPACtag.  | 
choosePA | 
 value can e NULL/distal/proximal/APA. Only if PACds is all 3UTRAPA, then choosePA can be distal/proximal. APA means choose PACs from APA genes.  | 
PAs | 
 to filter PACs by a PAC name list according to rownames in PAs.  | 
genes | 
 to filter by a gene name list according to PACds@anno$gene.  | 
chrs | 
 to filter by a chr name list according to PACds@anno$chr.  | 
noIntergenic | 
 whether to remove intergenic PACs.  | 
avg | 
 TRUR/FALSE. If TRUE then take average of replicates of each of subset conditions.  | 
pool | 
 TRUR/FALSE. If TRUE then take pool value of replicates of each of subset conditions.  | 
clearPAT | 
 If >0 then set @counts[<=clearPAT]=0 and remove blank lines and reset PACds@anno.  | 
minExprConds | 
 default 1, min number of condtions (columns) expressed.  | 
verbose | 
 T to show message during subsetting.  | 
A subset of PACdataset with 0-count lines removed.
data(PACds)
PACds1=subsetPACds(PACds, group='group', pool=TRUE)
## Subset two conditions.
pacds=subsetPACds(PACds, group='group',cond1='anther', cond2='embryo')
## Subset PACs from APA genes in two conditions.
PACds1=subsetPACds(PACds, group='group', cond1='anther', cond2='embryo', choosePA='apa')
## Subset PACs of given genes.
subsetPACds(PACds, genes=PACds@anno$gene[1:5], verbose=TRUE)
## Subset PACs of given PA names.
swPAC=subsetPACds(PACds, PAs=rownames(PACds@counts)[1:5], verbose=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.