Skip to content

Instantly share code, notes, and snippets.

@dbolser
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbolser/be5eff19d0e99a59de4c to your computer and use it in GitHub Desktop.
Save dbolser/be5eff19d0e99a59de4c to your computer and use it in GitHub Desktop.
diff --git a/modules/Bio/EnsEMBL/EGPipeline/Xref/UniProtLoader.pm b/modules/Bio/EnsEMBL/EGPipeline/Xref/UniProtLoader.pm
index ceec266..739fd31 100644
--- a/modules/Bio/EnsEMBL/EGPipeline/Xref/UniProtLoader.pm
+++ b/modules/Bio/EnsEMBL/EGPipeline/Xref/UniProtLoader.pm
@@ -196,6 +196,10 @@ sub add_uniprot_xrefs {
sub store_uniprot_xrefs {
my ( $self, $ddba, $tid, $uniprots, $gene_id, $gene_attribs ) = @_;
+
+ my $n = 0;
+ return $n if scalar(@$uniprots) == 0;
+
# remove existing uniprots for this translation first
$ddba->dbc()->sql_helper()->execute_update(
-SQL => q/
@@ -211,8 +215,6 @@ sub store_uniprot_xrefs {
/,
-PARAMS => [$tid] );
- my $n = 0;
- return $n if scalar(@$uniprots) == 0;
for my $uniprot (@$uniprots) {
if ( !$uniprot->{ac} || $uniprot->{ac} eq '' ) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment