Class ArrayDesignAnnotationServiceImpl

    • Constructor Detail

      • ArrayDesignAnnotationServiceImpl

        public ArrayDesignAnnotationServiceImpl()
    • Method Detail

      • getFileName

        public static File getFileName​(String fileBaseName)
      • mungeFileName

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

        public static Map<Long,​Collection<Gene>> readAnnotationFile​(ArrayDesign arrayDesign)
        Parameters:
        arrayDesign - array design
        Returns:
        Map of composite sequence ids and transient (incomplete) genes. The genes only have the symbol filled in.
      • readAnnotationFileAsString

        public static Map<Long,​String[]> readAnnotationFileAsString​(ArrayDesign arrayDesign)
        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.
        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.
      • 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
      • 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