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

Uploaded
author fernando
date Thu, 22 May 2014 05:09:07 -0400
parents
children
line wrap: on
line source

#!/bin/bash
# -*- ENCODING: UTF-8 -*-
# fichero de entrada es salida.out
input=$1
output=$2
working_dir=$PWD
sift_output="$working_dir/sift_output.txt"

grep sp\| "$input" |head -n$3 |awk 'BEGIN {FS="|"};{print $2}' | awk 'BEGIN {FS="."};{print $1".fasta"}' >"$sift_output"
while read line
do 
   echo "wget http://www.uniprot.org/uniprot/$line" | sh
   cat $line >>"$output"
   rm "$line"
done < "$sift_output"