Debian Codegraph @

find-in-gene

raw symbols SCIP
1 #!/bin/bash -norc
2
3 # Public domain notice for all NCBI EDirect scripts is located at:
4 # https://www.ncbi.nlm.nih.gov/books/NBK179288/#chapter6.Public_Domain_Notice
5
6 if [ $# -lt 2 ]
7 then
8 echo "Insufficient arguments - must have start and stop position" >&2
9 exit 1
10 fi
11
12 std="$1"
13 min="$2"
14 max="$3"
15 len="$4"
16
17 if [ "$min" -gt "$max" ]
18 then
19 swp="$min"
20 min="$max"
21 max="$swp"
22 fi
23
24 xtract -pattern GENE \
25 -if Strand -equals "$std" -and Min -lt "$max" -and Max -gt "$min" \
26 -element Name