[Bioperl-l] Perl

Adam Witney awitney at sgul.ac.uk
Tue Jul 26 08:35:08 EDT 2011


[please keep the list cc'd into your emails]

your script is mostly there, you just need to add your processing criteria, ie sequences longer than 200bp, see below:

On 26 Jul 2011, at 13:29, Akash wrote:

> Sir
> 
> I am very thankful to you for your suggestion and I tried to work on the Bio-Perl but as it is very new for me, I am unable to understand in a very short period of time because the work I am doing, I have to show in next couple of days. 
> 
> So Please can you help in this? I want to remove the "contgis" from a "fasta" file which contain more than "200 base pairs".
> 
> With Regards
> Akash
> 
> I am using this script right now
> 
> use strict;
> use Bio::SeqIO;
> my $in = Bio::SeqIO->new(-file=>"contigs.fa", '-format'=>'FASTA');
> my $out = Bio::SeqIO->new(-file=>">contigs1.fa", '-format'=>'FASTA');
> 
> while( my $Seq = $in->next_seq())
> {

	if ( $seq->length() > 200 ) {
		$out->write_seq($seq);
	}

> }




More information about the Bioperl-l mailing list