Question: (Closed) Cuffcompare protocol, error of sintax in awk command
0
gravatar for tiago211287
3.6 years ago by
tiago2112871.1k
USA
tiago2112871.1k wrote:

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 dont know how to use awk and can't for my own know what can be causing this error. Maybe a differente 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.

 

 

awk rna-seq cuffcompare • 1.0k views
ADD COMMENTlink modified 3.5 years ago by Biostar ♦♦ 20 • written 3.6 years ago by tiago2112871.1k
1

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

ADD REPLYlink written 3.6 years ago by tiago2112871.1k

Hello tiago211287!

We believe that this post does not fit the main topic of this site.

closing as it was answered

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

ADD REPLYlink written 3.5 years ago by Pierre Lindenbaum118k
Please log in to add an answer.
The thread is closed. No new answers may be added.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1880 users visited in the last hour