[Bioperl-l] Bio::Tools::Run::RepeatMasker issues

Graham Hamilton Graham.Hamilton at glasgow.ac.uk
Wed Apr 27 10:43:42 UTC 2011


Dear All

I am writing a script to run RepeatMasker on several hundred thousand sequences of ~100 bp. I have installed RepeatMasker and have a script that will read in a single fasta sequence file and print out the masked sequence.

use Bio::Tools::Run::RepeatMasker;
use Bio::SeqIO;

my $factory = Bio::Tools::Run::RepeatMasker->new(-species => 'human');
my $in  = Bio::SeqIO->new(-file => "test.fa",
                       -format => 'fasta');
my $seq = $in->next_seq();
$factory->run($seq);
my $masked_seq = $factory->masked_seq;
print  $masked_seq->seq;

The script works for sequences that contain repeats. Unfortunately, when I use a sequence without repeats I get the following error.

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: Cannot open RepeatMasker outfile for parsing
STACK: Error::throw
STACK: Bio::Root::Root::throw /usr/local/lib/perl5/site_perl/5.12.3/Bio/Root/Root.pm:472
STACK: Bio::Tools::Run::RepeatMasker::_run /usr/local/lib/perl5/site_perl/5.12.3/Bio/Tools/Run/RepeatMasker.pm:308
STACK: Bio::Tools::Run::RepeatMasker::run /usr/local/lib/perl5/site_perl/5.12.3/Bio/Tools/Run/RepeatMasker.pm:260
STACK: RepeatMaskerTest.pl:22
-----------------------------------------------------------

As I want to screen a file of many short sequences, most will contain repeats but not all. I want to keep the sequences that do not contain repeats for further investigation. This is a problem for me as the Exception exits the script. 

I assume that I am doing something wrong, can anyone give me some hints as to how I can get this to work?

Regards

Graham


Dr Graham Hamilton
The Sir Henry Wellcome Functional Genomics Facility
Room B3-28
Joseph Black Building
Research Institute of Molecular, Cell & Systems Biology
College of Medical, Veterinary & Life Sciences
University of Glasgow
Glasgow
Scotland
G12 8QQ

T: +44 141 330 6212





More information about the Bioperl-l mailing list