Learn R Programming

HEMDAG (version 2.6.1)

specific.annotation.matrix: specific annotation matrix

Description

Construct the labels matrix of the most specific OBO terms (as GO or HPO).

Usage

specific.annotation.matrix(file = "gene2pheno.txt.gz")

Arguments

file

text file representing the most specific associations gene-OBO. The file must be written as sequence of rows. Each row represents a gene/protein and all its associations with an ontology term pipe separated, e.g.: gene1 |obo1|...|oboN. The input example file used here (def: "gene2pheno.txt") shows the gene and all its associations with an HPO terms.

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-OBO term can be obtained by cloning the GitHub repository obogaf-parser, a perl5 module specifically designed to handle HPO and GO obo file and their gene annotation file (gaf file).

Examples

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

Run the code above in your browser using DataLab