[Bioperl-l] Bio::DB::Fasta

Eric Just e-just at northwestern.edu
Thu Dec 18 18:00:38 EST 2003


Hi I have 2 points about Bio::DB::Fasta

1. In windows it seems that the file being indexed needs to have unix style 
line breaks. WIndows style does not work.

I have attempted to retreive a subsequence of a genomic sequence file in a 
database.  To compare I used a seq object created through SeqIO.  I got tow 
seqs of different lenghths.  The one gotten from SeqIO is what I was expecting.

use Bio::DB::Fasta;
use Bio::Seq;
use Bio::SeqIO;

my $db      = Bio::DB::Fasta->new('C:/dicty/bin/blast_scripts/fasta');
my $prim   = $db->get_Seq_by_id('DDB0183747');
my $fasta  = new Bio::SeqIO( -file => 
'C:/dicty/bin/blast_scripts/fasta/dictyChromosome6.fa', -format => 'Fasta');
my $seq    = $fasta->next_seq();

  print Dumper( $seq->subseq(1001,1025 ));
  print Dumper( $prim->subseq(1001,1025 ));

------------------------output------------------------------------------

$VAR1 = 'ATAAATCAAATTGTTTTTTAGTTTT';
$VAR1 = 'NNNNNNNNNNNNNNNNATAAATCAAA';

2. If I save the file with unix style line breaks it is better but I still 
get a different sequence than I do for SeqIO:  It seems to be offset by 1.

------------------------output------------------------------------------

$VAR1 = 'ATAAATCAAATTGTTTTTTAGTTTT';
$VAR1 = 'TAAATCAAATTGTTTTTTAGTTTTT';

I am using the latest version of Bio::DB::Fasta (downloaded from cvs tree) 
in bioperl 1.2.   and DB_File 1.807 (from ppm).

Thanks for any help/suggestions.

Eric




============================================

Eric Just
e-just at northwestern.edu
dictyBase Programmer
Center for Genetic Medicine
Northwestern University
http://dictybase.org

============================================



More information about the Bioperl-l mailing list