I am learning to use Roary for preparing a pan genome for some lactobacillus strains. In the 'gene_presence_absence.csv' output of Roary (which I view in excel), a 'source Gene ID' is given for each of the strains included in the analysis. The Roary web page states that this is:

  1. Presence and absence of genes in each sample, with the corresponding source Gene ID.

Is this 'source Gene ID' generated by Roary, or does it relate back directly to the .gff files I used as input? If I take one of these 'source Gene ID' references and Grep in the directory containing my .gff files I get no matches, so I am assuming it is generated by Roary...?

I had hoped that this reference would link back directly to the gene within the annotation file, but that seems not to be the case? Should/can I use this reference for anything?

  • $\begingroup$ Did you end up getting an answer to this question? I have the same question. $\endgroup$
    – Sharb
    Jun 23, 2021 at 23:50
  • $\begingroup$ @Sharb - I think i can now answer this question. I have added an answer. Let me know if you fee it needs any clarification? $\endgroup$
    – Mark
    Jun 28, 2021 at 19:37

1 Answer 1


Looking at this again, I have now worked out (and should probably have noticed previously) that the 'source Gene ID' field from the 'gene_presence_absence.csv' file originates from the ID field of the .gff file for the sequence in question.

You can therefore easily tie the results from the 'gene_presence_absence.csv' file back to the annotation from the sequence in question, and therefore to the location of the nucleotide sequence for the gene in question.

So for instance, if you take a 'source Gene ID' from the gene_presence_absence file - say GEICCBEJ_00950 - and use it in a grep command referencing the genome from which it came, grep "GEICCBEJ_00950" my_annotation_file.gff, then you should see the line from the annotation corresponding to this sequence.

The 'source Gene ID' is also referenced in the pan_genome_reference.fa output from ROARY, which gives "single representative nucleotide sequence from each of the clusters in the pan genome (core and accessory)".


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.