rrwick / Bandage

a Bioinformatics Application for Navigating De novo Assembly Graphs Easily
http://rrwick.github.io/Bandage/
GNU General Public License v3.0
579 stars 96 forks source link

Draw circular contigs from GFA assemblies [feature-request] #25

Closed govinda-kamath closed 8 years ago

govinda-kamath commented 8 years ago

Hi,

Would it be possible to draw self loops in assemblies? This would help us a lot in bacterial assemblies to distinguish coverage limited partial assemblies from plasmids.

For example if I have the following GFA

H VN:Z:1.0 S 1 CGATGCAA L 1 + 1 + 0M

The visualisation I seem to get is

screen shot 2016-05-17 at 1 47 59 pm

I was wondering if it would be possible to make these into a circular contig in such situations?

Thanks, Govinda.

rrwick commented 8 years ago

Govinda,

Bandage should already behave the way you're requesting. I tried the sample GFA you gave above and got this result in the current Bandage release:

screen shot 2016-07-03 at 9 22 32 am

The only thing I think of which might explain why it's not working for you is the format of the GFA. When I copied your example, I changed all of the whitespace to tabs, as per the GFA spec:

H   VN:Z:1.0
S   1   CGATGCAA
L   1   +   1   +   0M

I think GitHub changes the tabs back into spaces in this text, but you get the idea. If your GFA file doesn't use tabs, especially in the link line, Bandage might be failing to parse it correctly and not loading the link.

Ryan

govinda-kamath commented 8 years ago

Thanks!! That fixes it.