Cuffcompare protocol, error of sintax in awk command
1
0
Entering edit mode
9.2 years ago
tiago211287 ★ 1.5k

I am using Cuffcompare to identify novel and know transcripts from my cufflinks assemblies. In the paper from Nature protocols: http://www.nature.com/nprot/journal/v7/n3/full/nprot.2012.016.html there is a command in awk like this for: "printing a simple table for each assembly that lists how many transcripts in each assembly are complete matches to known transcripts".

$ for I in 'find . -name *.tmap'; do echo $i; awk 'NR  >  1 { s[$3] +  +  } END { \
                  for (j in s) { print j, s[j] }} ' $i; done;

Then, I get an error:

$ for I in 'find . -name *.tmap'; do echo $i; awk 'NR  >  1 { s[$3] +  +  } END {
for (j in s) { print j, s[j] }} ' $i; done;

find . -name *.tmap
awk: NR  >  1 { s[$3] +  +  } END {
awk:                        ^ syntax error

Unfortunately I don't know how to use awk and can't for my own know what can be causing this error. Maybe a different version of awk? Can someone help me?

$ awk --version
GNU Awk 3.1.7
Copyright (C) 1989, 1991-2009 Free Software Foundation.

Thank you for your support.

RNA-Seq cuffcompare awk • 1.9k views
ADD COMMENT
2
Entering edit mode
9.2 years ago
tiago211287 ★ 1.5k

Found the answer. The problem in awk was in the spaces here { s[$3] + + }, making it {s[$3]++}, solved.

ADD COMMENT

Login before adding your answer.

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