Calling Entrez Direct (perl) from a shell script
0
0
Entering edit mode
7.3 years ago
5heikki 10k

I have this line in a while read line loop:

lineage=$(esearch -query "$line" -db taxonomy | efetch -format xml | xtract -element Lineage)

The problem is that it returns lineage only for the first line and then kills the parent process. It's really killing me because like 1-2 months back I figured out how to circumvent this problem, but now I seem unable to find a solution. Perhaps some Biostar might help me with this? Nothing wrong with the input file or any other part of the script..

entrez • 1.5k views
ADD COMMENT
0
Entering edit mode

Ok so instead of while read line, this one works:

IFS=$'\n'
for next in `cat list`
do

done

I still don't understand why this happens though..

ADD REPLY

Login before adding your answer.

Traffic: 1766 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6