use of ubic.gemma.model.common.description.ExternalDatabase in project Gemma by PavlidisLab.
the class DiffExMetaAnalyzerServiceTest method addGenes.
/**
* Add gene annotations. Requires removing old sequence associations.
*/
private void addGenes() throws Exception {
// fill this in with whatever.
ExternalDatabase genbank = edService.findByName("genbank");
assert genbank != null;
Taxon human = taxonService.findByCommonName("human");
assert human != null;
File annotationFile = new File(this.getClass().getResource("/data/loader/expression/geo/meta-analysis/human.probes.for.import.txt").toURI());
ArrayDesign gpl96 = arrayDesignService.findByShortName("GPL96");
assertNotNull(gpl96);
ArrayDesign gpl97 = arrayDesignService.findByShortName("GPL97");
assertNotNull(gpl97);
arrayDesignService.removeBiologicalCharacteristics(gpl96);
arrayDesignProbeMapperService.processArrayDesign(gpl96, human, annotationFile, genbank, false);
arrayDesignService.removeBiologicalCharacteristics(gpl97);
arrayDesignProbeMapperService.processArrayDesign(gpl97, human, annotationFile, genbank, false);
tableMaintenanceUtil.updateGene2CsEntries();
}
use of ubic.gemma.model.common.description.ExternalDatabase in project Gemma by PavlidisLab.
the class BibliographicReferenceServiceImplTest method setUp.
@Before
public void setUp() {
brdao = createMock(BibliographicReferenceDao.class);
svc = new BibliographicReferenceServiceImpl(brdao);
ExternalDatabase extDB = ExternalDatabase.Factory.newInstance();
extDB.setName("PUBMED");
de = DatabaseEntry.Factory.newInstance();
de.setAccession("12345");
de.setExternalDatabase(extDB);
}
use of ubic.gemma.model.common.description.ExternalDatabase in project Gemma by PavlidisLab.
the class ExpressionExperimentBibRefFinderTest method testLocatePrimaryReference.
@Test
public void testLocatePrimaryReference() throws Exception {
ExpressionExperimentBibRefFinder finder = new ExpressionExperimentBibRefFinder();
ExpressionExperiment ee = ExpressionExperiment.Factory.newInstance();
DatabaseEntry de = DatabaseEntry.Factory.newInstance();
ExternalDatabase ed = ExternalDatabase.Factory.newInstance();
ed.setName("GEO");
de.setAccession("GSE3023");
de.setExternalDatabase(ed);
ee.setAccession(de);
try {
BibliographicReference bibref = null;
for (int i = 0; i < 3; i++) {
bibref = finder.locatePrimaryReference(ee);
if (bibref != null)
break;
Thread.sleep(1000);
}
assertNotNull(bibref);
assertEquals("Differential gene expression in anatomical compartments of the human eye.", bibref.getTitle());
} catch (Exception e) {
checkCause(e);
}
}
use of ubic.gemma.model.common.description.ExternalDatabase in project Gemma by PavlidisLab.
the class ExpressionExperimentBibRefFinderTest method testLocatePrimaryReferenceInvalidGSE.
@Test
public void testLocatePrimaryReferenceInvalidGSE() throws Exception {
ExpressionExperimentBibRefFinder finder = new ExpressionExperimentBibRefFinder();
ExpressionExperiment ee = ExpressionExperiment.Factory.newInstance();
DatabaseEntry de = DatabaseEntry.Factory.newInstance();
ExternalDatabase ed = ExternalDatabase.Factory.newInstance();
ed.setName("GEO");
de.setAccession("GSE30231111111111111");
de.setExternalDatabase(ed);
ee.setAccession(de);
try {
BibliographicReference bibref = finder.locatePrimaryReference(ee);
assert (bibref == null);
} catch (Exception e) {
checkCause(e);
}
}
use of ubic.gemma.model.common.description.ExternalDatabase in project Gemma by PavlidisLab.
the class ShellDelegatingBlat method getSearchedGenome.
public static ExternalDatabase getSearchedGenome(Taxon taxon) {
BlattableGenome genome = ShellDelegatingBlat.inferBlatDatabase(taxon);
ExternalDatabase searchedDatabase = ExternalDatabase.Factory.newInstance();
searchedDatabase.setType(DatabaseType.SEQUENCE);
searchedDatabase.setName(genome.toString().toLowerCase());
return searchedDatabase;
}
Aggregations