Instantly share code, notes, and snippets.

Embed
What would you like to do?
join all sequences on a fasta file
<?php
$f = fopen('/home/edwin/hola.fasta', 'r');
echo ">hola.fasta\n";
while ( $line = fgets($f) ) {
if ( $line[0] == '>') continue;
if ( empty(trim($line)) ) continue;
echo trim($line);
}
fclose($f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment