Bio-AutomatedAnnotation

 view release on metacpan or  search on metacpan

lib/Bio/AutomatedAnnotation/Prokka.pm  view on Meta::CPAN

    while (<TRNA>) {
        chomp;
        if (m/^>end/) {
          last;
        }
        
        if (m/^>(\S+)/) {
            $sid = $1;
            next;
        }
        my @x = split m/\s+/;
        next unless @x == 5 and $x[0] =~ m/^\d+$/;

        # and $x[4] =~ m/^\([ATCG]{3}\)$/i;
        #$self->msg($_);
        $self->msg("@x");
        $x[2] =~ m/(c)?\[(\d+),(\d+)\]/;
        my ( $revcom, $start, $end ) = ( $1, $2, $3 );

        # bug fix for aragorn when revcom trna ends at start of contig!
        #  if (defined $revcom and $start > $end) {

lib/Bio/AutomatedAnnotation/Prokka.pm  view on Meta::CPAN

                }
            }
            my $opts = $sigpver == 3 ? '-m hmm' : '';
            my $cmd = "signalp -t $gram -f short $opts $spoutfn 2> /dev/null";

            $self->msg("Running: $cmd");
            my $tool       = "SignalP:" . $tools{signalp}->{VERSION};
            my $num_sigpep = 0;
            open SIGNALP, "$cmd |";
            while (<SIGNALP>) {
                my @x = split m/\s+/;
                if ( $sigpver == 3 ) {
                    next unless @x == 7 and $x[6] eq 'Y';    # has sig_pep
                    my $parent = $cds{ $x[0] };
                    my $prob   = $x[5];
                    my $cleave = $x[3];
                    my $start  = $parent->strand > 0 ? $parent->start : $parent->end;
                    my $end    = $start + $parent->strand * ( $cleave - 1 );
                    my $sigpep = Bio::SeqFeature::Generic->new(
                        -seq_id     => $parent->seq_id,
                        -source_tag => $tool,

lib/Bio/AutomatedAnnotation/Prokka.pm  view on Meta::CPAN


                    $self->runcmd("nice parallel$paropts $cmd ::: $tempdir/*.seq");

                    for ( my $j = $slice_size * $i ; $j < @cds_counter && $j < $slice_size * ( $i + 1 ) ; $j++ ) {
                        my $pid = $cds_counter[$j];
                        my $bls = Bio::SearchIO->new( -file => "$tempdir/$pid.seq.out", -format => $db->{FMT}, -version => $db->{VERSION} );
                        my $res = $bls->next_result or next;
                        my $hit = $res->next_hit or next;
                        my ( $prod, $gene, $EC ) = ( $hit->description, '', '' );
                        if ( $prod =~ m/~~~/ ) {
                            ( $EC, $gene, $prod ) = split m/~~~/, $prod;
                            $EC =~ s/n\d+/-/g;    # collapse transitionary EC numbers
                        }
                        my $cleanprod = $prod;

                        if ( $self->cleanup_prod ) {
                            $cleanprod = $self->cleanup_product($prod);
                            if ( $cleanprod ne $prod ) {
                                $self->msg("Modify product: $prod => $cleanprod");
                                if ( $cleanprod eq $HYPO ) {
                                    $cds{$pid}->add_tag_value( 'note', $prod );



( run in 1.687 second using v1.01-cache-2.11-cpan-62a16548d74 )