Class ArrayDesignAnnotationServiceImpl

java.lang.Object
ubic.gemma.core.analysis.service.ArrayDesignAnnotationServiceImpl
All Implemented Interfaces:
ArrayDesignAnnotationService

@Component public class ArrayDesignAnnotationServiceImpl extends Object implements ArrayDesignAnnotationService
Author:
Paul
See Also:
  • Constructor Details

    • ArrayDesignAnnotationServiceImpl

      public ArrayDesignAnnotationServiceImpl()
  • Method Details

    • mungeFileName

      public static String mungeFileName(String fileBaseName)
      Remove file separators (e.g., "/") from the file names.
      Parameters:
      fileBaseName - file base name
      Returns:
      munged name
    • getAnnotDataDir

      public Path getAnnotDataDir()
      Description copied from interface: ArrayDesignAnnotationService
      Obtain the directory where platform annotations are located.
      Specified by:
      getAnnotDataDir in interface ArrayDesignAnnotationService
    • readAnnotationFile

      public Map<CompositeSequence,String[]> readAnnotationFile(ArrayDesign arrayDesign) throws IOException
      Description copied from interface: ArrayDesignAnnotationService
      This tries to read one of the annotation files (noparents, bioprocess or regular) to get the gene information - GO annotations are not part of the result.
      Specified by:
      readAnnotationFile in interface ArrayDesignAnnotationService
      Parameters:
      arrayDesign - array design
      Returns:
      Map of composite sequence ids to an array of delimited strings: [probe name,genes symbol, gene Name, gemma gene id, ncbi id] for a given probe id. format of string is geneSymbol then geneNames same as found in annotation file.
      Throws:
      IOException
    • create

      public void create(ArrayDesign inputAd, Boolean useGO, boolean deleteOtherFiles) throws IOException
      Description copied from interface: ArrayDesignAnnotationService
      Create (or update) all the annotation files for the given platform. Side effect: any expression experiment data files that use this platform will be deleted. Format details: There is a one-line header. The columns are:
      1. Probe name
      2. Gene symbol. Genes located at different genome locations are delimited by "|"; multiple genes at the same location are delimited by ",". Both can happen simultaneously.
      3. Gene name, delimited as for the symbol except '$' is used instead of ','.
      4. GO terms, delimited by '|'; multiple genes are not handled specially (for compatibility with ermineJ) -- unless useGO is false
      5. Gemma's gene ids, delimited by '|'
      6. NCBI gene ids, delimited by '|'
      7. Ensembl gene ids, delimited by '|'
      Specified by:
      create in interface ArrayDesignAnnotationService
      Parameters:
      inputAd - platform to process
      useGO - if true, GO terms will be included
      deleteOtherFiles - if true, other files conaining the annotations for this platform will be deleted, such as DEA results and data flat files.
      Throws:
      IOException
    • deleteExistingFiles

      public void deleteExistingFiles(ArrayDesign ad)
      Specified by:
      deleteExistingFiles in interface ArrayDesignAnnotationService
    • generateAnnotationFile

      public int generateAnnotationFile(Writer writer, Collection<Gene> genes, Boolean useGO)
      Description copied from interface: ArrayDesignAnnotationService
      Generate an annotation for a list of genes, instead of probes. The second column will contain the NCBI id, if available. Will generate the 'short' version.
      Specified by:
      generateAnnotationFile in interface ArrayDesignAnnotationService
      Parameters:
      writer - the writer
      genes - genes
      useGO - if true, GO terms will be included
      Returns:
      code