HingeAssembler / HINGE

Software accompanying "HINGE: Long-Read Assembly Achieves Optimal Repeat Resolution"
http://genome.cshlp.org/content/27/5/747.full.pdf+html?sid=39918b0d-7a7d-4a12-b720-9238834902fd
Other
64 stars 9 forks source link

HINGE graph output #122

Open alimayy opened 7 years ago

alimayy commented 7 years ago

Hi guys,

Is there way to convert the HINGE output to a format that can be used for Bandage? A format like spade's fastg?

Thanks in advance, Ali

govinda-kamath commented 7 years ago

Hi Ali,

The last step

hinge gfa $PWD ecoli  ecoli.consensus.fasta

does generate a GFA which should be compatible with bandage? Do you want a fastg in particular?

alimayy commented 7 years ago

Thanks a lot for your message Govinda. I don't necessarily need fastg, but since I use spades for short-read assembly, it would be nice to have a graph representation similar to spades'. If the HINGE GFA is similar to graphs generated by spades it's perfect.

I tried the command you suggested but it gave me an error:

amay@d7f3fa73830f:/project$ hinge gfa ./ hinge hinge.consensus.fasta
Traceback (most recent call last):
  File "/HINGE/inst/bin/../lib/hinge/get_consensus_gfa.py", line 62, in <module>
    nodes_to_keep = [x for x in g.nodes() if consensus_contigs[g.node[x]['contig_id']] != '' ]
IndexError: list index out of range

I'm pretty sure this is due to the fact that my consensus.fasta does not contain the reverse complementary assembly, while the graph does. Can I change something in the get_consensus_gfa.py so that it will work with my single-stranded consensus.fasta?

Thanks in advance!

Edit: hmm, if the graphs of hinge.draft.fasta and hinge.consensus.fasta are essentially the same, then I can use hinge.draft.fasta to generate the GFA for the final (consensus-called) assembly, is this correct?

govinda-kamath commented 7 years ago

We can not get a single stranded GFA, because it's not complete representation of all possibilities (unbridged inverted repeat). What sort of representation you're looking for?

You can use hinge.draft.fasta to generate a GFA, though the sequence will be a bit worse.