Learn R Programming

HEMDAG (version 2.1.3)

specific.annotation.matrix: HPO specific annotations matrix

Description

Construct the labels matrix of the most specific HPO terms

Usage

specific.annotation.matrix(file = "gene2pheno.txt", genename = "TRUE")

Arguments

file

text file representing the most specific associations gene-HPO term (def: "gene2pheno.txt"). The file must be written as sequence of rows. Each row represents a gene and all its associations with abnormal phenotype tab separated, e.g.: gene_1 <tab> phen1 <tab> ... phen_N. See Details section to know more information about how to obtain this file.

genename

boolean value:

  • TRUE (def.): the names of genes are gene symbol (i.e. characters);

  • FALSE: the names of gene are entrez gene ID (i.e. integer numbers);

Value

the annotation matrix of the most specific annotations (0/1): rows are genes and columns are HPO terms. Let's denote \(M\) the labels matrix. If \(M[i,j]=1\), means that the gene \(i\) is annotated with the class \(j\), otherwise \(M[i,j]=0\).

Details

The input plain text file representing the most specific associations gene-HPO term can be obtained by forking the GitHub repositoty HPOparser, a collection of Perl subroutines to parse the HPO OBO file and the HPO annotations file.

Examples

Run this code
# NOT RUN {
gene2pheno <- system.file("extdata/gene2pheno.txt", package="HEMDAG");
spec.ann <- specific.annotation.matrix(gene2pheno, genename=TRUE);
# }

Run the code above in your browser using DataLab