Trying to filter blast results
1
0
Entering edit mode
3.8 years ago

Hi, I'm trying to filter my blast results but I keep getting an error.

awk: 1: unexpected character '.'

I thought it wwas the files name so I changed the points to underscores:

L_brevis_NG-45673_blastVF1_2.txt

But I keep getting the same error. This is the command I'm running:

for file in *.txt; do echo $file; awk '{alg = $4/($8-$7)}{size = ($10-$9)/($8-$7)}(size>=0.75 && size<=1.5 && alg>0.6){print $1, $2, $3}' | awk '{id = $1; getline} ($1!=id){print $0}'$file >> $file.filtered; done
filters commandline blastresults • 768 views
ADD COMMENT
1
Entering edit mode
3.8 years ago
5heikki 11k

The first awk isn't even getting any input. Perhaps you want to use your $file as input for it by typing $file after the command? .. awk '{whatever}' "$file" | awk '{whatever}' .. BTW you should always quote your bash variables..

ADD COMMENT
0
Entering edit mode

Thank you very much for your help, it worked fine after fixing it.

ADD REPLY

Login before adding your answer.

Traffic: 2492 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