File: convseq.sh

package info (click to toggle)
squizz 0.99b%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,648 kB
  • ctags: 8,291
  • sloc: sh: 12,012; ansic: 2,607; lex: 1,944; yacc: 1,659; makefile: 119
file content (76 lines) | stat: -rwxr-xr-x 2,027 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='codata.seq embl.seq fasta.seq gcg.seq gde.seq genbank.seq genpept.seq ig.seq nbrf.seq raw.seq refseqn.seq refseqp.seq'

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

## 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 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