Renumbering a contig with gap5 -top-n-tailing

John Nash
  • John Nash

    John Nash - 2011-04-07

    Many bacterial genomes are circular, and one of the first exercises that I do is to top-and-tail a bacterial genome assembly.  I check that there is circularity at each end, and then trim each end to represent a consistent circle, often to a start and stop site of a related genome.  It makes strain comparisons easier.

    I use shift-< or shift-> at every read at the appropriate end to do that, and with gap4, the start (trimmed) coordinate becomes 1.  This doesn't happen with gap5.

    Have I missed a command to renumber a trimmed contig with gap5?

    Thanks for any help.

  • James Bonfield

    James Bonfield - 2011-04-11

    Ah that's an interesting quirk I'd forgotten to copy over I guess. :-)

    There is no direct way to adjust the numbers, although frustratingly so as it's just one field in one record to move an entire contig. Unfortunately there's no equivalent of Doctor Database yet to directly edit the structures either.

    The only way I can think of making this happen currently is to move a single reading off the left end of the contig using control-left, so it forms a "hole" in the consensus, and save the contig. Then use break contig with a position in that hole. It'll renumber the right hand side (hopefully).  An ugly hack I know.

  • John Nash

    John Nash - 2011-04-12

    The above advice got me a bunch of beeps and a seg-fault. 

    However, placing the cursor on the base that I want to be base one, and leaning on Control-delete (this is a mac keypad so it's the BkSp key on others) until the desired base moved left to be base 1 worked.


  • James Bonfield

    James Bonfield - 2011-06-09

    In SVN there are contig editor bindings now for control-left and control-right arrows on the contig. These move all reads to the right of the editor cursor left or right by one base. It's primarily designed to be used within a contig to insert or delete columns without adding *s to reads themselves (manual alignment editing basically), however it occurs to me that it'll work at trhe start of a contig too. Still not as easy as just entering a new start location though.

    On the to-do list too, but not implemented yet, are < and > key bindings for the consensus to set clip point positions on all reads below them.

  • John Nash

    John Nash - 2011-06-13

    Sorry for the late reply - I just got back from the Applied Bioinformatics and Public Health Genomics conference at your neck of the woods, followed by some time off.

    Thank you. I will definitely "check it out", (literally).



Log in to post a comment.