File: augustus2gbrowse.pl

package info (click to toggle)
augustus 3.4.0%2Bdfsg2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 758,480 kB
  • sloc: cpp: 65,451; perl: 21,436; python: 3,927; ansic: 1,240; makefile: 1,032; sh: 189; javascript: 32
file content (21 lines) | stat: -rwxr-xr-x 389 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl
# convert AUGUSTUS output to Gbrowse format GFF file
# Mario Stanke

@input = <STDIN>;


foreach(@input){
    next unless (/\tAUGUSTUS\t/);
    if (/\tgene\t/){
	s/\t(\S+)$/\tGene \1/;
    }
	
    s/\ttranscript\t/\tmRNA\t/;
    if (/\tmRNA\t/){
	s/\t(\S+)\.(\w+)$/\tmRNA \1.\2 ; Gene \1/;
    } else {
	s/transcript_id "(.*)"; gene_id "(.*)";/mRNA \1/;
    }
    print;
}