Extracting column if above certain values and repeated over a number of times continuously
Hi
I am new to the forum and would like to ask:
i have a file in form with thousands of column
and thousnds rows.....
Except for the header 2 rows, i would like to extract the part of the column (together with the header 2 row and first index column)
if
the value of the column is above say 0.35
and is continuous in the same column for say 50 rows
One step further is to see if it is possible to allow for a certain number of interruption, say 50 rows with at most 2 rows have value lower than set
Thanks for suggesting command to solve this
Last edited by vbe; 09-22-2010 at 01:56 PM..
Reason: use code tags, it will keep the format...
Thank you very much.
The script did not work and returned with
"cut: invalid byte, character or field list"
I run the script on Centos 5.4
newbeeuk
---------- Post updated at 07:43 AM ---------- Previous update was at 05:29 AM ----------
I may not have explained clearly in my first post
Here is the another file for illustration, first 2 rows and first columns are identifier
I want everything that is greater than k (now assume >0.5)
and is continuous in that particular column for more than j rows (now assume>=3)
than I would like the output in 1 or multiple files in form of
first segment from column 3
second segment from column 4
third segment also from column 5, split by 1 row with value < 0.5
and the last from column 6
none is coming from column 4 because all are alphabets and none from column 2 becasuse no continuous 3 row with value > 0.5
Thanks for help
newbeeuk
Last edited by Franklin52; 09-23-2010 at 10:02 AM..
Reason: Please use code tags!
Dear All,
I have to solve the following problems with multiple tab-separated text file but I don't know how. Any help would be greatly appreciated. I have access to Linux mint (but not as a professional).
I have multiple tab-delimited files with the following structure:
file1:
1 44
2 ... (5 Replies)
Hi folks,
Iam working on a bash script, i need to print how many times column 2 repeated at the end of each line.
Input.txt
COL1 COL2 COL3 COL4
1 XX 45 N
2 YY 34 y
3 ZZ 44 N
4 XX 89 Y
5 XX 45 N
6 YY 84 D
7 ZZ 22 S
Output.txt
COL1 COL2 COL3 COL4 COL5
1 XX 45 N 3
2 YY 34... (6 Replies)
Hi Folks,
I have the below feed file named abc1.txt in which you can see there is a title and below is the respective values in the rows and it is completely pipe delimited file ,.
... (4 Replies)
1. The problem statement, all variables and given/known data:
Develop a shell script that accepts a phrase and counts the number of times that it is repeated in a specific website.
Note: Im not sure if it's the whole website, or just a specific page but im guessing its thewhole website.
... (2 Replies)
Hello, I was looking for a way to select between the repeated entries (column1) based on the values of absolute values of column 3 (larger value). For example if the same gene id has FC value -2 and 1, I should get the output as -2. Kindly help.
GeneID Description FC ... (2 Replies)
Hi all,
I am new to shell script.I need your help to write a shell script.
I need to write a shell script to extract data from a .csv file where columns are ',' separated.
The file has 5 columns having values say column 1,column 2.....column 5 as below along with their valuesm.... (3 Replies)
I have a space delimited text file. I want to extract rows where the third column has 0 as a value and write those rows into a new space delimited text file. How do I go about doing that? Thanks! (2 Replies)
I have a text file where the second column is a list of numbers going from small to large. I want to extract the rows where the second column is smaller than or equal to 0.0001.
My input:
rs10082730 9e-08 12 46002702
rs2544081 1e-07 12 46015487
rs1425136 1e-06 7 35396742
rs2712590... (1 Reply)
Hi,
I need the total of how many times the pattern is being repeated in a particular file.
I tried with grep as below, but no go.
grep -c best sample
Contents of Sample file:
-----------------------
This is the best site I have never come across. The best one indeed.
Very best... (8 Replies)
need a script to determine daily how many times does the below repeated sequence exist in a log file, and if it shows failure to connect in the same file
200 PORT Command successful.
150 Opening BINARY mode data connection for rgr016.daily.0305.
226 Transfer complete.
local: rgr016.daily.0306... (3 Replies)