From 26c3254373bbd0cb84ab6379a8d4d565e7034d35 Mon Sep 17 00:00:00 2001 From: Chris Fields Date: Tue, 26 Jan 2016 22:53:26 -0600 Subject: [PATCH] don't enforce strict line length for FASTA, it's good practice but not canonical and breaks things --- Bio/DB/Fasta.pm | 8 +++++--- Bio/DB/IndexedBase.pm | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Bio/DB/Fasta.pm b/Bio/DB/Fasta.pm index cb62f5b48..79d0413a3 100644 --- a/Bio/DB/Fasta.pm +++ b/Bio/DB/Fasta.pm @@ -171,8 +171,11 @@ sub _calculate_offsets { if ($line =~ /^>(\S+)/) { print STDERR "Indexed $count sequences...\n" if $self->{debug} && (++$count%1000) == 0; - - $self->_check_linelength($linelen); + + # please, do not enforce arbitrary line length requirements. + # It's good practice but not enforced. + + #$self->_check_linelength($linelen); my $pos = tell($fh); if (@ids) { my $strlen = $pos - $offset - length($line); @@ -451,5 +454,4 @@ sub description { } *desc = \&description; - 1; diff --git a/Bio/DB/IndexedBase.pm b/Bio/DB/IndexedBase.pm index b8334e4ba..f054003a4 100644 --- a/Bio/DB/IndexedBase.pm +++ b/Bio/DB/IndexedBase.pm @@ -790,7 +790,7 @@ sub _check_linelength { my ($self, $linelength) = @_; return if not defined $linelength; $self->throw( - "Each line of the qual file must be less than 65,536 characters. Line ". + "Each line of the file must be less than 65,536 characters. Line ". "$. is $linelength chars." ) if $linelength > 65535; } -- 2.11.4.GIT