SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Exonerate: filter low quality hits masterpiece RNA Sequencing 0 01-27-2013 07:17 PM
how to filter low quality reads ? StephaniePi83 Bioinformatics 14 11-28-2012 06:26 AM
filter low complexity with GATK matan8 Bioinformatics 0 02-27-2012 02:00 AM
Help:primer and low complexity sequence filter alvin1982 Illumina/Solexa 0 04-21-2010 07:05 PM
Low Pass Filter % bwking82 Illumina/Solexa 1 08-13-2009 02:23 AM

Reply
 
Thread Tools
Old 04-14-2014, 05:33 PM   #1
emolinari
Member
 
Location: New haven

Join Date: May 2013
Posts: 47
Default filter out low fpkm with unix

Hi guys!!!

I am terrible in unix scripting...but I have a feeling that is the only way to sort out my problem:

I want to filter out from my .gtf file from cufflinks those transcripts with a fpkm < 1.

I have tried
awk '($14>1)' transcripts.gtf > transcripts.b.gtf

but of course with no success...
$14 is the position of fpkm values
This is the first line of the .gtf file

1 Cufflinks transcript 53049 54936 1 + . gene_id "ENSG00000268020"; transcript_id "ENST00000594647"; FPKM "0.0000000000"; frac "0.000000"; conf_lo "0.000000"; conf_hi "0.000000"; cov "0.000000"; full_read_support "no";


Can anyone help???

thanks!
Manu
emolinari is offline   Reply With Quote
Old 04-14-2014, 07:53 PM   #2
vivek_
PhD Student
 
Location: Denmark

Join Date: Jul 2012
Posts: 164
Default

Try removing the quote marks before doing a numerical comparison.

Code:
awk '{gsub(/\"/,""); print}' transcripts.gtf  | awk '{if($14 > 1) print}'
vivek_ is offline   Reply With Quote
Old 04-14-2014, 08:13 PM   #3
emolinari
Member
 
Location: New haven

Join Date: May 2013
Posts: 47
Talking

Quote:
Originally Posted by vivek_ View Post
Try removing the quote marks before doing a numerical comparison.

Code:
awk '{gsub(/\"/,""); print}' transcripts.gtf  | awk '{if($14 > 1) print}'

Yayyyyy!!!

thanks Vivek! I also imagined it was an issue with quote marks...but I'd never imagined how to do it. That was extremely helpful...thanks indeed!!!


Manu
emolinari is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 09:10 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO