Package ubic.gemma.core.analysis.service
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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface ubic.gemma.core.analysis.service.ArrayDesignAnnotationService
ArrayDesignAnnotationService.OutputType -
Field Summary
Fields inherited from interface ubic.gemma.core.analysis.service.ArrayDesignAnnotationService
ANNOTATION_FILE_SUFFIX, BIO_PROCESS_FILE_SUFFIX, NO_PARENTS_FILE_SUFFIX, STANDARD_FILE_SUFFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate(ArrayDesign inputAd, Boolean useGO, boolean deleteOtherFiles) Create (or update) all the annotation files for the given platform.voidintgenerateAnnotationFile(Writer writer, Collection<Gene> genes, Boolean useGO) Generate an annotation for a list of genes, instead of probes.Obtain the directory where platform annotations are located.static StringmungeFileName(String fileBaseName) Remove file separators (e.g., "/") from the file names.readAnnotationFile(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.
-
Constructor Details
-
ArrayDesignAnnotationServiceImpl
public ArrayDesignAnnotationServiceImpl()
-
-
Method Details
-
mungeFileName
Remove file separators (e.g., "/") from the file names.- Parameters:
fileBaseName- file base name- Returns:
- munged name
-
getAnnotDataDir
Description copied from interface:ArrayDesignAnnotationServiceObtain the directory where platform annotations are located.- Specified by:
getAnnotDataDirin interfaceArrayDesignAnnotationService
-
readAnnotationFile
public Map<CompositeSequence,String[]> readAnnotationFile(ArrayDesign arrayDesign) throws IOException Description copied from interface:ArrayDesignAnnotationServiceThis 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:
readAnnotationFilein interfaceArrayDesignAnnotationService- 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
Description copied from interface:ArrayDesignAnnotationServiceCreate (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:- Probe name
- Gene symbol. Genes located at different genome locations are delimited by "|"; multiple genes at the same location are delimited by ",". Both can happen simultaneously.
- Gene name, delimited as for the symbol except '$' is used instead of ','.
- GO terms, delimited by '|'; multiple genes are not handled specially (for compatibility with ermineJ) -- unless useGO is false
- Gemma's gene ids, delimited by '|'
- NCBI gene ids, delimited by '|'
- Ensembl gene ids, delimited by '|'
- Specified by:
createin interfaceArrayDesignAnnotationService- Parameters:
inputAd- platform to processuseGO- if true, GO terms will be includeddeleteOtherFiles- if true, other files conaining the annotations for this platform will be deleted, such as DEA results and data flat files.- Throws:
IOException
-
deleteExistingFiles
- Specified by:
deleteExistingFilesin interfaceArrayDesignAnnotationService
-
generateAnnotationFile
Description copied from interface:ArrayDesignAnnotationServiceGenerate 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:
generateAnnotationFilein interfaceArrayDesignAnnotationService- Parameters:
writer- the writergenes- genesuseGO- if true, GO terms will be included- Returns:
- code
-