SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
5 um filter tube katinka RNA Sequencing 6 02-25-2014 02:02 AM
Filter PE reads together nr23 Illumina/Solexa 3 11-29-2012 03:03 AM
GATK filter zhangtao13039 Bioinformatics 0 11-08-2012 06:16 PM
QC Filter FLag: Chirag RNA Sequencing 5 08-16-2012 06:11 AM
DGE - filter or not filter masterpiece Bioinformatics 0 07-11-2011 08:55 PM

Reply
 
Thread Tools
Old 03-02-2015, 03:58 PM   #1
Pol8
Member
 
Location: USA

Join Date: Aug 2014
Posts: 33
Default filter above value

Hi,

I have a 3 columns file (conting name, lenght, number of reads).

How can I select the only contigs that are at least 500nt in lenght and that have at least 1000 reads mapping?

Is there a command to do that, even in different steps?

Thanks
Pol8 is offline   Reply With Quote
Old 03-02-2015, 05:10 PM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,077
Default

If your file is tab separated following will work. If you have some other field separator then change \t accordingly. Following assumes that you only have numbers in columns 2 and 3.

Code:
$ awk -F'\t' '{ if ($2 >= 500 && $3 >= 1000) print $0}' your_file
If above does not work then post a small sample of your file.
GenoMax is offline   Reply With Quote
Old 03-03-2015, 05:10 AM   #3
Pol8
Member
 
Location: USA

Join Date: Aug 2014
Posts: 33
Default

It works perfect!
Pol8 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:34 AM.


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