<div dir="ltr">Thanks for clarifying Luke.<div><br></div><div>If you are hoping for advice from other users, you may be out of luck - my impression from the mailing list and git questions is that using BioSQL with Biopyton is quite rare nowadays.</div><div><br></div><div>The database schemas for BioSQL itself has been effectively static for years: the only recent changes were sqlite added 5 years ago, and a tweak for MySQL8 last year. On the bright side, what it does works fine - and you are free to experiment and extend your copy.</div><div><br></div><div>For your usecase, are you talking about point revisions to published records (e.g. NCBI or EMBL annotation), where the naming convention is an accession dot version? Or are you dealing with local revisions to annotated sequences?</div><div><br></div><div>Peter</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 3, 2020 at 11:46 AM Lsting likebee <<a href="mailto:lukeswabypetts@gmail.com">lukeswabypetts@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div>
<div>
<div>
<div style="direction:ltr">Hi Peter</div>
<div><br>
</div>
<div style="direction:ltr">Yes, where possible I’m using BioSQL—especially BioSeqDatabase—which has been perfectly fine for all my scripts (so far just data ingestion and output) but am having a particularly difficult time with data replacement.
</div>
<div><br>
</div>
<div style="direction:ltr">The goal is to be able to extract some records, modify them, and push them back in under the same name with an updated version number and bioentry_id, such that whenever those records are next extracted it is the latest version
that is pulled by default. </div>
<div><br>
</div>
<div style="direction:ltr">I am very new to all of this (just about to start my masters) so this is no doubt just a shortcoming in my understanding, but it feels like I must be missing something very simple, as this is surely something that most users would
need!</div>
<div><br>
</div>
<div style="direction:ltr">Can you think of anything that could help?</div>
<div><br>
</div>
<div style="direction:ltr">Very much appreciated </div>
<div><br>
</div>
<div style="direction:ltr">Luke </div>
</div>
<div><br>
</div>
<div>Get <a href="https://aka.ms/o0ukef" target="_blank">Outlook for iOS</a></div>
</div>
<div> </div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-2488440548726974139divRplyFwdMsg" dir="dir="ltr""><font face="Calibri, sans-serif" style="font-size:11pt"><b>From:</b> Peter Cock <<a href="mailto:p.j.a.cock@googlemail.com" target="_blank">p.j.a.cock@googlemail.com</a>><br>
<b>Sent:</b> Monday, August 3, 2020 9:39 am<br>
<b>To:</b> Luke Swaby<br>
<b>Cc:</b> <a href="mailto:biosql-l@mailman.open-bio.org" target="_blank">biosql-l@mailman.open-bio.org</a><br>
<b>Subject:</b> Re: [BioSQL-l] Versioning in BioSQL Database
<div> </div>
</font></div>
<div dir="ltr">Hello Luke,
<div><br>
</div>
<div>It has been some time since I looked at the tables in BioSQL, but just to be clear - you are not using the Biopthon BioSQL wrapper, are you?</div>
<div><br>
</div>
<div><a href="https://github.com/biopython/biopython/tree/master/BioSQL/" target="_blank">https://github.com/biopython/biopython/tree/master/BioSQL/</a><br>
</div>
<div><br>
</div>
<div>Peter</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Aug 3, 2020 at 2:36 AM Luke Swaby <<a href="mailto:lukeswabypetts@gmail.com" target="_blank">lukeswabypetts@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Hello</span><br style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">
<br style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">
<span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">I’m currently writing a load of Python scripts to interact with a slightly modified version of your BioSQL database (pretty much identical, with an additional table for metadata), and am
having a lot of trouble working out how to implement record versioning in it.</span><br style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">
<br style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">
<span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Comments in the schema—and the version field in the bioentry table—suggest a particular method of doing this was in mind when the schema was written, but I can’t find any documentation on
how this is to be done.<span> </span></span><br style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">
<br style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">
<span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">In sum, I need it to be able to hold multiple versions of the same record in the same table, and a means of accessing (ideally by default) only the latest version of each record when it is
requested. It would ideally also automatically add a new version of a record whenever any change is made to it, either internally by direct MySQL queries or externally by ingestion of newly modified .gb/.csv files. I’ve thought of numerous ways of doing this,
including creating a new table which points to the unique bioentry_id/metadata_id of the latest version of each record, but am very stuck on how to do this.</span><br style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">
<br style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">
<span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Do you have any suggestions? I’m sure there is a relatively basic answer that I am totally missing, but I’m pressed for time now and am finding nothing anywhere!</span><br style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">
<br style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">
<span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Very much appreciated if so</span><br style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">
<br style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">
<span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Luke</span><br>
</div>
_______________________________________________<br>
BioSQL-l mailing list<br>
<a href="mailto:BioSQL-l@mailman.open-bio.org" target="_blank">BioSQL-l@mailman.open-bio.org</a><br>
<a href="https://mailman.open-bio.org/mailman/listinfo/biosql-l" rel="noreferrer" target="_blank">https://mailman.open-bio.org/mailman/listinfo/biosql-l</a></blockquote>
</div>
</div>
</div>
</blockquote></div>