Alexey Morozov | 20 Jun 04:11 2013

Re: Failure to merge two scripts

2013/6/12 <tehanson <at>>

> I am a novice at PERL and came across a script to sort sequences in a
> mulitple sequence fasta file by name.  It does what it should.  However, it
> does give the following error:
> "Replacement list is longer than search list at
> C:/Perl/site/lib/Bio/ line 251."
> I'm not too worried about this as it does work.
> I have another PERL script that takes uniprotkb fasta headers and trims
> them to just the organism name and strain.  I would like to run this script
> and the sorting script together on a series of files and then concatenate
> the results.  I can run the scripts separately and they work.  I tried to
> put my trimming script before the sorting script in a single script, and it
> no longer works.
> Could anyone take a look and see if there is something simple I am doing
> wrong?   Or, is there a better way to do this? I will need to do this
> repetitively on batches of 33 files. I am running PERL 5.12.2 on Windows XP
> sp3 with BioPerl 1.6.1.
> Attached:
> L1.fasta - example Uniprot file to be trimmed and sorted
> L1ss.fasta - desired output from running the scripts in sequence
> - script from Naoki Takebayashi
> (
> )
> - my fasta header trimming script
> - my attempt at merging the two scripts above into a single
> one
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l <at>

To be honest, I'm to lazy to read your scripts, but have you tried glueing
them together with some bash?
Something like "Script 1 | Script 2" or "Script1 -foo; Script2 -bar" must
do the job. Plus, if you are novice (and willing to learn), it may be
useful for you to rewrite the whole thing from the scratch in a single
script, it seems to be about 50 lines of code at most.

Alexey Morozov,
LIN SB RAS, bioinformatics group.
Irkutsk, Russia.