Changeset 262

Show
Ignore:
Timestamp:
09/15/09 13:26:04 (2 months ago)
Author:
cholt
Message:

fix maker2jbrowse

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • bin/maker2jbrowse

    r261 r262  
    8484} 
    8585 
    86 if(@files){ 
     86if(!@files){ 
    8787    print $usage; 
    8888    exit(); 
     
    109109 
    110110#MAKER anotations 
    111 $commans{gene}           = ' --tracklabel "Genes" --key "Genes" --getType --getLabel --autocomplete label --cssclass feature5 --type gene'; 
    112 $commans{mRNA}           = ' --tracklabel "Transcripts" --key "Transcripts" --getType --getSubs --getLabel --autocomplete label --cssclass transcript --subfeatureClasses \'{"exon": "transcript-exon", "CDS": "transcript-CDS", "UTR": "transcript-UTR"}\' --arrowheadClass transcript-arrowhead --type mRNA'; 
     111$commands{gene}           = ' --tracklabel "Genes" --key "Genes" --getType --getLabel --autocomplete label --cssclass feature5 --type gene'; 
     112$commands{maker}          = ' --tracklabel "Transcripts" --key "Transcripts" --getType --getSubs --getLabel --autocomplete label --cssclass transcript --subfeatureClasses \'{"exon": "transcript-exon", "CDS": "transcript-CDS", "UTR": "transcript-UTR"}\' --arrowheadClass transcript-arrowhead --type mRNA'; 
    113113 
    114114#ab initio gene predictions 
    115 $commans{snap}           = ' --tracklabel "SNAP" --key "SNAP" --getType --getSubs --getLabel --cssclass transcript --subfeatureClasses \'{"match_part": "transcript-CDS"}\' --arrowheadClass transcript-arrowhead --type match:snap'; 
    116 $commans{augustus}       = ' --tracklabel "Augustus" --key "Augustus" --getType --getSubs --getLabel --cssclass transcript --subfeatureClasses \'{"match_part": "transcript-CDS"}\' --arrowheadClass transcript-arrowhead --type match:augustus'; 
    117 $commans{genemark}       = ' --tracklabel "GeneMark" --key "GeneMark" --getType --getSubs --getLabel --cssclass transcript --subfeatureClasses \'{"match_part": "transcript-CDS"}\' --arrowheadClass transcript-arrowhead --type match:genemark'; 
    118 $commans{fgenesh}        = ' --tracklabel "FGENESH" --key "FGENESH" --getType --getSubs --getLabel --cssclass transcript --subfeatureClasses \'{"match_part": "transcript-CDS"}\' --arrowheadClass transcript-arrowhead --type match:fgenesh'; 
     115$commands{snap}           = ' --tracklabel "SNAP" --key "SNAP" --getType --getSubs --getLabel --cssclass transcript --subfeatureClasses \'{"match_part": "transcript-CDS"}\' --arrowheadClass transcript-arrowhead --type match:snap'; 
     116$commands{snap_masked}    = ' --tracklabel "SNAP" --key "SNAP" --getType --getSubs --getLabel --cssclass transcript --subfeatureClasses \'{"match_part": "transcript-CDS"}\' --arrowheadClass transcript-arrowhead --type match:snap_masked'; 
     117$commands{augustus}       = ' --tracklabel "Augustus" --key "Augustus" --getType --getSubs --getLabel --cssclass transcript --subfeatureClasses \'{"match_part": "transcript-CDS"}\' --arrowheadClass transcript-arrowhead --type match:augustus'; 
     118$commands{augustus_masked} = ' --tracklabel "Augustus" --key "Augustus" --getType --getSubs --getLabel --cssclass transcript --subfeatureClasses \'{"match_part": "transcript-CDS"}\' --arrowheadClass transcript-arrowhead --type match:augustus_masked'; 
     119$commands{genemark}       = ' --tracklabel "GeneMark" --key "GeneMark" --getType --getSubs --getLabel --cssclass transcript --subfeatureClasses \'{"match_part": "transcript-CDS"}\' --arrowheadClass transcript-arrowhead --type match:genemark'; 
     120$commands{genemark_masked} = ' --tracklabel "GeneMark" --key "GeneMark" --getType --getSubs --getLabel --cssclass transcript --subfeatureClasses \'{"match_part": "transcript-CDS"}\' --arrowheadClass transcript-arrowhead --type match:genemark_masked'; 
     121$commands{fgenesh}        = ' --tracklabel "FGENESH" --key "FGENESH" --getType --getSubs --getLabel --cssclass transcript --subfeatureClasses \'{"match_part": "transcript-CDS"}\' --arrowheadClass transcript-arrowhead --type match:fgenesh'; 
     122$commands{fgenesh_masked} = ' --tracklabel "FGENESH" --key "FGENESH" --getType --getSubs --getLabel --cssclass transcript --subfeatureClasses \'{"match_part": "transcript-CDS"}\' --arrowheadClass transcript-arrowhead --type match:fgenesh_masked'; 
    119123 
    120124#evidence alignments 
    121 $commans{blastx}         = ' --tracklabel "BLASTX" --key "BLASTX" --getType --getSubs --cssclass generic_parent --subfeatureClasses \'{"match_part": "match_part"}\' --type protein_match:blastx'; 
    122 $commans{blastn}         = ' --tracklabel "BLASTN" --key "BLASTN" --getType --getSubs --cssclass generic_parent --subfeatureClasses \'{"match_part": "match_part"}\' --type protein_match:blastn'; 
    123 $commans{tblastx}        = ' --tracklabel "TBLASTX" --key "TBLASTX" --getType --getSubs --cssclass generic_parent --subfeatureClasses \'{"match_part": "match_part"}\' --type protein_match:tblastx'; 
    124 $commans{est2genome}     = ' --tracklabel "est2genome" --key "est2genome" --getType --getSubs --cssclass generic_parent --subfeatureClasses \'{"match_part": "match_part"}\' --type protein_match:est2genome'; 
    125 $commans{protein2genome} = ' --tracklabel "protein2genome" --key "protein2genome" --getType --getSubs --cssclass generic_parent --subfeatureClasses \'{"match_part": "match_part"}\' --type protein_match:protein2genome'; 
     125$commands{blastx}         = ' --tracklabel "BLASTX" --key "BLASTX" --getType --getSubs --cssclass generic_parent --subfeatureClasses \'{"match_part": "match_part"}\' --type protein_match:blastx'; 
     126$commands{blastn}         = ' --tracklabel "BLASTN" --key "BLASTN" --getType --getSubs --cssclass generic_parent --subfeatureClasses \'{"match_part": "match_part"}\' --type expressed_sequence_match:blastn'; 
     127$commands{tblastx}        = ' --tracklabel "TBLASTX" --key "TBLASTX" --getType --getSubs --cssclass generic_parent --subfeatureClasses \'{"match_part": "match_part"}\' --type expressed_sequence_match:tblastx'; 
     128$commands{est2genome}     = ' --tracklabel "est2genome" --key "est2genome" --getType --getSubs --cssclass generic_parent --subfeatureClasses \'{"match_part": "match_part"}\' --type expressed_sequence_match:est2genome'; 
     129$commands{protein2genome} = ' --tracklabel "protein2genome" --key "protein2genome" --getType --getSubs --cssclass generic_parent --subfeatureClasses \'{"match_part": "match_part"}\' --type protein_match:protein2genome'; 
    126130 
    127131#repeats 
    128 $commans{repeatmasker}   = ' --tracklabel "RepeatMasker" --key "RepeatMasker" --getType --getSubs --cssclass generic_parent --subfeatureClasses \'{"match_part": "match_part"}\' --type protein_match:repeatmasker'; 
    129 $commans{repeaqtrunner}  = ' --tracklabel "RepeatRunner" --key "RepeatRunner" --getType --getSubs --cssclass generic_parent --subfeatureClasses \'{"match_part": "match_part"}\' --type protein_match:blastx:repeatmask'; 
     132$commands{repeatmasker}   = ' --tracklabel "RepeatMasker" --key "RepeatMasker" --getType --getSubs --cssclass generic_parent --subfeatureClasses \'{"match_part": "match_part"}\' --type match:repeatmasker'; 
     133$commands{blastx:repeatmask}  = ' --tracklabel "RepeatRunner" --key "RepeatRunner" --getType --getSubs --cssclass generic_parent --subfeatureClasses \'{"match_part": "match_part"}\' --type protein_match:blastx:repeatmask'; 
    130134 
    131135 
     
    133137    my $gff; 
    134138    my $fasta; 
     139    my %tracks; 
    135140 
    136141    open(IN, "< $file"); 
     
    146151        } 
    147152        else{ 
     153            if($line !~ /^\#/ && $line =~ /[^\t]*\t([^\t]*)\t/){ 
     154                $val = $1; 
     155                $tracks{$1}++; 
     156                $tracks{gene}++ if($1 eq 'maker'); #add gene locus track 
     157            } 
     158 
    148159            $gff .= $line; 
    149160            next; 
     
    169180        close($fh); 
    170181 
    171         while(my $track = each %commands){ 
     182        while(my $track = each %tracks){ 
    172183            my $command = $JB; 
     184 
     185            die "ERROR: No track information for source \'$track\'\n\n"; 
     186 
    173187            $command .= $commands{$track}; 
    174188            $command .= " --gff $fname";