# What tools can I use for a bacterial core/pan genome pipeline?

I want to perform a genome comparison on a group of isolates. I want to look into two broad groups of taxa and compare the accessory genome in each group. I have been using prokka (v1.12) and roary (v3.8.2) to do this but it appears the accessory_binary_genes.fa file is actually an untrue representation.

Note: gene_presence_absence.Rtab does contain all the full presence/ absence for accessory gene sets. Despite this Im still unhappy with the nomenclature of the gene groups [issue for another day]

[github issue 335] Your best to ignore the accessory_binary_genes.fa file. It is just for creating a quick and dirty tree with FastTree. The file itself is filtered to remove very common and not common variation to speedup the tree generation, hence the difference in numbers.

The top 5% and bottom 5% are excluded. It is truncated at 4000 genes.

I've been looking into alternative pipelines and a new software BPGA looks promising. Does anyone have experience with this?

I essentially want a tool which will give me the core and accessory gene sets, without the noise from partial gene hits.

• You could use OrthoMCL which is an older and less easier to use implementation of the same workflow. I believe that will give you all the gene names back rather than truncating anything. – Joe Healey Jul 16 '17 at 12:58
• You can still use roary and use the information contained in the gene_presence_absence.csv file, which is complete and contains the gene IDs for each orthologous group – mgalardini Jul 26 '17 at 10:28

LS-BSR should be able to give you what you're looking for. See the article.

After you run the primary analysis, there is a simple documented workflow for splitting the pangenome into core and accessory, based on a user defined threshold. I'm the developer, so can help if you run into any problems.

• Hi Jason, Thanks for the answer. Isnt LS-BSR meant to be less sensitive than roary? Also could you provide a link/ source for the workflow you mention. Thanks. – AudileF Jul 18 '17 at 8:02
• Also how does LS-BSR address genes broken due to contig borders? – AudileF Jul 18 '17 at 14:11
• This will obviously cause problems. The truncated gene will appear to be divergent or missing depending on where it is broken. One way that we address this problem is to map the raw data back against the pan-genome and determine if the region is truly missing or not, although this is not part of the LS-BSR package – Jason Sahl Jul 18 '17 at 18:37
• I think these are really important insights that you should integrate to your answer by editing it. Also, do not hesitate to use hyperlinks to your scripts, but try to give a complete answer, so next time somebody will have similar pan genome problem, he will understand what to do now. – Kamil S Jaron Jul 19 '17 at 8:58

Roary also takes into account paralogs, so sometimes two core genes are split into different groups based on their neighbour genes and they end up with different nomenclature (group_*...). As suggested by Andrew Page in the github issue I would consider the gene_presence_absence.Rtab (this contains all the orthologous genes) and remove rows corresponding to vectors only containing 1s (core genes). In this way you will have a matrix of 1 and 0 corresponding to presence/absence of a particular accessory gene in your isolates.

• Hi Sergio, yes this correct but my main concern is with gene names. If a gene is broken/ split between contigs it could end up labeled as e.g. Gene_1 and Gene_2 this would then be a mis representation of the genetic content. its partially an issue with prokka too Id imagine. – AudileF Jul 17 '17 at 12:18
• You are right, contigs border can lead to a false representation of the gene content. – Sergio Arredondo Jul 17 '17 at 12:30
• Apparently there could be a new software to address these issue coming soon github.com/tseemann/prokka/issues/244 – AudileF Jul 21 '17 at 13:10