Exemplo n.º 1
0
  public static Collection<String> extractReportersFromGene(
      Collection<GeneIdentifierDE> geneDEs, ArrayPlatformDE platform)
      throws OperationNotSupportedException {
    Collection<String> reporters = new ArrayList<String>();
    Resultant resultant;
    GeneIDCriteria geneIDCrit = new GeneIDCriteria();
    geneIDCrit.setGeneIdentifiers(geneDEs);
    GeneExpressionQuery geneExpressionQuery =
        (GeneExpressionQuery) QueryManager.createQuery(QueryType.GENE_EXPR_QUERY_TYPE);
    geneExpressionQuery.setQueryName("EXTRACT REPORTERS");
    geneExpressionQuery.setAssociatedView(ViewFactory.newView(ViewType.GENE_GROUP_SAMPLE_VIEW));
    geneExpressionQuery.setGeneIDCrit(geneIDCrit);
    ArrayPlatformCriteria arrayPlatformCriteria = new ArrayPlatformCriteria();
    arrayPlatformCriteria.setPlatform(platform);
    geneExpressionQuery.setArrayPlatformCrit(arrayPlatformCriteria);
    try {
      CompoundQuery compoundQuery = new CompoundQuery(geneExpressionQuery);

      resultant = ResultsetManager.executeCompoundQuery(compoundQuery);
    } catch (Exception e) {
      throw new OperationNotSupportedException(
          "We are not able to extract Reporters " + e.getMessage());
    }
    if (resultant != null) {
      reporters = extractReporters(resultant.getResultsContainer());
    }
    return reporters;
  }
Exemplo n.º 2
0
 /**
  * Overrides the protected Object.clone() method exposing it as public. It performs a 2 tier copy,
  * that is, it does a memcopy of the instance and then sets all the non-primitive data fields to
  * clones of themselves.
  *
  * @return -A minimum 2 deep copy of this object.
  */
 public Object clone() {
   GeneExpressionQuery myClone = null;
   myClone = (GeneExpressionQuery) super.clone();
   if (allGenesCrit != null) {
     myClone.allGenesCrit = (AllGenesCriteria) allGenesCrit.clone();
   }
   if (arrayPlatformCriteria != null) {
     myClone.arrayPlatformCriteria = (ArrayPlatformCriteria) arrayPlatformCriteria.clone();
   }
   if (cloneOrProbeIDCriteria != null) {
     myClone.cloneOrProbeIDCriteria = (CloneOrProbeIDCriteria) cloneOrProbeIDCriteria.clone();
   }
   if (foldChgCrit != null) {
     myClone.foldChgCrit = (FoldChangeCriteria) foldChgCrit.clone();
   }
   if (geneIDCrit != null) {
     myClone.geneIDCrit = (GeneIDCriteria) geneIDCrit.clone();
   }
   if (geneOntologyCriteria != null) {
     myClone.geneOntologyCriteria = (GeneOntologyCriteria) geneOntologyCriteria.clone();
   }
   if (pathwayCriteria != null) {
     myClone.pathwayCriteria = (PathwayCriteria) pathwayCriteria.clone();
   }
   if (regionCrit != null) {
     myClone.regionCrit = (RegionCriteria) regionCrit.clone();
   }
   return myClone;
 }