annotate interpro/paso2.sh @ 0:c342ebb50f0b draft default tip

Uploaded
author fernando
date Thu, 22 May 2014 05:09:07 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c342ebb50f0b Uploaded
fernando
parents:
diff changeset
1 #!/bin/bash
c342ebb50f0b Uploaded
fernando
parents:
diff changeset
2 # -*- ENCODING: UTF-8 -*-
c342ebb50f0b Uploaded
fernando
parents:
diff changeset
3 # fichero de entrada es salida.out
c342ebb50f0b Uploaded
fernando
parents:
diff changeset
4 input=$1
c342ebb50f0b Uploaded
fernando
parents:
diff changeset
5 output=$2
c342ebb50f0b Uploaded
fernando
parents:
diff changeset
6 working_dir=$PWD
c342ebb50f0b Uploaded
fernando
parents:
diff changeset
7 sift_output="$working_dir/sift_output.txt"
c342ebb50f0b Uploaded
fernando
parents:
diff changeset
8
c342ebb50f0b Uploaded
fernando
parents:
diff changeset
9 grep sp\| "$input" |head -n$3 |awk 'BEGIN {FS="|"};{print $2}' | awk 'BEGIN {FS="."};{print $1".fasta"}' >"$sift_output"
c342ebb50f0b Uploaded
fernando
parents:
diff changeset
10 while read line
c342ebb50f0b Uploaded
fernando
parents:
diff changeset
11 do
c342ebb50f0b Uploaded
fernando
parents:
diff changeset
12 echo "wget http://www.uniprot.org/uniprot/$line" | sh
c342ebb50f0b Uploaded
fernando
parents:
diff changeset
13 cat $line >>"$output"
c342ebb50f0b Uploaded
fernando
parents:
diff changeset
14 rm "$line"
c342ebb50f0b Uploaded
fernando
parents:
diff changeset
15 done < "$sift_output"