Skip to content

Preparing the data

SD edited this page Feb 14, 2020 · 8 revisions
  • Disease gene list
  • Test (hold-out) set of disease genes (optional)
  • Any user-provided or already supplied networks (optional)
  • Any user-provided or already supplied extra features (optional)
  1. Map the genes of all pre-requisites to the index number of each gene provided in the file our_protein_coding_gene_list_20760genes_all_synonyms_genenames_indexed.tsv. The disease gene list has the form of the entire protein coding gene list with 2 columns: (a) the index numbers of genes, and (b) the labels corresponding to the disease gene list (0 for non-included genes, 1 for disease genes).

    See train_node_labels.tsv as example.

    In R:

    Load the protein coding gene list & the disease gene list of interest:

    protein_coding_genes <- read.table("./our_protein_coding_gene_list_20760genes_all_synonyms_genenames_indexed.tsv",
    header=TRUE, dec='.', sep="\t", quote="", stringsAsFactors = FALSE, row.names=NULL)
    Disease_gene_list <- read.table("./target_disease_gene_list.tsv", header=TRUE, dec='.', sep="\t", quote="", stringsAsFactors = FALSE, row.names=NULL)

    Match the indexing of the protein coding gene list to the genes in your disease gene list of target (gene names have to be in HGCN (“Gene” column) or Ensemble (“Gene_ID” column) format), remove rows of genes that were not matched, and keep only the column of the indexed nodes:

    Disease_gene_list$node <- protein_coding_genes$index[match(Disease_gene_list $Gene,protein_coding_genes$Gene)]
    Disease_gene_list <- Disease_gene_list[complete.cases(Disease_gene_list$Gene),]
    Disease_gene_list[c("Gene_ID","Gene",)])] <- NULL
  2. Repeat mapping for the test (hold-out) set.

  3. Repeat for the networks. For user-provided networks that are in the form of 3 columns: Gene1, Gene2, weight. Supplied networks are prepared and ready to be used. Load your networks as above and match indexed genes to the 2 gene columns, set column names as “src”, “dst”, “weight”, and remove signed weights. Keep only rows where gene names have an index number.

    Network1$src <- protein_coding_genes$index[match(Network1$Gene1,protein_coding_genes$Gene)] 
    Network1$dst <- protein_coding_genes$index[match(Network1$Gene2,protein_coding_genes$Gene)]  
    Network1[c("Gene1", "Gene2")] <- NULL
    names(Network1)<- c("weight", "src", "dst")
    Network1<- Network1[,c(2,3,1)] 
    Network1['weight'] <- gsub("^-","",Network1$weight)
    Network1<- Network1 [complete.cases(Network1), ] 

***Beware that the final results will be on the total number of known disease genes that exist in at least 1 of the selected networks. This is done automatically as Tiresias is launched, where disease gene lists are filtered and where the final predictions only include the rankings of these genes that were included in the selected networks. This means that if your disease genes are 200 but only 180 are in your selected networks, then the learning and training will be performed on the 180 genes. Correspondingly, nodes that are not linked with at least one other node in any of the selected networks cannot have confident predictions. Their prediction are random, henceforth removed from the final ranking results.

Clone this wiki locally