Skip to content

Commit

Permalink
Merge branch 'dev/hive_master' into hotfix/update_sheet_and_registry_…
Browse files Browse the repository at this point in the history
…db_with_genebuild_status
  • Loading branch information
ndliberial authored May 12, 2021
2 parents 987de69 + 3fd19b6 commit 26f4b10
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ sub run {
$self->throw("Could not open file $filename\n");
}
}
else {
$self->throw("File '$filename' does not start with a fasta header '>' but website said ".$response->status_line);
elsif ($response->content() eq ""){
$self->warning("File '$filename' contains no sequence");
}
else{
}

if ($filename =~ s/\.gz$//) {
Expand Down
11 changes: 7 additions & 4 deletions scripts/genebuild/create_annotation_configs.pl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
use Cwd qw(realpath chdir getcwd);
use Data::Dumper;
use DateTime;

use JSON;

my $config_file;
Expand Down Expand Up @@ -74,7 +73,7 @@
$selected_db = "test_registry_db";
$general_hash->{'replace_repbase_with_red_to_mask'} = '1';
} else {
$selected_db = "gb_assembly_registry";
$selected_db = "do1_automated_registry";#"gb_assembly_registry";
}

my $taxonomy_adaptor = new Bio::EnsEMBL::Taxonomy::DBSQL::TaxonomyDBAdaptor(
Expand Down Expand Up @@ -104,6 +103,10 @@
# for this
if($key eq 'user_w') {
$key = 'user';
$general_hash->{$key} = $value;
}
if($key eq 'password') {
$general_hash->{$key} = $value;
}
#Ignore clade settings from .ini file if set
if($key eq 'clade' && !$custom_load && !$early_load) {
Expand All @@ -121,7 +124,7 @@
}
close IN || throw("Could not close $config_file");

my $assembly_registry = new Bio::EnsEMBL::Analysis::Hive::DBSQL::AssemblyRegistryAdaptor(
my $assembly_registry = new Bio::EnsEMBL::Analysis::Hive::DBSQL::AssemblyRegistryAdaptor(
-host => $assembly_registry_host,
-port => $assembly_registry_port,
-user => $general_hash->{'user'},
Expand Down Expand Up @@ -802,7 +805,7 @@ sub init_pipeline {
throw("Failed to run init_pipeline for ".$assembly_hash->{'species_name'}."\nCommandline used:\n".$cmd);
}
update_annotation_status($assembly_hash->{'assembly_accession'});

my $sync_command = $&;
if ($hive_directory) {
$sync_command = 'perl '.catdir($hive_directory, 'scripts').catfile('','').$sync_command; # The crazy catfile in the middle is to get the path separator
Expand Down
4 changes: 4 additions & 0 deletions scripts/genebuild/update_assembly_registry_sheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,13 @@ def update_assembly_sheet(assembly_db_data,meta_db_data,existing_sheet_records,a
sheet_genebuilder_val = sheet_row[sheet_genebuilder_index]
sheet_assembly_group_index = assembly_sheet_columns.index('Assembly group')
sheet_assembly_group_val = sheet_row[sheet_assembly_group_index]

# Check if transcriptomic data status from db is null. If yes, check if assembly has been handed over or if assembly meets candidate assembly criteria
if ((rnaseq_data is None) and (sheet_rnaseq_data_val == 'Non candidate assembly' or sheet_rnaseq_data_val == 'No RNAseq data')):
# Nothing to update
print("No update on rnaseq data status for: " + gca)
elif ((rnaseq_data is None) and (annotation_status == 'Handed over')): #It is possible to annotate a species and handover without RNASeq data

# update the RNASeq data status
rnaseq_data = 'Done'
print("Updating rnaseq data status for: " + gca)
Expand Down Expand Up @@ -300,8 +302,10 @@ def update_assembly_sheet(assembly_db_data,meta_db_data,existing_sheet_records,a
genebuilder = 'Not assigned'

if sheet_assembly_group_val is None:

# Add/update the assembly group
print("This assembly has no group assigned to it on the sheet: " + gca)

if assembly_group == 'dtol':
assembly_group = 'DToL'
elif assembly_group == 'ungrouped':
Expand Down

0 comments on commit 26f4b10

Please sign in to comment.