Changeset 270
- Timestamp:
- 09/24/09 21:45:45 (2 months ago)
- Files:
-
- bin/gff3_merge (modified) (1 diff)
- bin/ipr_update_gff (modified) (1 diff)
- bin/maker_functional_fasta (modified) (4 diffs)
- bin/maker_functional_gff (modified) (8 diffs)
- bin/maker_map_ids (modified) (2 diffs)
- bin/map_data_ids (added)
- bin/map_fasta_ids (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
bin/gff3_merge
r257 r270 20 20 Options: 21 21 22 -d The location of the MAKER datastore .22 -d The location of the MAKER datastore index. 23 23 -o Alternate base name for the output files. 24 24 bin/ipr_update_gff
r204 r270 15 15 Description: 16 16 17 This script will take a GFF3 3file and an iprscan output file and add18 fucntional annotations to the GFF3 attributes field.17 This script will take a GFF3 file and an iprscan output file and add 18 Dbxrefs and Ontology_term fields to the GFF3 attributes field. 19 19 20 20 "; bin/maker_functional_fasta
r204 r270 48 48 49 49 open (my $IN, '<', $file) or die "Can't open $file for reading\n$!\n"; 50 unlink($file);51 open (my $OUT, '>', $file) or die "Can't open $file for writing\n$!\n";52 50 53 51 LINE: … … 55 53 56 54 if ($_ !~ /^>/) { 57 print $ OUT $_;55 print $_; 58 56 next LINE; 59 57 } … … 68 66 $header .= join " ", @attrbs if @attrbs; 69 67 70 print $OUT"$header\n";68 print "$header\n"; 71 69 72 70 } … … 102 100 my $func = ''; 103 101 $func .= "Similar to $name: " if $name; 104 $func .= "$desc " if $desc; 102 if ($func =~ /Similar to/) { 103 $func .= "$desc " if $desc; 104 } 105 else { 106 $func .= "Similar to $desc " if $desc; 107 } 105 108 $func .= "($org)" if $org; 106 109 $func = ('Name:"' . $func . '"') if $func; bin/maker_functional_gff
r204 r270 12 12 Synopsis: 13 13 14 maker_functional_ fasta14 maker_functional_gff 15 15 16 16 maker_functional_gff uniprot-sprot.fasta uniprot-sprot.blast.out maker.gff … … 18 18 Description: 19 19 20 This script will take a uniprot-sprot f asta_file,a wu-blast -mformat20 This script will take a uniprot-sprot file a GFF3 file, and a wu-blast -mformat 21 21 2 blast output file from a blast of maker proteins against 22 22 uniprot-sprot proteins and add functional annotations to the maker 23 GFF3 Notes attribute. 24 23 GFF3 Notes attribute. Like this: 25 24 26 25 "; … … 34 33 35 34 open (my $IN, '<', $gff_file) or die "Can't open $gff_file for reading\n$!\n"; 36 unlink($gff_file);37 open (my $OUT, '>', $gff_file) or die "Can't open $gff_file for writing\n$!\n";38 35 39 36 LINE: … … 48 45 ($type ne 'mRNA' && $type ne 'gene') 49 46 ) { 50 print $OUT"$line\n";47 print "$line\n"; 51 48 next LINE; 52 49 } … … 54 51 my ($id) = $attrb =~ /ID\s*=\s*(.*?);/; 55 52 56 my $note = 'Note=';57 if ($blast->{$id} ) {58 $note .= $blast->{$id}{note} if $blast->{$id}{note};53 my $note; 54 if ($blast->{$id}{note}) { 55 $note .= $blast->{$id}{note}; 59 56 } 60 57 else { … … 63 60 64 61 $note = uri_escape($note, ';=%&,'); 62 63 $note = "Note=" . $note; 65 64 66 65 $line =~ s/;$//; … … 73 72 # } 74 73 75 print $OUT"$line\n";74 print "$line\n"; 76 75 } 77 76 #----------------------------------------------------------------------------- … … 159 158 160 159 my $gene_id = $gene_map->{$qid}; 161 if ( ! $seen{$gene_id}) {160 if ($gene_id && ! $seen{$gene_id}) { 162 161 $blast{$gene_id} = $fasta{$sid} || ''; 163 162 $seen{$gene_id}++; bin/maker_map_ids
r199 r270 44 44 my ($help, $prefix, $justify, $sort_order); 45 45 my $opt_success = GetOptions('help' => \$help, 46 'prefix '=> \$prefix,46 'prefix=s' => \$prefix, 47 47 'justify=s' => \$justify, 48 48 'sort_order=s' => \$sort_order, … … 134 134 sub sort_contigs { 135 135 my ($a, $b, $sort_map) = @_; 136 return ($sort_order->{$a} <=> $sort_map->{$b}) if $sort_order;136 return ($sort_order->{$a} <=> $sort_map->{$b}) if defined $sort_order; 137 137 return ($sort_order->{$b} <=> $sort_map->{$a}); 138 138 } bin/map_fasta_ids
r199 r270 48 48 if (/^>/) { 49 49 my ($old_id) = $_ =~ /^>(\S+)/; 50 my $new_id = $map{$old_id}; 51 s/^>$old_id/>$new_id/g if $new_id; 50 if (exists $map{$old_id}) { 51 my $new_id = $map{$old_id}; 52 s/^>$old_id/>$new_id/g; 53 } 54 else { 55 print STDERR "WARNING: No mapping available for $old_id\n"; 56 } 52 57 } 53 58 print $OUT $_;
