Changeset 222

Show
Ignore:
Timestamp:
06/22/09 12:34:39 (5 months ago)
Author:
cholt
Message:

update maker

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • bin/gff3_2_gtf

    r196 r222  
    4444 
    4545foreach my $g (@genes){ 
    46     my $gene_id = $g->{Name}; 
     46    my $gene_id = $g->{ID}; 
    4747    my $g_mRNAs = $mRNAinx{$g->{ID}}; 
    4848 
    4949    foreach my $t (@$g_mRNAs){ 
    50         my $transcript_id = $t->{Name}; 
     50        my $transcript_id = $t->{ID}; 
    5151        my $t_stuff = $stuffinx{$t->{ID}}; 
    5252 
  • bin/maker2zff.pl

    r127 r222  
    55##### Initialize Threshhold  #### 
    66my @thresh = (); 
    7 use vars qw($opt_h $opt_c $opt_e $opt_o $opt_a $opt_t $opt_l); 
     7my $thrAED = 0.5; 
     8use vars qw($opt_h $opt_c $opt_e $opt_o $opt_a $opt_t $opt_l $opt_x); 
    89 
    910push @thresh, 0.5; 
     
    1415push @thresh, 75; 
    1516 
    16 getopts("hc:e:o:a:t:"); 
     17 
     18getopts("hc:e:o:a:t:x"); 
    1719my $usage = "maker2zff.pl directory name [options] 
    1820 
     
    2830-t fraction  The fraction of exons the overlap an ab-initio SNAP prediction, default 0 
    2931-l number    The min length of the protein sequence produced by the mRNA 
     32-x number    Max AED to allow 0.5 is default 
    3033"; 
    3134 
     
    3639if ($opt_t) {$thresh[4] = $opt_t} 
    3740if ($opt_l) {$thresh[5] = $opt_l} 
     41if ($opt_x) {$thrAED = $opt_x} 
    3842 
    3943my %id2name = (); 
     
    6367    while (my $line = <GFF>) { 
    6468        chomp($line); 
    65         if ($line =~ m/^\s*#/) { 
     69        if ($line =~ m/\#\#FASTA/) { 
     70            my $header; 
     71            while (my $d = <GFF>) { 
     72                if($d =~ /^>(\S+)/){ 
     73                    $header = $1; 
     74                    $seq{$header} = ""; 
     75                } 
     76                else{ 
     77                    $seq{$header} .= $d; 
     78                } 
     79            } 
     80        } 
     81        elsif($line =~ /^\s*\#|^\n$|^\s*$/){ 
    6682            next; 
    67         } elsif ($line =~ m/^\s*$/) { 
    68             next; 
    69         } elsif ($line =~ m/^>(\S+)/) { 
    70             my $header = $1; 
    71             $seq{$header} = ""; 
    72             while (<GFF>) { 
    73                 $seq{$header} = join("", $seq{$header}, $_) 
    74             } 
    75         } else { 
     83        } 
     84        else { 
    7685            my ($seqid, $source, $tag, $start, $end, $score, $strand, $phase, $annot) = split(/\t/, $line); 
    7786            my %annotation = split(/[;=]/, $annot); 
     
    8190                my $parent = $annotation{'Parent'}; 
    8291                my ($name, $qi) = split(/\s+/, $lname); 
    83                 my $ishc = is_hc($qi); 
     92                if(! $qi){ 
     93                    ($qi) = $line =~ /_QI\=([^\;\n]+)/; 
     94                } 
     95                my ($AED) = $line =~ /_AED\=([^\;\n]+)/; 
     96                my $ishc = is_hc($qi, $AED); 
    8497                if ($ishc == 1 ) { 
    8598                    $hc{$id} = 1; 
     
    119132sub is_hc { 
    120133    my $qi = shift @_; 
     134    my $AED = shift @_; 
     135 
    121136    my @q = split(/\|/, $qi); 
    122137    my @qual = (@q[1..5],$q[8]); 
     
    127142        } 
    128143    } 
     144 
     145    $hc = 0 if($AED > $thrAED); 
     146 
    129147    return $hc; 
    130148} 
  • lib/GI.pm

    r209 r222  
    14361436      $command .= " hspsepqmax=$split_hit"; 
    14371437      $command .= " lcmask"; 
    1438       $command .= " wordmask=seg"; 
    14391438      $command .= " gi"; 
    14401439      #$command .= " mformat=2"; # remove for full report 
     
    16981697      $command .= " lcmask"; 
    16991698      $command .= " kap"; 
    1700       $command .= " wordmask=seg"; 
    17011699      $command .= " gi"; 
    17021700      #$command .= " mformat=2"; # remove for full report 
     
    19361934      $command .= " hspsepqmax=$split_hit"; 
    19371935      $command .= " lcmask"; 
    1938       $command .= " wordmask=seg"; 
    19391936      $command .= " gi"; 
    19401937      #$command .= " mformat=2"; # remove for full report 
  • lib/Widget/fgenesh.pm

    r207 r222  
    144144           } 
    145145           waitpid $pid, 0; 
    146            die "ERROR: FgenesH failed\n" if $? != 0; 
     146           #die "ERROR: FgenesH failed\n" if $? != 0; 
    147147        } 
    148148        else { 
  • lib/Widget/snap.pm

    r207 r222  
    6666        my $plus  = 0; 
    6767        my $minus = 0; 
    68        my $least; 
     68       my $least; 
    6969        my $most; 
    7070        foreach my $hit (@t_data){ 
     
    289289        my $i_flank = shift;     
    290290 
     291        my @index; 
     292 
    291293        my $p_pieces = Shadower::getPieces($seq, $p_coors, 0); 
    292294 
     
    326328                $c .= "\t$s\t-100\t\.\t\.\t\.\tADJ"; 
    327329                push(@xdef, $c); 
    328  
    329  
    330         } 
     330        } 
     331 
    331332        return \@xdef; 
    332333} 
  • lib/exonerate/splice_info.pm

    r127 r222  
    2525 
    2626        my $str = ''; 
    27         if    ($d eq 'gt' && $a eq 'ag') { 
     27        if    ($d =~ /^gt$/i && $a =~ /^ag$/i) { 
    2828                $str = '+'; 
    2929        } 
    30         elsif ($d eq 'ct' && $a eq 'ac') { 
     30        elsif ($d =~ /^ct$/i && $a =~ /^ac$/i) { 
    3131                $str = '-'; 
    3232        } 
    33         elsif ($d eq 'at' && $a eq 'ac'){ 
     33        elsif ($d =~ /^at$/i && $a =~ /^ac$/i){ 
    3434               $str = '+'; 
    3535        } 
    36         elsif ($d eq 'gt' && $a eq 'at'){ 
     36        elsif ($d =~ /^gt$/i && $a =~ /^at$/i){ 
    3737               $str = '-'; 
    3838        } 
     
    109109     
    110110    my $splice_str = ''; 
    111     for (my $i = 1; $i < @{$sorted}; $i++){ 
    112         my $pre_hsp = $sorted->[$i-1]; 
    113         my $pos_hsp = $sorted->[$i]; 
     111    for (my $i = 0; $i < @{$sorted} - 1; $i++){ 
     112        my $pre_hsp = $sorted->[$i]; 
     113        my $pos_hsp = $sorted->[$i+1]; 
    114114                 
    115115        my $code = splice_code($pre_hsp->donor(), 
     
    149149            my $acceptor = substr($$seq, $p, $length); 
    150150            $acceptor = Fasta::revComp($acceptor) if($strand == -1); 
    151             $pre_hsp->{acceptor} = $acceptor; 
     151            $pos_hsp->{acceptor} = $acceptor; 
    152152        } 
    153153    } 
  • lib/runlog.pm

    r209 r222  
    265265                    } 
    266266                     
    267                     if (-e $gff_file) { 
    268                         $rm_key{gff}++; #always rebuild gff when some option has changed 
    269                     } 
     267                    $rm_key{gff}++; #always rebuild gff when some option has changed 
    270268                     
    271269                    if ($key eq 'max_dna_len') { 
     
    536534             
    537535            if (exists $rm_key{gff}) { 
    538                 print STDERR "MAKER WARNING: The gff file $gff_file must now be removed.\n"; 
     536                print STDERR "MAKER WARNING: Any preexisting GFF3 and fasta files for this contig must now be removed.\n"; 
    539537                push (@files, $gff_file); 
    540                 push (@files, <$out_base/evaluator/*.eva>); 
    541                 push (@files, <$out_base/*.maker.*.fasta>); 
     538                push (@files, @{[<$out_base/evaluator/*.eva>]}); 
     539                push (@files, @{[<$out_base/*maker*.fasta>]}); 
    542540            } 
    543541