I have a file with around 20000 columns as gene names. I want to grep out the rpkm values for specific genes. Is there a way to grep out the column information?
sample gene17 gene92 gene1 ... gene20000
patient1 0.03569654 1.020565 0.0036522 ... 0.25247236
I only want gene72 for example, but it's not sorted in increasing order.
Thanks.
The solution worked perfectly. I might be sounding a bit greedy here, but is there a shorter way to this too?
A one-liner would be something like:
[not tested]
That didn't work. I'll just stick to the previous solution.
Thanks anyway.
I've got it. There are leading spaces in the output:
I've made a bash function for getting the header of a file which does the same:
I've put this in my .bashrc
You would use this as
ch myfile.txt | grep gene72