Skip to content

Instantly share code, notes, and snippets.

@standage
Created October 9, 2013 19:32
Show Gist options
  • Select an option

  • Save standage/6906906 to your computer and use it in GitHub Desktop.

Select an option

Save standage/6906906 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
# Daniel S. Standage <daniel.standage@gmail.com>
# Input: sequences cleaned up and annotated by mRNAmarkup
# Output: each sequence ID along with its annotation, if any
my $usage = "perl $0 < cln-seqs.fas > seqids-and-funcs.txt";
while(<STDIN>)
{
next unless(m/^>/);
my($seqid) = m/^>(PdomTSAr1\.1-\d+)/;
my $func = "NA";
if(m/potential fusion transcript/)
{
$func = "potential fusion transcript";
}
elsif(m/matches \d+ \((.+)\)/)
{
$func = $1;
}
print "$seqid\t$func\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment