hpByTrait {PCAN} | R Documentation

## HP IDs associated to trait (Example data)

### Description

Each trait is associated to one or several HP terms.

### Format

A data frame with 55311 rows and 3 columns:

hp

  HP terms.

db

  Trait database: always "OMIM" here.

id

  Trait ID: OMI IDs here

### Details

These data are used to examplify the different functions of the package. More data are available in the MultiHumanPhenoDB package.

### Source

http://compbio.charite.de/hudson/job/hpo.annotations/1039/artifact/misc/phenotype_annotation.tab

### Examples

    ## Prerequisite
    data(geneByHp, hp_descendants, package="PCAN")
    geneByHp <- unstack(geneByHp, entrez~hp)
    ic <- computeHpIC(geneByHp, hp_descendants)

    ###########################################
    ## Use case: comparing a gene and a disease
    data(traitDef, geneDef, hp_ancestors, hpDef, package="PCAN")
    omim <- "612285"
    traitDef[which(traitDef$id==omim),]
    entrez <- "57545"
    geneDef[which(geneDef$entrez==entrez),]
    ## Get HP terms associated to the disease
    data(hpByTrait, package="PCAN")
    hpOfInterest <- hpByTrait$hp[which(hpByTrait$id==omim)]

    ## Get HP terms associated to the gene
    hpByGene <- unstack(stack(geneByHp), ind~values)
    geneHps <- hpByGene[[entrez]]
    ## Comparison of the two sets of HP terms
    compMat <- compareHPSets(
        hpSet1=geneHps, hpSet2=hpOfInterest,
        IC=ic,
        ancestors=hp_ancestors,
        method="Resnik",
        BPPARAM=SerialParam()
    )
    ## Get the symmetric semantic similarity score
    hpSetCompSummary(compMat, method="bma", direction="symSim")
    bm <- hpSetCompBestMatch(compMat, "b")
    hpDef[match(c(bm$compared, bm$candidate), hpDef$id),]

[Package PCAN version 1.14.0 Index]