private Map<String, Hybridization> getIdToHybridizationMap() throws InvalidInputException { if (idToHybridizationMap == null) { idToHybridizationMap = new HashMap<String, Hybridization>(); for (Hybridization hybridization : getAllHybridizations()) { idToHybridizationMap.put(hybridization.getId(), hybridization); } } return idToHybridizationMap; }
protected DataSetRequest createRequest() throws InvalidInputException { DataSetRequest request = new DataSetRequest(); for (Hybridization hybridization : getAllHybridizations()) { if (getGenomicSource().getPlatformName().equals(hybridization.getArrayDesign().getName())) { request.getHybridizations().add(hybridization.getReference()); } } if (request.getHybridizations().isEmpty()) { throw new InvalidInputException( "No caArray data found with Array Design: " + getGenomicSource().getPlatformName()); } request.getQuantitationTypes().add(getSignal(request).getReference()); return request; }
protected Platform getPlatform(Hybridization hybridization) throws DataRetrievalException { ArrayDesign arrayDesign = hybridization.getArrayDesign(); if (arrayDesign == null) { throw new DataRetrievalException( "There is no array design associated with the array for the hybridization " + hybridization.getName() + ", unable to load array data"); } Platform platform = getDao().getPlatform(arrayDesign.getName()); if (platform == null) { throw new DataRetrievalException( "The platform named " + arrayDesign.getName() + " hasn't been loaded into the system"); } return platform; }
protected Sample getAssociatedSample(Hybridization hybridization) throws InvalidInputException { return getHybridizationToSampleMap().get(getIdToHybridizationMap().get(hybridization.getId())); }