[Bioperl-l] Retrieving from an indexed fasta file into a LargeSeq object

Christopher Porter cporter at ohri.ca
Fri Sep 24 16:39:29 EDT 2004


I have a fasta file containing large contig sequences, which I have 
indexed using Bio::Index::Fasta. Is there a way to use the index to 
retrieve sequences into a Bio::Seq::LargeSeq object rather than 
Bio::Seq?

What I'm currently doing is essentially:

#!/usr/bin/perl

use strict;
use Bio::SeqIO;
use Bio::Index::Fasta;

my $idx = Bio::Index::Fasta->new('-filename'=>$hcindex);

foreach my $acc(keys %$foo){
	my $seqobj = $idx->fetch($acc);
	...
}

How can I force $seqobj to be a LargeSeq?

(At another point in the script I'm using SeqIO to read short sequences 
from a non-indexed fasta file - I don't really want to use LargeSeq for 
that part.)


Thanks,

Chris



More information about the Bioperl-l mailing list