From: Tim Reddy Tim Date: Mon, 12 Jan 2009 22:47:46 +0000 (+0000) Subject: Added file to flatten fasta as prep for bioprospector X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=cee84746af512a847a96a2b9b2ec55992b08b154 Added file to flatten fasta as prep for bioprospector --- diff --git a/htswanalysis/scripts/flatten_fasta.pm b/htswanalysis/scripts/flatten_fasta.pm new file mode 100755 index 0000000..adb6adf --- /dev/null +++ b/htswanalysis/scripts/flatten_fasta.pm @@ -0,0 +1,14 @@ +#!/usr/bin/perl -w + +my $started = 0; +while( my $line = <>) { + if($line =~ /^>/) { + if(!$started) { $started = 1; } else { print "\n"; } + print $line; + } + else { + chomp $line; + print $line; + } +} +print "\n";