[Bioperl-l] a problem when using the Bio::DB::Fasta
guifengwei at gmail.com
Mon Aug 23 22:44:57 EDT 2010
i came across a problem when i use the Bio::DB::Fasta modules of
BioPerl. The aim i want to arrive at is to extract the subsequences
accoording to the *.bed files which are the C.elegans genomic sequnece
when i tried to run the scripts i wrote, the error message was coming, as
Can't call method "seq" on an undefined value at bed_to_fasta.pl line 28,
<IN> line 1.
so, ask for favor to slove this problem.
Here is my perl scripts.
# Purpose: extract sequences from genomic sequences
open(IN,$ARGV) || die "sorry, the program cannot open the .bed file, plea
check it. \n";
my $db = Bio::DB::Fasta->new( '/home/wgf/elegans190.dna/' );
# The dir ...../elegans190.dna/ includes 6
#each stands for the sequences from the coressponding chromosome.
my @bed=split(/\s+/, $_ );
my $segment = $db->seq( $chr_id, $start=>$end );
More information about the Bioperl-l