Skip to content

Commit f774fef

Browse files
committed
Use versioned accessions for sorted maps
Fix krakenhll-download to use versioned accession ids during sorted taxid map creation because there's no stripping of accession versions in the classifier.
1 parent 8dc7ea9 commit f774fef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/krakenhll-download

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ sub download_ncbi_search(@) {
594594
} else { #genbank
595595
$nbr_ac =~ s/^LOCUS\s*//;
596596
}
597-
$nbr_ac =~ s/[. ].*//;
597+
$nbr_ac =~ s/[ ].*//;
598598

599599
my $taxid;
600600
foreach (@sorted_map_file_handles) {
@@ -675,7 +675,7 @@ sub get_sorted_maps(@) {
675675
my $sorted_map_f = "$dir/$_.accession2taxid.sorted";
676676
if (!-s $sorted_map_f) {
677677
my $sort_cmd = system("sort --help | grep -q parallel") == 0? "sort --parallel $N_PROC" : "sort";
678-
system_l("Sorting maping file (will take some time)", "gunzip -c $dir/$_.accession2taxid.gz | cut -f $ac_col,$taxid_col > $sorted_map_f.tmp && $sort_cmd -T $dir $sorted_map_f.tmp > $sorted_map_f && rm $sorted_map_f.tmp");
678+
system_l("Sorting maping file (will take some time)", "gunzip -c $dir/$_.accession2taxid.gz | cut -f $ac_w_version_col,$taxid_col > $sorted_map_f.tmp && $sort_cmd -T $dir $sorted_map_f.tmp > $sorted_map_f && rm $sorted_map_f.tmp");
679679
}
680680
check_file("$dir/$_.accession2taxid.sorted");
681681
push @res, $sorted_map_f;

0 commit comments

Comments
 (0)