File: convseq.sh

package info (click to toggle)
squizz 0.99a-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,416 kB
  • sloc: sh: 11,616; ansic: 2,604; lex: 1,954; yacc: 1,564; makefile: 117
file content (76 lines) | stat: -rwxr-xr-x 2,011 bytes parent folder | download
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#! /bin/sh

## Verbose mode
test "x$VERBOSE" = xx && set -x

tmpseq=_convert.seq

## Sequence files location
seqdir=$srcdir/sequence
seqlist='embl.seq fasta.seq gcg.seq gde.seq genbank.seq genpept.seq ig.seq nbrf.seq pir.seq raw.seq refseqn.seq refseqp.seq'

## Checks EMBL-like sequence
for f in $seqlist; do
  ../src/squizz -c embl $seqdir/$f >$tmpseq 2>/dev/null
  (../src/squizz $tmpseq 2>&1 | grep -v EMBL) && exit 1
done

## Checks FASTA-like sequence/alignment
for f in $seqlist; do
  ../src/squizz -c fasta $seqdir/$f >$tmpseq 2>/dev/null
  (../src/squizz $tmpseq 2>&1 | grep -v FASTA) && exit 1
done

## Checks GCG-like sequence
for f in $seqlist; do
  ../src/squizz -c gcg $seqdir/$f >$tmpseq 2>/dev/null
  (../src/squizz $tmpseq 2>&1 | grep -v GCG) && exit 1
done

## Checks GDE-like sequence
for f in $seqlist; do
  ../src/squizz -c gde $seqdir/$f >$tmpseq 2>/dev/null
  (../src/squizz $tmpseq 2>&1 | grep -v GDE) && exit 1
done

## Checks GENBANK-like sequence
for f in $seqlist; do
  ../src/squizz -c genbank $seqdir/$f >$tmpseq 2>/dev/null
  (../src/squizz $tmpseq 2>&1 | grep -v GENBANK) && exit 1
done

## Checks IG-like sequence
for f in $seqlist; do
  ../src/squizz -c ig $seqdir/$f >$tmpseq 2>/dev/null
  (../src/squizz $tmpseq 2>&1 | grep -v IG) && exit 1
done

## Checks NBRF-like sequence
for f in $seqlist; do
  ../src/squizz -c nbrf $seqdir/$f >$tmpseq 2>/dev/null
  (../src/squizz $tmpseq 2>&1 | grep -v NBRF) && exit 1
done

## Checks PIR-like sequence
for f in $seqlist; do
  ../src/squizz -c pir $seqdir/$f >$tmpseq 2>/dev/null
  (../src/squizz $tmpseq 2>&1 | grep -v PIR) && exit 1
done

## Checks RAW-like sequence
for f in $seqlist; do
  ../src/squizz -c raw $seqdir/$f >$tmpseq 2>/dev/null
  (../src/squizz $tmpseq 2>&1 | grep -v RAW) && exit 1
done

## Checks SWISSPROT-like sequence
for f in $seqlist; do
  ../src/squizz -c swissprot $seqdir/$f >$tmpseq 2>/dev/null
  (../src/squizz $tmpseq 2>&1 | grep -v SWISSPROT) && exit 1
done

## Clean temp files
rm -f $tmpseq

exit 0