Skip to content

Instantly share code, notes, and snippets.

View avrilcoghlan's full-sized avatar

Avril Coghlan avrilcoghlan

View GitHub Profile
@avrilcoghlan
avrilcoghlan / format_blastp_output_for_chembl.py
Created March 4, 2022 10:54
Parse BLAST output against ChEMBL, to have the top hits for each query protein
import os
import sys
from collections import defaultdict
import FiftyHG_Chembl
#====================================================================#
def main():
# find the blast output files:
@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 / retrieve_predictedtarget_info_from_chembl_for_compoundlist.py
Created June 27, 2019 09:34
Script to retrieve predicted targets from ChEMBL for an input list of ChEMBL compounds
import os
import sys
import pandas as pd # uses pandas python module to view and analyse data
import requests # this is used to access json files
#====================================================================#
# call the 'target prediction' API to find the predicted targets of our list of compounds:
def find_predicted_targets_of_compounds(cmpd_chembl_ids):
@avrilcoghlan
avrilcoghlan / Find_compounds_for_NTD_targets_and_filter_those_compounds.ipynb
Created May 29, 2019 09:56
Python notebook to query ChEMBL, to retrieve compounds with bioactivities for certain targets, and obtain properties of those compounds
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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 / 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 / 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 / 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 / retrieve_phenotypeinfo_from_wormbase_for_genelist.py
Created June 28, 2019 10:50
Script to use the WormBase REST API to retrieve phenotypes (from RNAi, mutants) for an input list of C.elegans genes
import os
import sys
import requests # this is used to access json files
#====================================================================#
# use the wormbase REST API to retrieve the phenotypes (from mutants, RNAi) for a particular gene:
def retrieve_phenotypes_from_wormbase(gene):