Home: Perl Programming Help: Beginner:
grep



cmccabe1
Novice

Jan 28, 2014, 7:58 AM


Views: 2331
grep

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


Views: 2324
Re: [cmccabe1] grep

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


Views: 2318
Re: [FishMonger] grep

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


Views: 2312
Re: [cmccabe1] grep

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)