CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
grep

 



cmccabe1
Novice

Jan 28, 2014, 7:58 AM

Post #1 of 4 (906 views)
grep Can't Post

I am using:


Code
 grep -i -f panel_genes.txt hg19_refGene.txt > match.txt


and it seems to be pulling names the do not exist in the input file (panel_genes.txt) - the output is attached as well (match.txt)

For example, RNF185 or ZNF146. I am trying to mnatch the input file 104 genes only and am not sure why it is not. Thank you.
Attachments: match.txt (182 KB)
  panel_genes.txt (0.63 KB)


FishMonger
Veteran / Moderator

Jan 28, 2014, 9:15 AM

Post #2 of 4 (899 views)
Re: [cmccabe1] grep [In reply to] Can't Post

How is your question related to perl?

Is your grep statement being executed from a perl script?

What's in your hg19_refGene.txt file? Could that be where it's pulling the names in question?


cmccabe1
Novice

Jan 28, 2014, 9:31 AM

Post #3 of 4 (893 views)
Re: [FishMonger] grep [In reply to] Can't Post

I just run the grep command as is in cygwin and it has alsways worked before.

It is supposed to be using panel_genes.txt and matching to the hg19_refGene.txt.

For example, panel_genes.txt = PTPN11 and it pulls 2 matching PTPN11 records from hg19_refGene.txt. Thanks.


FishMonger
Veteran / Moderator

Jan 28, 2014, 10:03 AM

Post #4 of 4 (887 views)
Re: [cmccabe1] grep [In reply to] Can't Post

This is a perl forum but your question doesn't have anything to do with perl.

I don't know why the *nix grep function would extract lines that don't match the pattern.

You might get the answer from one of the shell scripting forums.


(This post was edited by FishMonger on Jan 28, 2014, 10:05 AM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives