コード例 #1
0
 private DasAnnotatedSegment getSegment(Collection<DasAnnotatedSegment> segments, String segmentId)
     throws DataSourceException {
   for (DasAnnotatedSegment segment : segments)
     if (segment.getSegmentId().equals(segmentId)) return segment;
   Integer length = this.getSegmentLength(segmentId);
   DasAnnotatedSegment newSegment =
       new DasAnnotatedSegment(
           segmentId, 1, length, "FROM_DATABASE", segmentId, new ArrayList<DasFeature>());
   segments.add(newSegment);
   return newSegment;
 }
コード例 #2
0
 private DasComponentFeature getGene(
     String geneID, int startI, int stopI, DasAnnotatedSegment segment)
     throws DataSourceException {
   for (DasFeature feature : segment.getFeatures())
     if (feature.getFeatureId().equals(geneID)) return (DasComponentFeature) feature;
   return segment
       .getSelfComponentFeature()
       .addSubComponent(
           geneID, startI, stopI, startI, stopI, geneID, geneType, geneID, geneID, method, null,
           null, null, null, null);
 }