Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Size of sequences in fastafile

by zubenel0 (Sexton)
on Mar 01, 2020 at 07:18 UTC ( [id://11113601]=note: print w/replies, xml ) Need Help??


in reply to Size of sequences in fastafile

Tasks like this can be solved by using BioPerl.
use strict; use warnings; use Bio::SeqIO; # Reading the fasta file my $seqio_obj = Bio::SeqIO->new(-file => "Genes.fasta", -format => "fasta" ); # Looping through sequences and printing them unless length <= 10 + while ( my $seq_obj = $seqio_obj->next_seq ) { print $seq_obj->seq,"\n" unless $seq_obj->length <= 10; } # The output should be : "GGAGGTCTTTAGCTTTAGGGAAACCC".

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11113601]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-18 04:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found