<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->new(</div><div class=""> -primary_tag => "test_domain",</div><div class=""> -start => 8,</div><div class=""> -end => 15,</div><div class=""> -strand => 1,</div><div class=""> -host => 'human’, </div><div class=""> -source => 'NCBI' </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->new(</div><div class=""><div class=""> -primary_tag => "test_domain",</div><div class=""> -start => 8,</div><div class=""> -end => 15,</div><div class=""> -strand => 1,</div><div class=""> -host => ‘human'</div><div class="">);</div><div class="">$feat->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->new(</div><div class=""> -primary_tag => "test_domain",</div><div class=""> -start => 8,</div><div class=""> -end => 15,</div><div class=""> -strand => 1,</div><div class=""> -tag => { host => 'human', source => '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->new(</div><div class=""> -primary_tag => "test_domain",</div><div class=""> -start => 8,</div><div class=""> -end => 15,</div><div class=""> -strand => 1,</div><div class=""> -host => 'human’, </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,<NULL>)</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 <<a href="mailto:p.j.a.cock@googlemail.com" class="">p.j.a.cock@googlemail.com</a>> 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 <<a href="mailto:bosborne11@verizon.net" class="">bosborne11@verizon.net</a>> 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 <<a href="mailto:bosborne11@verizon.net" class="">bosborne11@verizon.net</a>> 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 <<a href="mailto:p.j.a.cock@googlemail.com" class="">p.j.a.cock@googlemail.com</a>> wrote:<br class=""><br class="">On Tue, Jun 23, 2015 at 2:34 PM, Brian Osborne <<a href="mailto:bosborne11@verizon.net" class="">bosborne11@verizon.net</a>> 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>