File: fasta2exp

package info (click to toggle)
staden 2.0.0%2Bb11-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 21,556 kB
  • sloc: ansic: 240,603; tcl: 65,360; cpp: 12,854; makefile: 11,201; sh: 2,952; fortran: 2,033; perl: 63; awk: 46
file content (30 lines) | stat: -rwxr-xr-x 351 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
22
23
24
25
26
27
28
29
30
#!/usr/bin/awk -f
BEGIN {
    file="";
}

/^;/ {
    next;
}

/^>/ {
    gsub(">", "");
    if (file != "") {
        print "//" >> file;
	close(file);
    }
    file=$1".exp";
    print "ID   "$1 > file;
    print "SQ" >> file;
    print "Creating", $1;
    next;
}

{
    print "     "$0 >> file;
}

END {
    print "//" >> file;
    close(file);
}