rankFactorsbyDomain {chroGPS} | R Documentation

## Function to help selecting candidate epigenetic factors based on Epigenetic Domain cohesion/separation.

### Description

Function to help selecting candidate epigenetic factors based on Epigenetic Domain cohesion/separation. This function ranks all combinations of a certain size of epigenetic factors in the selected domain based on how much they contribute to provide a good cohesion and separation of the points of their epigenetic domain against the rest. This allows selection of the 'best' combination of epigenetic factors in a certain domain to generate informative epigenetic maps.

### Usage

    rankFactorsbyDomain(d, sampleinfo, ranktype = "domainDist", selName = "Color", selValue, k = NULL, mc.cores = 1)

### Arguments

`d` | A distGPS object with the epigenetic distances, see function distGPS.
`sampleinfo` | A data.frame object with at least the domain information for the epigenetic factors in the provided distance matrix. Sampleinfo rownames need to match row and colnames in the distance matrix.
`ranktype` | Character vector indicating the method to use. Currently only supporting 'domainDist' method.
`selName` | Name of the column containing the epigenetic domain information in the sampleinfo dataframe.
`selValue` | Character indicating the name of the domain to be evaluated.
`k` | Size of the factor combination to be evaluated.
`mc.cores` | Cores to use in calls to parallel::mclapply.

### Value

Named list with each evaluated combination of factors and:

`inter` | Their resulting average inter-domain distance.
`intra` | Their resulting average intra-domain distance.

### Author(s)

Oscar Reina.

### See Also

`distGPS`, `domainDist`

### Examples

    ## Rank Factors by Domain, using intra/inter domain distance

    data(s2)
    data(toydists)
    #d <- distGPS(s2,metric='avgdist',mc.cores=8) # Compute distances
    rownames(s2names) <- s2names$ExperimentName

    # Known domains
    # Call rankFactorsbyDomain for HP1a repression domain, select a combination of 4
    # factors
    library(caTools)
    rank.factors.4 <- rankFactorsbyDomain(d,s2names,ranktype='domainDist',selName='Color',selValue='lightblue',k=3,mc.cores=1) # Test HP1a repression
    ddd <- as.data.frame(do.call(rbind,lapply(rank.factors.4,unlist)))
    ddd <- ddd[order(ddd$intra,decreasing=FALSE),]
    head(ddd)

[Package chroGPS version 2.4.0 Index]