Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Size of sequences in fastafile

by zubenel0 (Sexton)
on Mar 01, 2020 at 07:18 UTC ( #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? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2023-03-29 18:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (72 votes). Check out past polls.

    Notices?