Skip to content
Snippets Groups Projects
Commit c40a1f72 authored by Glenn Proctor's avatar Glenn Proctor
Browse files

Added parsing of linkage type and label for GO dependent xrefs obtained from SwissProt files.

parent 1df93c82
No related branches found
No related tags found
No related merge requests found
......@@ -146,13 +146,19 @@ sub create_xrefs {
my @dep_lines = split /\n/, $deps;
foreach my $dep (@dep_lines) {
if ($dep =~ /^DR\s+(.+)/) {
my ($source, $acc, @dummy) = split /;\s*/, $1;
my ($source, $acc, @extra) = split /;\s*/, $1;
if (exists $dependent_sources{$source}) {
# create dependent xref structure & store it
my %dep;
$dep{SOURCE_NAME} = $source;
$dep{SOURCE_ID} = $dependent_sources{$source};
$dep{ACCESSION} = $acc;
# some xref types have additional information
if ($source =~ /GO/) {
my ($go_linkage_type) = $extra[1] =~ /(\w+)/;
$dep{LINKAGE_ANNOTATION} = $go_linkage_type;
$dep{LABEL} = $extra[0];
}
push @{$xref->{DEPENDENT_XREFS}}, \%dep; # array of hashrefs
}
}
......
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