public CurationSet getCurationSet() throws apollo.dataadapter.ApolloAdapterException {
    GbrowseAdapterGUI gui = (GbrowseAdapterGUI) getUI(ApolloDataAdapterI.OP_READ_DATA);

    String chr = gui.getSelectedChr();
    int chrstart = Integer.parseInt(gui.getSelectedStart());
    int chrend = Integer.parseInt(gui.getSelectedEnd());

    mysql = new MySQLInstance(host, user, pass, port);
    db = mysql.fetchDatabaseByName(dbname);
    dba = new DBAdaptor(db);

    FeatureAdaptor fa = dba.getFeatureAdaptor();
    FeatureSetI f = fa.fetchByReferenceStartEnd(chr, chrstart, chrend);

    super.clearOldData();

    CurationSet curationSet = new CurationSet();

    curationSet.setChromosome(chr);
    curationSet.setLow(chrstart);
    curationSet.setHigh(chrend);
    curationSet.setStrand(0);

    StrandedFeatureSet sfset = new StrandedFeatureSet(new FeatureSet(), new FeatureSet());

    for (int i = 0; i < f.size(); i++) {
      SeqFeatureI sf = f.getFeatureAt(i);

      sfset.addFeature(sf);
    }

    curationSet.setResults(sfset);
    curationSet.setAnnots(new StrandedFeatureSet(new FeatureSet(), new FeatureSet()));
    curationSet.setName(chr + "." + chrstart + "-" + chrend);

    // super.notifyLoadingDone();

    return curationSet;
  }
Пример #2
0
 public String getTitle(CurationSet curation) {
   if (curation.getChildCurationSets().size() <= 0) return curation.toString();
   else return "composite";
 }