I have written a script that will get you started. It downloads all protein coding transcripts of the species of interest from Ensembl and prints the codon use for each codon on each transcript.
You will need to install the
Bio::EnsEMBL::Registry Perl module, see here for instructions. The script also uses the
Math::Round module, everything else should be installed by default with your Perl distribution. Finally, the script expects to be run from a Unix/Linux operating system.
ensembl_get_codon_count.pl human > human.csv
Gene Name Gene ID Transcript ID Ala_GCC Ala_GCC_% Ala_GCA Ala_GCA_% Ala_GCG Ala_GCG_% Ala_GCT Ala_GCT_%
CRLF2 ENSG00000205755 ENST00000400841 6 40 6 40 0 0 3 20
In the example above, the transcript ENST00000400841 of the human CRLF2 gene, contains a total of 15 Alanine residues, 6 of which are coded for by the GCC codon (40%), 6 by the GCA codon (40%) and 3 by the GCT codon (20%). The GCG codon is not used (0%).
This is a cut version of the output, the actual output lines are much longer since they include all codons and there will be one line per protein coding transcript.
This script should at least get you started since it will provide you with the raw data needed to perform your statistical analyses. If you use it in published work, I would appreciate it if you could let me know (my email is included in the script) and perhaps mention me in the acknowledgements :).