Skip to content

Instantly share code, notes, and snippets.

View avrilcoghlan's full-sized avatar

Avril Coghlan avrilcoghlan

View GitHub Profile
@avrilcoghlan
avrilcoghlan / AvrilFastaUtils.pm
Last active December 21, 2015 03:09
AvrilFastaUtils.pm
package HelminthGenomeAnalysis::AvrilFastaUtils;
use strict;
use warnings;
use Bio::Seq;
use Bio::SeqIO;
use Moose;
use Math::Round; # HAS THE nearest() FUNCTION
use Carp::Assert; # HAS THE assert() FUNCTION
use Scalar::Util qw(looks_like_number);
@avrilcoghlan
avrilcoghlan / AvrilFileUtils.pm
Created August 15, 2013 11:05
AvrilFileUtils.pm
package HelminthGenomeAnalysis::AvrilFileUtils;
use strict;
use warnings;
use Math::Round; # HAS THE nearest() FUNCTION
use Carp::Assert; # HAS THE assert() FUNCTION
use Scalar::Util qw(looks_like_number);
use base 'Exporter';
our @EXPORT_OK = qw( make_filename check_if_files_are_identical write_array_to_file );
@avrilcoghlan
avrilcoghlan / get_flanking_regions_of_genes.pl
Created July 3, 2013 12:44
Perl script that takes an input gff, and takes flank_size bp on either side of each gene, and write an output fasta and gff with respect to the output fasta.
#!/usr/bin/env perl
=head1 NAME
get_flanking_regions_of_genes.pl
=head1 SYNOPSIS
get_flanking_regions_of_genes.pl input_gff input_fasta output_gff output_fasta outputdir flank_size
where input_gff is the input gff file of gene predictions,
@avrilcoghlan
avrilcoghlan / gff_to_genbank.pl
Created April 15, 2013 08:52
Perl script to convert a gff file to genbank files for the scaffolds.
#!/usr/local/bin/perl
=head1 NAME
gff_to_genbank.pl
=head1 SYNOPSIS
gff_to_genbank.pl input_gff assembly outputdir
where input_gff is the input gff file,
@avrilcoghlan
avrilcoghlan / calc_pc_id_between_seqs.pl
Created April 4, 2013 14:50
Perl script to calculate (global) percent identity between each pair of protein sequences in a fasta file.
#!/usr/local/bin/perl
=head1 NAME
calc_pc_id_between_seqs.pl
=head1 SYNOPSIS
calc_pc_id_between_seqs.pl input_fasta output outputdir ggsearch
where input_fasta is the input fasta file of sequences,
@avrilcoghlan
avrilcoghlan / translate_spliced_dna.pl
Created April 4, 2013 14:48
Perl script that, given an input file of DNA sequences of transcripts, infers their translations.
#!/usr/local/bin/perl
=head1 NAME
translate_spliced_dna.pl
=head1 SYNOPSIS
translate_spliced_dna.pl spliced_dna translated_dna outputdir
where spliced_dna is the input fasta file of spliced DNA sequences for transcripts,
@avrilcoghlan
avrilcoghlan / ExampleInteractionData.txt
Last active December 14, 2015 10:39
Example protein-protein interaction data
YKL166C YIL033C
YCR002C YHR107C
YCR002C YJR076C
YCR002C YLR314C
YJR076C YHR107C
@avrilcoghlan
avrilcoghlan / treefam_infer_ancestral_GOids3.pl
Created March 1, 2013 16:54
Perl script that, given a file with GO annotations for sequences in TreeFam families, and a list of families, infers the GO annotations for ancestral nodes in the trees for those families.
#!/usr/local/bin/perl
#
# Perl script treefam_infer_ancestral_GOids3.pl
# Written by Avril Coghlan ([email protected])
# 3-May-07.
#
# For the TreeFam project.
#
# This perl script infers the GO ids of ancestral nodes
@avrilcoghlan
avrilcoghlan / treefam_infer_ancestral_GOids.pl
Created March 1, 2013 16:52
Perl script that, given a file with GO annotations for sequences in TreeFam families, and a list of families, infers the GO annotations for ancestral nodes in the trees for those families.
#!/usr/local/bin/perl
#
# Perl script treefam_infer_ancestral_GOids.pl
# Written by Avril Coghlan ([email protected])
# 2-Mar-07.
#
# For the TreeFam project.
#
# This perl script infers the GO ids of ancestral nodes
@avrilcoghlan
avrilcoghlan / treefam_infer_ancestral_features.pl
Created March 1, 2013 16:48
Perl script that, given a list of TreeFam families, and a file of features of the sequences in trees (eg. Pfam domains or GO terms), infers the likely features of the ancestral nodes in the trees for the families.
#!/usr/local/bin/perl
#
# Perl script treefam_infer_ancestral_features.pl
# Written by Avril Coghlan ([email protected])
# 30-May-07.
#
# This perl script infers the features of ancestral nodes
# in a list of TreeFam trees, given the features in the
# leaves.