<p><a href="https://github.com/jasonsahl/LS-BSR" rel="nofollow noreferrer">LS-BSR</a> should be able to give you what you're looking for. See the <a href="https://peerj.com/articles/332/" rel="nofollow noreferrer">article</a>.</p>

<p>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.</p>

CC BY-SA 3.0
2017-07-18T08:02:50.263Z
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
CC BY-SA 3.0
2017-07-18T14:11:59.447Z
Also how does LS-BSR address genes broken due to contig borders?
AudileF
CC BY-SA 3.0
2017-07-18T18:37:57.470Z
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
CC BY-SA 3.0
2017-07-19T08:58:47.993Z
I think these are really important insights that you should integrate to your answer by [edit]ing 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
CC BY-SA 3.0
2017-07-17T14:19:35.680Z
2017-11-27T15:50:38.583Z
2017-11-27T15:50:38.583Z
Jason Sahl
<p>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. </p>

CC BY-SA 3.0
2017-07-17T12:18:31.277Z
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
CC BY-SA 3.0
2017-07-17T12:30:54.313Z
You are right, contigs border can lead to a false representation of the gene content.
Sergio Arredondo
CC BY-SA 3.0
2017-07-21T13:10:55.093Z
Apparently there could be a new software to address these issue coming soon https://github.com/tseemann/prokka/issues/244
AudileF
CC BY-SA 3.0
2017-07-17T11:21:39.053Z
2017-07-17T11:21:39.053Z
Sergio Arredondo
<p>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.</p>

<p><strong>Note:</strong> 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] </p>

<blockquote>
  <p><a href="https://github.com/sanger-pathogens/Roary/issues/335" rel="nofollow noreferrer">[github issue 335]</a> 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.</p>
  
  <p>The top 5% and bottom 5% are excluded. It is truncated at 4000 genes.</p>
</blockquote>

<p>I've been looking into alternative pipelines and a new software <a href="https://www.nature.com/articles/srep24373" rel="nofollow noreferrer">BPGA</a> looks promising. Does anyone have experience with this?</p>

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

CC BY-SA 3.0
2017-07-16T12:58:10.997Z
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
CC BY-SA 3.0
2017-07-26T10:28:43.297Z
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
<genome><software-recommendation>
What tools can I use for a bacterial core/pan genome pipeline?
# What tools can I use for a bacterial core/pan genome pipeline?

(Asked by: username_0 on 2017-07-14)

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]](https://github.com/sanger-pathogens/Roary/issues/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](https://www.nature.com/articles/srep24373) 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.

**Tags:** genome, software-recommendation
> **Comments:**
> **username_1**: 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.  
> **username_2**: 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  

---

## 2 answers

### Answer by username_3 on 2017-07-17. Score: 3

[LS-BSR](https://github.com/jasonsahl/LS-BSR) should be able to give you what you're looking for. See the [article](https://peerj.com/articles/332/).

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.

> **Comments:**
> **username_0**: 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.  
> **username_0**: Also how does LS-BSR address genes broken due to contig borders?  
> **username_3**: 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  
> **username_4**: I think these are really important insights that you should integrate to your answer by [edit]ing 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.  

---

### Answer by username_5 on 2017-07-17. Score: 2

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.

> **Comments:**
> **username_0**: 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.  
> **username_5**: You are right, contigs border can lead to a false representation of the gene content.  
> **username_0**: Apparently there could be a new software to address these issue coming soon https://github.com/tseemann/prokka/issues/244  

---

