NR>1 and the NR<2{next} are just here to skip the heading line 'gene accession chr chr_st begin end' ... just feel free to remove it if there is no heading line in your files.
Select and display sum depending upon even columns
i have a input as :
2898 | homy | pune | 7/4/09
1 :6298 | anna | chennai | 7/4/08
2 :3728 | gonna | kol | 8/2/10
3 :3987 | hogja | mumbai | 8/5/09
4 :6187 | galma | london | 9/5/01
5 :9167 | tamina | ny | 8/3/10
6 :3981 | dastan | bagh |... (1 Reply)
I have a huge matrix file which looks like this (example matrix):
1 2 3 5
4 5 6 7
7 6 8 9
1 2 4 2
7 6 5 1
3 2 1 9
As one can see, this matrix has 4 columns and 6 rows. But my original matrix has some 3 million rows and 6000 columns.
For example, on this matrix I can define my task as... (2 Replies)
I have a file with 20 columns. I'd like to retain only the lines for which the values in at least x columns, looking only at columns 6-20, are above a threshold.
For example, I'd like to retain only the lines in the file below that have at least 8 columns (again, looking only at columns 6-20)... (3 Replies)
Hi , I want to compare first 3 columns of File A and File B and create a new file File C which will have all rows from File B and will include rows that are present in File A and not in File B based on First 3 column comparison.
Thanks in advance for your help.
File A
A,B,C,45,46... (2 Replies)
Hi,
I can select all the even columns from a file like this:
awk '{ for (i=1;i<=NF;i+=2) $i="" }1' file > new file
How can I select the 1st and all the even columns using awk? Thanks! (1 Reply)
I want to select 2nd, 3rd columns if line has "key3" and print rest of the lines as is.
# This is my sample input
key1="val1" key2="val2" key3="val3" key4="val4"
some text some text
some text some text
key1="val1" key2="val2" key3="val3" key4="val4"
some text some text
some text some... (3 Replies)