java.lang.Object
com.compomics.util.experiment.biology.genes.ensembl.GeneMapping

public class GeneMapping
extends Object
Class for the handling of gene mappings.
Author:
Marc Vaudel, Harald Barsnes
  • Field Details

  • Constructor Details

  • Method Details

    • importFromFile

      public void importFromFile​(File file, WaitingHandler waitingHandler) throws IOException
      Reads go mappings from a BioMart file. The structure of the file should be Ensembl Accession Gene name Chromosome name. Previous mappings are silently overwritten.
      Parameters:
      file - the file containing the mapping
      waitingHandler - a waiting handler allowing display of the progress and canceling of the process.
      Throws:
      IOException - if an exception occurs while reading the file
    • getChromosome

      public String getChromosome​(String geneName)
      Returns the chromosome for a given gene.
      Parameters:
      geneName - the gene name
      Returns:
      the chromosome for a given gene
    • getEnsemblAccession

      public String getEnsemblAccession​(String geneName)
      Returns the Ensembl accession for a given gene.
      Parameters:
      geneName - the gene name
      Returns:
      the Ensembl accession for a given gene
    • getGeneNameToChromosome

      public HashMap<String,​String> getGeneNameToChromosome()
      Returns the gene name to chromosome map.
      Returns:
      the gene name to chromosome map
    • getGeneNameToAccession

      public HashMap<String,​String> getGeneNameToAccession()
      Returns the gene name to protein accession map.
      Returns:
      the gene name to protein accession map