<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Peter,<div class=""><br class=""></div><div class="">This feature is equivalent to the second BioPython feature I showed:</div><div class=""><br class=""></div><div class=""><div class=""><div class="">my $feat = Bio::SeqFeature::Generic-&gt;new(</div><div class="">&nbsp; &nbsp; -primary_tag =&gt; "test_domain",</div><div class="">&nbsp; &nbsp; -start &nbsp; &nbsp; &nbsp; =&gt; 8,</div><div class="">&nbsp; &nbsp; -end &nbsp; &nbsp; &nbsp; &nbsp; =&gt; 15,</div><div class="">&nbsp; &nbsp; -strand &nbsp; &nbsp; &nbsp;=&gt; 1,</div><div class="">&nbsp; &nbsp; -host =&gt; 'human’,&nbsp;</div><div class="">&nbsp; &nbsp; -source =&gt; 'NCBI'&nbsp;</div><div class="">);</div></div></div><div class=""><br class=""></div><div class="">This works, the source term is set to ‘NCBI’, like in BioPython.</div><div class=""><br class=""></div><div class="">This also works in the same way, no surprise:</div><div class=""><br class=""></div><div class="">my $feat = Bio::SeqFeature::Generic-&gt;new(</div><div class=""><div class="">&nbsp; &nbsp; -primary_tag =&gt; "test_domain",</div><div class="">&nbsp; &nbsp; -start &nbsp; &nbsp; &nbsp; =&gt; 8,</div><div class="">&nbsp; &nbsp; -end &nbsp; &nbsp; &nbsp; &nbsp; =&gt; 15,</div><div class="">&nbsp; &nbsp; -strand &nbsp; &nbsp; &nbsp;=&gt; 1,</div><div class="">&nbsp; &nbsp; -host &nbsp; &nbsp; &nbsp; &nbsp;=&gt; &nbsp;‘human'</div><div class="">);</div><div class="">$feat-&gt;source_tag('NCBI');</div><div class=""><br class=""></div><div class="">This does not work, although it should, IMO:</div><div class=""><br class=""></div><div class=""><div class=""><div class="">my $feat = Bio::SeqFeature::Generic-&gt;new(</div><div class="">&nbsp; &nbsp; -primary_tag =&gt; "test_domain",</div><div class="">&nbsp; &nbsp; -start &nbsp; &nbsp; &nbsp; =&gt; 8,</div><div class="">&nbsp; &nbsp; -end &nbsp; &nbsp; &nbsp; &nbsp; =&gt; 15,</div><div class="">&nbsp; &nbsp; -strand &nbsp; &nbsp; &nbsp;=&gt; 1,</div><div class="">&nbsp; &nbsp; -tag &nbsp; &nbsp; &nbsp; &nbsp; =&gt; { host =&gt; 'human', source =&gt; 'NCBI' }</div><div class="">);</div></div></div><div class=""><br class=""></div><div class="">Have to admit, it’s debatable whether this should work or not.</div><div class=""><br class=""></div><div class="">And this does not work:</div><div class=""><br class=""></div><div class=""><div class="">my $feat = Bio::SeqFeature::Generic-&gt;new(</div><div class="">&nbsp; &nbsp; -primary_tag =&gt; "test_domain",</div><div class="">&nbsp; &nbsp; -start &nbsp; &nbsp; &nbsp; =&gt; 8,</div><div class="">&nbsp; &nbsp; -end &nbsp; &nbsp; &nbsp; &nbsp; =&gt; 15,</div><div class="">&nbsp; &nbsp; -strand &nbsp; &nbsp; &nbsp;=&gt; 1,</div><div class="">&nbsp; &nbsp; -host =&gt; 'human’,&nbsp;</div><div class="">);</div></div><div class=""><br class=""></div><div class="">Error:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 14px; font-family: Courier; background-color: rgb(179, 187, 255);" class="">MSG: insert in Bio::DB::BioSQL::SeqFeatureAdaptor (driver) failed, values were ("","1") FKs (34926,5443,&lt;NULL&gt;)</div><div style="margin: 0px; font-size: 14px; font-family: Courier; background-color: rgb(179, 187, 255);" class="">Column 'source_term_id' cannot be null</div></div><div class=""><br class=""></div><div class="">So, 2 differences:</div><div class=""><br class=""></div><div class="">- BioPython supplies that default source term, and BioPerl does not</div><div class="">- Bioperl has source_tag() to help you add a source term</div><div class=""><br class=""></div><div class="">Don’t know about BioRuby, BioJava.</div><div class=""><br class=""></div><div class="">Thanks again,</div><div class=""><br class=""></div><div class="">Brian O.</div><div class=""><br class=""></div><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Jun 24, 2015, at 12:17 PM, Peter Cock &lt;<a href="mailto:p.j.a.cock@googlemail.com" class="">p.j.a.cock@googlemail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">Thanks Brian,<br class=""><br class="">OK, good. Now since you also seem familiar with the<br class="">BioPerl/BioSQL setup, does it also look for a special<br class="">qualifier "source" in the same way?<br class=""><br class="">i.e. Is this equivalent to the BioPerl source_tag() method.<br class="">mentioned earlier?<br class=""><br class="">(You could probably test this with a hand edited GenBank<br class="">file adding a "source" qualifier to a pre-existant feature<br class="">then loading it into BioSQL with BioPerl - I don't think I<br class="">have a suitable test setup up and running the moment<br class="">to try that myself.)<br class=""><br class="">If so, then I'll look at getting the PR updated, tested,<br class="">and merged in.<br class=""><br class="">Peter<br class=""><br class="">On Wed, Jun 24, 2015 at 4:58 PM, Brian Osborne &lt;<a href="mailto:bosborne11@verizon.net" class="">bosborne11@verizon.net</a>&gt; wrote:<br class=""><blockquote type="cite" class="">Peter,<br class=""><br class="">Tested the ctSkennerton code, it does what you’d expect. When a SeqRecord is loaded with a feature like this:<br class=""><br class="">feat = SeqFeature(loc, qualifiers={"host": "human"}, type="test_domain")<br class=""><br class="">the SeqFeature in the database has the default “source_term” of 'EMBL/GenBank/SwissProt’.<br class=""><br class="">But this:<br class=""><br class="">feat = SeqFeature(loc, qualifiers={"source": "NCBI", "host": "human"}, type="test_domain”)<br class=""><br class="">sets the source_term to “NCBI”.<br class=""><br class="">Thanks again,<br class=""><br class="">Brian O.<br class=""><br class=""><blockquote type="cite" class="">On Jun 23, 2015, at 9:49 AM, Brian Osborne &lt;<a href="mailto:bosborne11@verizon.net" class="">bosborne11@verizon.net</a>&gt; wrote:<br class=""><br class="">Peter,<br class=""><br class="">Yes, will test.<br class=""><br class="">Thanks once again.<br class=""><br class="">BIO<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Jun 23, 2015, at 9:41 AM, Peter Cock &lt;<a href="mailto:p.j.a.cock@googlemail.com" class="">p.j.a.cock@googlemail.com</a>&gt; wrote:<br class=""><br class="">On Tue, Jun 23, 2015 at 2:34 PM, Brian Osborne &lt;<a href="mailto:bosborne11@verizon.net" class="">bosborne11@verizon.net</a>&gt; wrote:<br class=""><blockquote type="cite" class="">Peter,<br class=""><br class="">So that code submitted by ctSkennerton would certainly work for me as well.<br class="">Looks like you had no problem with the change, can the merge conflict be<br class="">resolved?<br class=""><br class="">Thanks again,<br class=""><br class="">Brian O.<br class=""></blockquote><br class="">I'm not sure what's up with TravisCI and a possible merge conflict.<br class="">Any conflict is likely just cosmetic.<br class=""><br class="">Could you try testing if ctSkennerton's branch works for you?<br class=""><br class="">(You'd need to know basic git, and be able to install Biopython<br class="">from source - fairly easy under Linux or Mac OS X)<br class=""><br class="">Peter<br class=""></blockquote><br class=""><br class="">_______________________________________________<br class="">Biopython-dev mailing list<br class=""><a href="mailto:Biopython-dev@mailman.open-bio.org" class="">Biopython-dev@mailman.open-bio.org</a><br class="">http://mailman.open-bio.org/mailman/listinfo/biopython-dev<br class=""></blockquote><br class=""></blockquote></div></blockquote></div><br class=""></div></body></html>