This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
from xml.etree import ElementTree as ET | |
import AvrilFileUtils | |
class Error (Exception): pass | |
#====================================================================# | |
# define a function to merge optical map xml files for different scaffolds. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
from collections import defaultdict | |
class Error (Exception): pass | |
#====================================================================# | |
# define a function to read in the ancestors of each GO term in the GO hierarchy: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
from collections import defaultdict | |
from scipy.sparse import lil_matrix # needed for Dijkstra's algorithm | |
from scipy.sparse.csgraph import dijkstra # needed for Dijkstra's algorithm | |
class Error (Exception): pass | |
#====================================================================# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def DFS_dist_from_node(query_node, parents): | |
"""Return dictionary containing distances of parent GO nodes from the query""" | |
result = {} | |
stack = [] | |
stack.append( (query_node, 0) ) | |
while len(stack) > 0: | |
print("stack=", stack) | |
node, dist = stack.pop() | |
result[node] = dist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package HelminthGenomeAnalysis::AvrilHMMUtils; | |
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
=head1 NAME | |
parse_hmmpfam_output.pl | |
=head1 SYNOPSIS | |
parse_hmmpfam_output.pl hmmpfam protein_fasta evalue_cutoff total_num_hmms cegma_dir | |
where hmmpfam is the hmmpfam output file, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Count the number of “one2one” orthologues between human and mouse | |
# Note: this script gives a warning about some variable declaration within the Compara API. | |
use strict; | |
use warnings; | |
use Bio::EnsEMBL::Registry; | |
my $registry = 'Bio::EnsEMBL::Registry'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Get all the homologues for the human gene ENSG00000229314 | |
# Note: get a warning about a variable declaration in the Compara API when this script is run. | |
use strict; | |
use warnings; | |
use Bio::EnsEMBL::Registry; | |
my $registry = 'Bio::EnsEMBL::Registry'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Print all the members of the tree containing the human ncRNA gene ENSG00000238344 | |
use strict; | |
use warnings; | |
use Bio::EnsEMBL::Registry; | |
my $registry = 'Bio::EnsEMBL::Registry'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Print the protein tree with the stable id ENSGT00390000003602 | |
use strict; | |
use warnings; | |
use Bio::EnsEMBL::Registry; | |
my $registry = 'Bio::EnsEMBL::Registry'; |