Skip to content

Instantly share code, notes, and snippets.

View avrilcoghlan's full-sized avatar

Avril Coghlan avrilcoghlan

View GitHub Profile
@avrilcoghlan
avrilcoghlan / treefam_overlaps2.pl
Created March 1, 2013 13:26
Perl script to find genes that appear in more than one TreeFam-A seed tree
#!/usr/local/bin/perl
#
# Perl script treefam_overlaps2.pl
# Written by Avril Coghlan ([email protected]).
# 25-Aug-06.
#
# For the TreeFam project.
#
# This perl script connects to the MYSQL database of
@avrilcoghlan
avrilcoghlan / treefam_synteny3.pl
Created March 1, 2013 13:33
Perl script that retrieves orthologs for a particular pair of species from the TreeFam database, and checks whether the ortholog pair in the two species is flanked by left-hand and right-hand neighbours that are also orthologous
#!/usr/local/bin/perl
#
# Perl script treefam_synteny3.pl
# Written by Avril Coghlan ([email protected])
# 12-Sept-06.
#
# For the TreeFam project.
#
# This perl script reads in the positions of genes from the TreeFam
@avrilcoghlan
avrilcoghlan / find_closest_worm_paralogs3.pl
Created March 1, 2013 13:48
Perl script that, given a file of Caenorhabditis elegans paralog pairs, analyses TreeFam trees to find the pairs of C. elegans paralogs in families that are separated by the least number of edges
#!/usr/local/bin/perl
#
# Perl script find_closest_worm_paralogs3.pl
# Written by Avril Coghlan ([email protected])
# 7-Jan-09.
#
# This perl script finds the pairs of C. elegans paralogs in a family
# that are separated by the least number of edges.
@avrilcoghlan
avrilcoghlan / find_closest_worm_paralogs4.pl
Created March 1, 2013 13:52
Perl script that, given a file of Caenorhabditis elegans paralog pairs, finds the bootstrap value for the clade defined by the last common ancestor of the two paralogs.
#!/usr/local/bin/perl
#
#
# Perl script find_closest_worm_paralogs4.pl
# Written by Avril Coghlan ([email protected])
# 16-Feb-09.
#
# This perl script finds the bootstrap value for the
# clade containing a pair of C. elegans paralogs in a family (where
# there is no other gene in that clade, ie. they are each other's
@avrilcoghlan
avrilcoghlan / find_gene_pred_errors1.pl
Created March 1, 2013 13:56
Perl script that uses TreeFam to find cases where two adjacent genes in a species (eg. Caenorhabditis elegans) should probably be merged, as one of them has its best match to the first part of a TreeFam family alignment, and the second has its best match to the second part of the same TreeFam family's alignment.
#!/usr/local/bin/perl
#
# Perl script find_gene_pred_errors1.pl
# Written by Avril Coghlan ([email protected])
# 25-Feb-09.
#
# For the TreeFam project.
#
# This perl script finds cases where two adjacent genes in a species
@avrilcoghlan
avrilcoghlan / find_treefam_for_schisto_gene2.pl
Created March 1, 2013 14:00
Perl script that, given a list of Schistosoma mansoni genes, connects to the TreeFam database to find out which families they are in
#!/usr/local/bin/perl
#
# Perl script find_treefam_for_schisto_gene2.pl
# Written by Avril Coghlan ([email protected])
# 21-Mar-09.
#
# This perl script reads in a list of Schistosoma genes, and connects
# to the TreeFam mysql database to find out which family they are in.
#
@avrilcoghlan
avrilcoghlan / find_treefam_with_Ce_Bm.pl
Created March 1, 2013 14:03
Perl script that finds TreeFam families that have Caenorhabditis elegans and Brugia malayi genes, and prints out the number of genes from each species in the trees for each of those families
#!/usr/local/bin/perl
#
# Perl script find_treefam_with_Ce_Bm.pl
# Written by Avril Coghlan ([email protected])
# 17-Apr-09
#
# This perl script finds TreeFam families that have Ce and Bm genes, and prints out
# how many genes are in the tree.
#
@avrilcoghlan
avrilcoghlan / get_chroms_from_treefam.pl
Created March 1, 2013 14:07
Perl script that reads in a list of 2-C.elegans-to-1-C.briggsae orthologs, and finds cases where the two Caenorhabditis elegans genes are on different chromosomes, with one on an autosome and one X-linked.
#!/usr/local/bin/perl
#
# Perl script get_chroms_from_treefam.pl
# Written by Avril Coghlan ([email protected])
# 9-Sep-09.
#
# THis perl script reads in a list of 2Ce-to-1Cb orthologs and
# finds cases where the 2 Ce genes are on different chromosomes,
# with one on an autosome and one X-linked.
@avrilcoghlan
avrilcoghlan / get_orthologs8.pl
Created March 1, 2013 14:10
Perl script that retrieves all TreeFam trees, and infers orthologs between a pair of species based on the tree, by finding cases where the last common ancestor node of two genes from different species is a speciation node
#!/usr/local/bin/perl
#
# Perl script get_orthologs7.pl
# Written by Avril Coghlan ([email protected])
# 29-May-08.
# Edited 15-Jul-08.
#
# This perl script reads in all trees in TreeFam and finds all
# orthologs between two input species. This parses tree data rather
@avrilcoghlan
avrilcoghlan / get_singletons.pl
Created March 1, 2013 14:16
Perl script that identifies singleton genes in a species, by finding genes from that species that appear in TreeFam families that do not have any other genes from that species
#! /usr/bin/perl
# Avril Coghlan
# 24-Feb-09
# Perl script to identify singleton genes in a species, defined by genes
# that do not appear in a TreeFam family with any gene from the same species.
use DBI;
use lib "/home/bcri/acoghlan/perlmodulesAvril/"; # edit to point to the TreeFam perl api xxx
use Treefam::DBConnection;