コード例 #1
0
ファイル: xmlToSbol.java プロジェクト: sysu-software/BiArkit
 /**
  * Add subpart to a SequenceAnnotation
  *
  * @param sub Subpart to create SequenceAnnotation
  * @param place
  * @return
  */
 private SequenceAnnotation createAnnotation(Subpart sub, int place) {
   SequenceAnnotation annotation2 = SBOLFactory.createSequenceAnnotation();
   annotation2.setURI(
       URI.create("http://sbols.org/anot/an_" + this.partId + "_" + sub.id + "_" + place));
   DnaComponent dnaComponent2 = SBOLFactory.createDnaComponent();
   dnaComponent2.setURI(URI.create("http://partsregistry.org/Part/" + sub.getPart_name()));
   dnaComponent2.setDescription(sub.description);
   dnaComponent2.setDisplayId(sub.getPart_name());
   dnaComponent2.setName(sub.nickName);
   dnaComponent2.addType(SequenceOntology.type(sub.getType().toString()));
   annotation2.setSubComponent(dnaComponent2);
   return annotation2;
 }
コード例 #2
0
ファイル: xmlToSbol.java プロジェクト: sysu-software/BiArkit
 private SequenceAnnotation createAnnotation(feature sub, int place) {
   SequenceAnnotation annotation2 = SBOLFactory.createSequenceAnnotation();
   annotation2.setBioStart(sub.startpos);
   annotation2.setBioEnd(sub.endpos);
   if (sub.direction.equals("forward")) annotation2.setStrand(StrandType.POSITIVE);
   else annotation2.setStrand(StrandType.NEGATIVE);
   annotation2.setURI(URI.create("http://sbols.org/anot/f_" + sub.id));
   DnaComponent dnaComponent2 = SBOLFactory.createDnaComponent();
   dnaComponent2.setURI(URI.create("http://partsregistry.org/feat/f_" + sub.id));
   dnaComponent2.setDisplayId("f_" + sub.id);
   dnaComponent2.setName(sub.type);
   dnaComponent2.addType(SequenceOntology.type(sub.type));
   annotation2.setSubComponent(dnaComponent2);
   return annotation2;
 }