download ncRNA sequences form NCBI

#!/bin/bash
usage()
{
        echo;echo "Usage: ./`basename $0` [gi number list] [number of cpu]";echo
}

[ $# -eq 0 ] && usage && exit 0

mkdir tmp
gi=$(readlink -f $1)

for i in $(cat $gi)
do
echo "curl \"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=${i}&rettype=fasta\" > tmp/ncRNA_$i.fa" >> sequence.gi_download.command
done

ParaFly -c sequence.gi_download.command -CPU $2

posted @ 2016-09-11 10:11  liuhui_pine  阅读(170)  评论(0编辑  收藏  举报