From e9edededd560f59ad6e388447443d77a8eb2f20a Mon Sep 17 00:00:00 2001
From: Ian Longden <ianl@sanger.ac.uk>
Date: Thu, 14 Jul 2011 14:46:22 +0000
Subject: [PATCH] set type to DIRECT for the direct xrefs

---
 .../xref_mapping/XrefParser/FlybaseParser.pm   | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/misc-scripts/xref_mapping/XrefParser/FlybaseParser.pm b/misc-scripts/xref_mapping/XrefParser/FlybaseParser.pm
index 1c8872b5b7..afb6033b2a 100644
--- a/misc-scripts/xref_mapping/XrefParser/FlybaseParser.pm
+++ b/misc-scripts/xref_mapping/XrefParser/FlybaseParser.pm
@@ -122,8 +122,7 @@ sub get_source_id_for_source_name {
 }
 
 sub run {
-  my $self = shift if (defined(caller(1)));
-
+  my $self = shift;
   my $source_id = shift;
   my $species_id = shift;
   my $files       = shift;
@@ -132,9 +131,6 @@ sub run {
 
   my $data_file = @{$files}[0];
 
-#  my $self = shift;
-#  my ( $source_id, $species_id, $data_file, $release_file ) = @_;
-
   # Fetch hashes of already stored Uniprot and Interpro accessions.
   my %pre_xref_ids = (
         'Uniprot'  => $self->get_valid_codes( 'uniprot',  $species_id ),
@@ -255,11 +251,11 @@ sub run {
               if ( $dbxref_name eq 'bdgpinsituexpr' ) {
                 $xref_id =
                   $self->add_xref( $id, undef, $accession, '',
-                                   $source_id, $species_id );
+                                   $source_id, $species_id, 'DIRECT' );
               } else {
                 $xref_id =
                   $self->add_xref( $accession, undef, $accession, '',
-                                   $source_id, $species_id );
+                                   $source_id, $species_id, 'DIRECT' );
               }
               $xref_ids{$source_name}{$accession} = $xref_id;
             }
@@ -286,7 +282,7 @@ sub run {
         } else {
           $xref_id =
             $self->add_xref( $accession, undef, $accession, '',
-                             $source_id, $species_id );
+                             $source_id, $species_id ,'DIRECT');
           $xref_ids{$source_name}{$accession} = $xref_id;
         }
 
@@ -311,7 +307,7 @@ sub run {
         } else {
           $xref_id =
             $self->add_xref( $accession, undef, $accession, '',
-                             $source_id, $species_id );
+                             $source_id, $species_id, 'DIRECT' );
           $xref_ids{$source_name}{$accession} = $xref_id;
         }
 
@@ -337,7 +333,7 @@ sub run {
       } else {
         $xref_id =
           $self->add_xref( $id, undef, $accession, '', $source_id,
-                           $species_id );
+                           $species_id, 'DIRECT' );
         $xref_ids{$source_name}{$accession} = $xref_id;
       }
 
@@ -360,7 +356,7 @@ sub run {
       } else {
         $xref_id =
           $self->add_xref( $accession, undef, $accession, '',
-                           $source_id, $species_id );
+                           $source_id, $species_id, 'DIRECT' );
         $xref_ids{$source_name}{$accession} = $xref_id;
       }
 
-- 
GitLab