<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[BOL: Quick way to calculate length of multiple fasta file!!]]></title>
	<link>https://bioinformaticsonline.com/answers/view/28186/quick-way-to-calculate-length-of-multiple-fasta-file?</link>
	<atom:link href="https://bioinformaticsonline.com/answers/view/28186/quick-way-to-calculate-length-of-multiple-fasta-file?" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/answers/view/28186/quick-way-to-calculate-length-of-multiple-fasta-file</guid>
	<pubDate>Thu, 30 Jun 2016 10:49:12 -0500</pubDate>
	<link>https://bioinformaticsonline.com/answers/view/28186/quick-way-to-calculate-length-of-multiple-fasta-file</link>
	<title><![CDATA[Quick way to calculate length of multiple fasta file!!]]></title>
	<description><![CDATA[<pre>I am using this perl code right nowadays.<br /><br />#!/usr/bin/perl
use warnings;
use strict;<br />open(FASTA, "&lt;", seq.fa) or die("Can't open\n");
my %singleLineSequences;
my $sequence_id;
while(){
    my $line = $_; chomp($line);
    if ($line =~ m/^&gt;(\S+)/){
        $sequence_id = $1;  <br />        $singleLineSequences{$sequence_id} = ""; 
        }
    else {
        $singleLineSequences{$sequence_id} = $singleLineSequences{$sequence_id} . $line;
        }
   }<br /><br />
foreach my $sequence_entry (keys %singleLineSequences){
    my $currentSequence = $singleLineSequences{$sequence_entry};
    my $lengthSequence = length($currentSequence);
    print $sequence_entry . "," . $lengthSequence . "\n";
}</pre>]]></description>
	<dc:creator>Anjana</dc:creator>
</item>

</channel>
</rss>