Skip to content
Snippets Groups Projects
Commit 0dfcf9d9 authored by Kieron Taylor's avatar Kieron Taylor :angry:
Browse files

First pass at summary stats.

parent 4189b37d
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,10 @@ Required arguments:
--altdbname=NAME alternative database NAME
--altassembly=ASSEMBLY alternative assembly version ASSEMBLY
--nolog outside of a webserver environment,
logging needs to be handled manually.
Use in conjunction with shell redirects.
Optional arguments:
--althost=HOST alternative databases host HOST
......@@ -63,10 +67,6 @@ for the details.
This code is distributed under an Apache style licence:
Please see http://www.ensembl.org/code_licence.html for details
=head1 AUTHOR
Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team
=head1 CONTACT
Please post comments/questions to the Ensembl development list
......@@ -91,6 +91,8 @@ use Getopt::Long;
use Pod::Usage;
use Bio::EnsEMBL::Utils::ConversionSupport;
use Algorithm::Diff qw(diff);
$| = 1;
my $support = new Bio::EnsEMBL::Utils::ConversionSupport($SERVERROOT);
......@@ -150,6 +152,8 @@ my $A_sa = $A_dba->get_SliceAdaptor;
$support->log("Looping over toplevel seq_regions...\n\n");
my @global_diff_bins;
foreach my $chr ($support->sort_chromosomes) {
$support->log_stamped("Toplevel seq_region $chr...\n", 1);
......@@ -207,6 +211,11 @@ foreach my $chr ($support->sort_chromosomes) {
$support->log("Alt: $A_sub_seq\n\n", 3);
$i++;
my @Ref = split(//,$R_seq);
my @Alt = split(//,$A_seq);
my @diffs = diff( \@Ref, \@Alt );
$global_diff_bins[scalar(@diffs)]++;
}
$k++;
......@@ -221,6 +230,14 @@ foreach my $chr ($support->sort_chromosomes) {
$support->log_stamped("Done.\n\n", 1);
}
$support->log("Summary of changes across all chromosomes\n\n",1);
$support->log("|Bin |Frequency\n",2);
for (my $bin = 0; $bin < scalar(@global_diff_bins); $bin++) {
if (defined ($global_diff_bins[$bin])) {
$support->log("|$bin |$global_diff_bins[$bin]\n");
}
}
# finish logfile
$support->finish_log;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment