Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dealing with multiple taxids by taking first one (iss#54) #55

Merged
merged 1 commit into from
Feb 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Rfam/Lib/Bio/Rfam/Utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2628,7 +2628,7 @@ sub genbank_fetch_seq_info {
}
$info_HHR->{$accver}{"length"} = $length;

# for taxid and mol_type, we have to fetch from Quailifier_values, and may have more than 1
# for taxid and mol_type, we have to fetch from Qualifier_values, and may have more than 1
# in that case, they will be concatenated together
my $taxid_val = $gbseq->findvalue('./GBSeq_feature-table/GBFeature/GBFeature_quals/GBQualifier/GBQualifier_value[starts-with(text(), "taxon:")]');
my $taxid = undef;
Expand All @@ -2643,7 +2643,11 @@ sub genbank_fetch_seq_info {
$taxid = $cur_taxid;
}
elsif($cur_taxid != $taxid) {
croak "ERROR in $sub_name for $accver, > 1 taxids read: $taxid and $cur_taxid\nFull taxon values read: $orig_taxid_val\n";
; # do nothing, see comment below
# Change Jan 29, 2021: if multiple taxids are returned for a single accession,
# always use the first one and don't complain. Previously we would fail here
# with following croak:
#croak "ERROR in $sub_name for $accver, > 1 taxids read: $taxid and $cur_taxid\nFull taxon values read: $orig_taxid_val\n";
}
$taxid_val =~ s/^taxon\:(\d+)//;
}
Expand Down