This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Calling Entrez Direct (perl) from a shell script

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

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..

0 answers

No answers yet.

Log in to answer this question.