File: dump_cdna.pl

package info (click to toggle)
libace-perl 1.92-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 1,608 kB
  • ctags: 1,541
  • sloc: perl: 7,763; ansic: 7,420; makefile: 84
file content (23 lines) | stat: -rwxr-xr-x 572 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl

# this script dumps the spliced form of all predicted genes

use Ace::Sequence;

my $host = shift || 'www.wormbase.org';
my $port = shift || 200005;

$db = Ace->connect(-host=>'www.wormbase.org',-port=>200005);
warn "fetching all genes....\n";
@genes = $db->fetch(Predicted_gene=>'*');
foreach (@genes) {
  warn "Fetching dna for $_\n";
  my $data = $_->asDNA;
  $data =~ s/$/ (spliced)/m;
  print $data;

  my $seq       = Ace::Sequence->new($_);
  my $unspliced = $seq->dna;
  $unspliced =~ s/(\w{50})/$1\n/g;
  print ">$_ (unspliced)\n$unspliced\n";
}