HINGE icon indicating copy to clipboard operation
HINGE copied to clipboard

HINGE graph output

Open alimayy opened this issue 7 years ago • 3 comments

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

alimayy avatar Jul 20 '17 11:07 alimayy

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?

govinda-kamath avatar Jul 20 '17 12:07 govinda-kamath

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?

alimayy avatar Jul 20 '17 14:07 alimayy

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.

govinda-kamath avatar Jul 25 '17 05:07 govinda-kamath