Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 31 additions and 4 deletions.
  1. +4 −1 PerlLib/Thread_helper.pm
  2. +25 −2 scripts/cDNA_annotation_comparer.dbi
  3. +2 −1 scripts/create_mysql_cdnaassembly_db.dbi
View
@@ -202,7 +202,10 @@ sub wait_for_all_threads_to_complete {
$self->_add_error_thread($thread);
$status = "ERROR";
}
- $self->report_thread_info($thread_id, $status);
+ $self->{thread_id_timing}->{end}->{$thread_id} = time();
+ if ($THREAD_MONITORING) {
+ $self->report_thread_info($thread_id, $status);
+ }
}
@{$self->{current_threads}} = (); # clear them out.
@@ -34,6 +34,9 @@ use vars qw ($opt_h $opt_p $DEBUG $opt_M $opt_G $MIN_PERCENT_OVERLAP $MIN_PERCEN
$STOMP_HIGH_PERCENTAGE_OVERLAPPING_GENE $MIN_PERCENT_ALIGN_LENGTH
$MIN_PERCENT_LENGTH_FL_COMPARE $TRUST_FL_STATUS $CLUSTER_ID_ONLY);
+
+my $RESTRICT_SINGLE_CONTIG = undef;
+
my $CPU = 2;
&GetOptions ('M=s' => \$opt_M,
@@ -62,6 +65,8 @@ my $CPU = 2;
## hidden opts for debugging purposes
'CLUSTER_ID_ONLY=i' => \$CLUSTER_ID_ONLY, # the only cluster ID to process.
+ 'RESTRICT_SINGLE_CONTIG=s' => \$RESTRICT_SINGLE_CONTIG,
+
);
@@ -140,6 +145,12 @@ _EOH_
;
+### Hidden options
+###
+## --RESTRICT_SINGLE_CONTIG <string> genomic contig to restrict analysis to
+###
+
+
if ($opt_h) {die $usage;}
@@ -291,7 +302,9 @@ main: {
print "### There are $num_contigs genomic contigs which will be examined.\n";
foreach my $result (@results) {
my $asmbl_id = $result->[0];
-
+
+ if ($RESTRICT_SINGLE_CONTIG && $asmbl_id ne $RESTRICT_SINGLE_CONTIG) { next; }
+
$thread_helper->wait_for_open_thread();
my $thread = threads->create('process_contig', $asmbl_id);
@@ -308,7 +321,17 @@ main: {
if (@failures) {
## examine them... these are the same threads created above, use use the threads api to access info about them
## such as error messages
- die "Error, there were " . scalar(@failures) . " threads (contig jobs) that failed... See error messages above in order to troubleshoot further";
+
+ print STDERR "Error, there were " . scalar(@failures) . " threads (contig jobs) that failed... See error messages above in order to troubleshoot further";
+
+ foreach my $failed_thread (@failures) {
+ my $thread_id = $failed_thread->tid;
+ print STDERR "Failed thread ($thread_id) info:\n";
+ $thread_helper->report_thread_info($thread_id, "FAILED");
+ }
+
+ exit(1);
+
}
else {
## all good!
@@ -14,7 +14,7 @@ use ConfigFileReader;
use vars qw ($opt_c $opt_p $opt_d $opt_h $opt_S $opt_r);
-&getopts ('c:p:S:r');
+&getopts ('c:p:S:rd');
$|=1;
@@ -88,6 +88,7 @@ if (index($mysql_server, "mysql_socket") != -1) {
## Populate the database structure and static data.
my $cmd = "$mysql_exec $mysql_options -D$mysql_db -e 'source $schemafile'";
+print STDERR "CMD: $cmd\n" if $DEBUG;
my $result = system ($cmd);
die "CMD: $cmd failed.\n" if $result;

No commit comments for this range