Search in sources :

Example 6 with CitationValueObject

use of ubic.gemma.model.common.description.CitationValueObject in project Gemma by PavlidisLab.

the class EvidenceImporterCLI method convertFileLine2ExperimentalValueObjects.

/**
 * convert for ExperimentalEvidenceValueObject
 */
private ExperimentalEvidenceValueObject convertFileLine2ExperimentalValueObjects(String[] tokens) throws IOException {
    ExperimentalEvidenceValueObject evidence = new ExperimentalEvidenceValueObject(-1L);
    this.populateCommonFields(evidence, tokens);
    String reviewReferencePubmed = tokens[this.mapColumns.get("OtherPubMed")].trim();
    Set<String> relevantPublicationsPubmed = new HashSet<>();
    if (!reviewReferencePubmed.equals("")) {
        relevantPublicationsPubmed.add(reviewReferencePubmed);
    }
    for (String relevantPubMedID : relevantPublicationsPubmed) {
        CitationValueObject relevantPublicationValueObject = new CitationValueObject();
        relevantPublicationValueObject.setPubmedAccession(relevantPubMedID);
        evidence.getPhenotypeAssPubVO().add(PhenotypeAssPubValueObject.createRelevantPublication(relevantPubMedID));
    }
    Set<String> developmentStage = this.trimArray(tokens[this.mapColumns.get("DevelopmentalStage")].split(";"));
    Set<String> bioSource = this.trimArray(tokens[this.mapColumns.get("BioSource")].split(";"));
    Set<String> organismPart = this.trimArray(tokens[this.mapColumns.get("OrganismPart")].split(";"));
    Set<String> experimentDesign = this.trimArray(tokens[this.mapColumns.get("ExperimentDesign")].split(";"));
    Set<String> treatment = this.trimArray(tokens[this.mapColumns.get("Treatment")].split(";"));
    Set<String> experimentOBI = this.trimArray(tokens[this.mapColumns.get("Experiment")].split(";"));
    Set<CharacteristicValueObject> experimentTags = new HashSet<>();
    experimentTags.addAll(this.experiementTags2Ontology(developmentStage, this.DEVELOPMENTAL_STAGE, this.DEVELOPMENTAL_STAGE_ONTOLOGY, this.nifstdOntologyService));
    experimentTags.addAll(this.experiementTags2Ontology(bioSource, this.BIOSOURCE_ONTOLOGY, this.BIOSOURCE_ONTOLOGY, null));
    experimentTags.addAll(this.experiementTags2Ontology(organismPart, this.ORGANISM_PART, this.ORGANISM_PART_ONTOLOGY, this.fmaOntologyService));
    experimentTags.addAll(this.experiementTags2Ontology(experimentDesign, this.EXPERIMENT_DESIGN, this.EXPERIMENT_DESIGN_ONTOLOGY, this.obiService));
    experimentTags.addAll(this.experiementTags2Ontology(treatment, this.TREATMENT, this.TREATMENT_ONTOLOGY, null));
    experimentTags.addAll(this.experiementTags2Ontology(experimentOBI, this.EXPERIMENT, this.EXPERIMENT_ONTOLOGY, this.obiService));
    evidence.setExperimentCharacteristics(experimentTags);
    return evidence;
}
Also used : CitationValueObject(ubic.gemma.model.common.description.CitationValueObject)

Example 7 with CitationValueObject

use of ubic.gemma.model.common.description.CitationValueObject in project Gemma by PavlidisLab.

the class BibRefControllerTest method testShowAllForExperiments.

@Test
public void testShowAllForExperiments() {
    ModelAndView mv = brc.showAllForExperiments(this.newGet("/bibRef/showAllEeBibRefs.html"), (HttpServletResponse) null);
    @SuppressWarnings("unchecked") Map<CitationValueObject, Collection<ExpressionExperimentValueObject>> citationToEEs = (Map<CitationValueObject, Collection<ExpressionExperimentValueObject>>) mv.getModel().get("citationToEEs");
    assertNotNull(citationToEEs);
}
Also used : ExpressionExperimentValueObject(ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject) CitationValueObject(ubic.gemma.model.common.description.CitationValueObject) ModelAndView(org.springframework.web.servlet.ModelAndView) Collection(java.util.Collection) Map(java.util.Map) Test(org.junit.Test) BaseSpringWebTest(ubic.gemma.web.util.BaseSpringWebTest)

Aggregations

CitationValueObject (ubic.gemma.model.common.description.CitationValueObject)7 ModelAndView (org.springframework.web.servlet.ModelAndView)2 ExpressionExperimentValueObject (ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject)2 Calendar (java.util.Calendar)1 Collection (java.util.Collection)1 Date (java.util.Date)1 GregorianCalendar (java.util.GregorianCalendar)1 Map (java.util.Map)1 JspException (javax.servlet.jsp.JspException)1 Test (org.junit.Test)1 BibliographicReference (ubic.gemma.model.common.description.BibliographicReference)1 ExternalDatabaseValueObject (ubic.gemma.model.common.description.ExternalDatabaseValueObject)1 ExpressionExperiment (ubic.gemma.model.expression.experiment.ExpressionExperiment)1 BaseSpringWebTest (ubic.gemma.web.util.BaseSpringWebTest)1