[Bioperl-l] problem with trunc_with_features (SeqUtils.pm)
fs5 at sanger.ac.uk
Mon Apr 9 17:21:31 EDT 2012
I have recently worked a bit on that module and contributed the code to
bioperl-live. I think this behaviour may already have changed but I'm
not 100% sure at the moment. When I have some time I will review the
code to confirm. In the meantime, you could give it a go with the
bioperl-live version if that's an option for you?
On 03/04/12 17:56, Heath O'Brien wrote:
> Hi All,
> I've encountered a bug in the trunc_with_features function in SeqUtils.pm, or at
> least behavior that was unexpected to me:
> Features with fuzzy coordinates in the original sequence are converted to exact
> coordinates in the truncated sequence. For example, the script below changes the
> coordinates for the feature from<1..5 to 1..5.
> I have modified the code to change this behavior on my system, but I thought I'd
> post something here in case others encounter the same problem.
> all good things,
> #!/usr/bin/perl -w
> use strict;
> use warnings;
> use Bio::SeqIO;
> use Bio::SeqUtils;
> my $infile= shift;
> my $inIO = Bio::SeqIO->new('-file' => $infile,
> '-format' => 'genbank') or die "could not open seq file $infile\n";
> my $outfile = $infile . '_out.gbk';
> my $outIO = Bio::SeqIO->new('-file' => ">$outfile",
> '-format' => 'genbank') or die "could not open seq file $outfile\n";
> my $in_seq = $inIO->next_seq;
> my $out_seq = Bio::SeqUtils->trunc_with_features($in_seq, 1, 5);
> LOCUS test_sequence 57303 bp DNA linear UNA
> DEFINITION Sequence to demonstrate unexpected behavior of trunc_with_features
> ACCESSION unknown
> KEYWORDS .
> FEATURES Location/Qualifiers
> source 1..10
> /mol_type="genomic DNA"
> /product="hypothetical protein"
> 1 caagattaaa
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.
More information about the Bioperl-l