in reply to One more problem
in thread While loop printing only one fasta header file
What are you doing here?if (($head =~ /$_/) .. ($_ =~ /\/\//))
This should put the FASTA file into the hash "fasta_source", and you would easy to do what you want.my %fasta_source; my $tmp_title; open INSEQ,"<$file_fasta"; while (<INSEQ>) { chomp; if ($_=~/^>/) { $tmp_title=$_; } else { $fasta_source{$tmp_title}.=$_; } } close INSEQ;
|
|---|