Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
19
Task/FASTA-format/Perl/fasta-format.pl
Normal file
19
Task/FASTA-format/Perl/fasta-format.pl
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
my $fasta_example = <<'END_FASTA_EXAMPLE';
|
||||
>Rosetta_Example_1
|
||||
THERECANBENOSPACE
|
||||
>Rosetta_Example_2
|
||||
THERECANBESEVERAL
|
||||
LINESBUTTHEYALLMUST
|
||||
BECONCATENATED
|
||||
END_FASTA_EXAMPLE
|
||||
|
||||
my $num_newlines = 0;
|
||||
while ( < $fasta_example > ) {
|
||||
if (/\A\>(.*)/) {
|
||||
print "\n" x $num_newlines, $1, ': ';
|
||||
}
|
||||
else {
|
||||
$num_newlines = 1;
|
||||
print;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue