5 open my $fca62, "-|", "gzip -dc Felis_catus-6.2_masked.fa.gz";
6 open my $pbe084, "-|", "gzip -dc PBE084_masked.fa.gz";
7 open my $pbe144, "-|", "gzip -dc PBE144_masked.fa.gz";
8 open my $pvi033, "-|", "gzip -dc PVI033_masked.fa.gz";
9 open OUT
, ">", "exons.nex";
41 foreach (sort keys %file) {
43 $seq{$u} = &readseq
($file{$u});
44 warn "Read $u sequence complete!\n";
49 foreach my $u (sort keys %chr) {
50 for (my $i=0; $i < $chr{$u}; ++$i) {
51 my $w = substr($seq{FCA62
}{$u}, $i, 100);
52 next if (length $w) < 100;
55 foreach my $v (sort keys %seq) {
56 push @subseq, substr($seq{$v}{$u}, $i, 100);
58 if (grep(/N{5}/, @subseq) == 0) { # find 100bp windows without /N{5}/
59 push @
{$loci{$u}}, \
@subseq;
65 warn "$u exons\t$ncha bp\n";
67 warn "Pick loci complete!\n";
71 Dimensions ntax=4 nchar=$ncha;
72 Format datatype=DNA interleave=yes;
75 foreach my $u (sort keys %loci) {
77 foreach my $w (@
{$loci{$u}}) {
79 # print OUT "${u}_$v\t4\t1000\n";
80 print OUT
"FCA6.2\t${$w}[0]\n";
81 print OUT
"PBE084\t${$w}[1]\n";
82 print OUT
"PBE144\t${$w}[2]\n";
83 print OUT
"PVI033\t${$w}[3]\n\n";
87 print OUT
";\nEND;\n";
95 last unless /(chr\w+)/;