[Bio] / FigKernelScripts / server_paper_example5.pl Repository:
ViewVC logotype

Annotation of /FigKernelScripts/server_paper_example5.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (view) (download) (as text)

1 : parrello 1.1 #!/usr/bin/perl -w
2 :     use strict;
3 :    
4 : disz 1.3 use ANNOserver;
5 : parrello 1.1
6 : parrello 1.2 # Parms are FASTA input file name, genus, species.
7 : parrello 1.1 # Produce geneID, type, contig, begin, strand, len on STDOUT.
8 :    
9 : disz 1.3 my $annoObject = ANNOserver->new();
10 : parrello 1.2 my ($file, $genus, $species) = @ARGV;
11 : parrello 1.1
12 : parrello 1.2 open FASTAIN, "<$file";
13 : disz 1.3 my $geneCalls = $annoObject->call_genes(\*FASTAIN);
14 : parrello 1.1 # We throw away the FASTA string returned by call_genes.
15 : parrello 1.2 my (undef, $geneList) = @$geneCalls;
16 :     for my $geneData (@$geneList) {
17 :     my ($gene, $contig, $begin, $strand, $len) = @$geneData;
18 : parrello 1.1 print join("\t", $gene, 'peg', $contig, $begin, $strand, $len);
19 :     }
20 : parrello 1.2 close FASTAIN;
21 :     open FASTAIN, "<$file";
22 : disz 1.3 my $rnaCalls = $annoObject->find_rnas(\*FASTAIN, $genus, $species, 'Bacteria');
23 : parrello 1.1 # We throw away the FASTA string returned by find_rnas.
24 : parrello 1.2 my (undef, $rnaList) = @$rnaCalls;
25 :     for my $rnaData (@$rnaList) {
26 :     my ($rna, $contig, $begin, $strand, $len) = @$rnaData;
27 : parrello 1.1 print join("\t", $rna, 'rna', $contig, $begin, $strand, $len);
28 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3