Skip to content

Instantly share code, notes, and snippets.

View avrilcoghlan's full-sized avatar

Avril Coghlan avrilcoghlan

View GitHub Profile
@avrilcoghlan
avrilcoghlan / find_best_nonoverlapping_genes.pl
Created August 27, 2013 14:25
Perl script that finds the set of highest-scoring non-overlapping genes in a gff file.
#!/usr/bin/env perl
=head1 NAME
find_best_nonoverlapping_genes.pl
=head1 SYNOPSIS
find_best_nonoverlapping_genes.pl input_gff path_to_bedtools output_gff outputdir min_gene_score from_maker subtract_from
where input_gff is the input GeneWise gff file,
@avrilcoghlan
avrilcoghlan / remove_tiny_genes_from_gff.pl
Created August 27, 2013 14:23
Perl script that removes genes that encode proteins that are shorter than a minimum length, from a gff file.
#!/usr/bin/env perl
=head1 NAME
remove_tiny_genes_from_gff.pl
=head1 SYNOPSIS
remove_tiny_genes_from_gff.pl input_gff output_gff min_length outputdir assembly
where input_gff is the input gff file,
@avrilcoghlan
avrilcoghlan / rename_genes_in_maker_gff.pl
Created August 27, 2013 14:22
Perl script that renames genes in the maker gff files so that they have unique names.
#!/usr/bin/env perl
=head1 NAME
rename_genes_in_maker_gff.pl
=head1 SYNOPSIS
rename_genes_in_maker_gff.pl input_gff output_gff outputdir species
where input_gff is the input gff file,
@avrilcoghlan
avrilcoghlan / remove_modelgff_genes_from_gff.pl
Created August 27, 2013 14:12
Perl script that removes genes that are only supported by 'model_gff' features from a maker gff file.
#!/usr/bin/env perl
=head1 NAME
remove_modelgff_genes_from_gff.pl
=head1 SYNOPSIS
remove_modelgff_genes_from_gff.pl input_gff output_gff outputdir
where input_gff is the input gff file,
@avrilcoghlan
avrilcoghlan / haemophilus1.py
Last active October 22, 2020 01:43
Python module to carry out simple bioinformatics analyses
import os
import sys
from Bio import Entrez
from Bio import SeqIO
import matplotlib.pyplot as plt
#====================================================================#
# Checked and seems to work fine.
# Takes the GenBank accession number (GI number) as input.
# First checks to see if the sequence has been stored locally as a file.
@avrilcoghlan
avrilcoghlan / make_exonerate_hints_for_augustus.pl
Created August 15, 2013 11:46
Perl script that, given an exonerate gff file, generates a hints file for augustus.
#!/usr/bin/env perl
=head1 NAME
make_exonerate_hints_for_augustus.pl
=head1 SYNOPSIS
make_exonerate_hints_for_augustus.pl input_gff hints_file type
where input_gff is the input exonerate gff file
@avrilcoghlan
avrilcoghlan / convert_exonerate_gff_to_std_gff.pl
Created August 15, 2013 11:16
Perl script that converts a gff file from exonerate to more standard gff format.
#!/usr/bin/env perl
=head1 NAME
convert_exonerate_gff_to_std_gff.pl
=head1 SYNOPSIS
convert_exonerate_gff_to_std_gff.pl input_gff output_gff
where input_gff is the input exonerate gff file,
@avrilcoghlan
avrilcoghlan / run_exonerate_after_blast.pl
Created August 15, 2013 11:13
Perl script to run exonerate using input proteins/ESTs, in scaffold regions that have blast matches to those proteins/ESTs.
#!/usr/bin/env perl
=head1 NAME
run_exonerate_afterblast.pl
=head1 SYNOPSIS
run_exonerate_afterblast.pl input_fasta input_pep output outputdir eval_cutoff flank_length blast_path type
where input_fasta is the input fasta file of scaffolds in the assembly,
@avrilcoghlan
avrilcoghlan / AvrilGffUtils.pm
Created August 15, 2013 11:10
AvrilGffUtils.pm
package HelminthGenomeAnalysis::AvrilGffUtils;
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( read_gene_ids replace_gene_ids_in_gff get_gff_lines_for_feature_types add_flanking_region_to_gff_features make_fasta_for_gff make_gff_for_features_in_subsequences read_genenames_for_transcripts get_gene_name add_gene_features_to_gff_for_subsequences make_gff_for_features_in_sequences sort_gff merge_overlapping_cds sort_gff_lines_for_genes count_features_in_region convert_exonerate_gff_to_standard_gff );
@avrilcoghlan
avrilcoghlan / AvrilAlignUtils.pm
Created August 15, 2013 11:07
AvrilAlignUtils.pm
package HelminthGenomeAnalysis::AvrilAlignUtils;
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);