Reorienting with Dnaapler - rrwick/Autocycler GitHub Wiki

Dnaapler is a tool for reorienting complete microbial genome assemblies so that each sequence starts at a consistent location – commonly at a gene like dnaA or repA. You can run Dnaapler on an Autocycler consensus assembly to reorient its sequences prior to downstream steps like annotation or submission.

As of v1.2.0, Dnaapler supports GFA input. When run on a GFA file, it uses the graph structure to detect circular sequences and only reorients those. This avoids the problem of mistakenly reorienting a linear sequence as if it were circular, which can happen with FASTA input. Because of this, it is recommended to run Dnaapler on Autocycler GFA files, not FASTA files. When Dnaapler is run with a GFA input, it will produce a GFA output. You can then use Autocycler gfa2fasta to convert the reoriented assembly to FASTA format, if needed.

Example workflow:

# previous Autocycler commands...

# Combine resolved clusters into a GFA-format consensus assembly
autocycler combine -a autocycler_out -i autocycler_out/clustering/qc_pass/cluster_*/5_final.gfa

# Reorient circular sequences with Dnaapler
dnaapler all -i autocycler_out/consensus_assembly.gfa -o dnaapler -t 8

# Convert the reoriented GFA back to FASTA
autocycler gfa2fasta -i dnaapler/dnaapler_reoriented.gfa -o final_assembly.fasta