I want to retrieve the rows with uniq count(column 4) for every *ref gene(column 7) on the basis of strand(column8 ) and tss(column 5).
If a ref gene has same number of count and it is on negative strand then keep the row with its highest tss and likewise*
If a ref gene has same number of count and it is on positive strand then keep the row with its lowest tss
I am working on the dat of format:
I would expect this in the output:
So far I have this ,
]
I am not sure about the one in bold. It would be nice if you can help me solving this.*
Thanks for your time
Kirthi
Moderator's Comments:
Please use code tags next time for your code and data. Thanks
Last edited by BCW_123; 05-13-2014 at 02:16 PM..
Reason: code tags
I'm not quite sure what you want. 'On the basis of' doesn't tell us what basis, just that there is one involving certain columns. "unique count" in particular doesn't make sense -- the counts in your resulting output are not all unique.
Do you mean that if, for a particular refgene, if there are more than one with the same count, you want to keep the one with the lowest or highest tss depending on the last column +/- ?
I am sorry when I mean unique count(column 4) its for every refgene(column7).
So Sun2 should have unique count 2,1,and 4.
The way I would like to filter the duplicates is :
If a ref gene has same number of count and it is on negative strand then keep the row with its highest tss(column 5) and likewise*
If a ref gene has same number of count and it is on positive strand then keep the row with its lowest tss.
Hi,
I have a problem where i have to hit multiple URL that are stored in a text file (input.txt) and save their output in different text file (output.txt) somewhat like :
cat input.txt
http://192.168.21.20:8080/PPUPS/international?NUmber=917875446856... (3 Replies)
Hi,
I would like to ask if someone know how to test a files if exist the file is a nfs mount ufsdump archive file..
i used the test operator -f -a h almost all test operator but i failed
file1=ufs_root_image.dump
|| echo "files doesn't exist && exit 1
the false file1 is working but... (0 Replies)
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Hey guys,
I have this file generated by me... i want to create some HTML output from it.
The problem is that i am really confused about how do I go about reading the file.
The file is in the following format:
TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
I'm trying to write a script that will look in an /exports folder for the oldest export file and move it to a /staging folder. "Oldest" in this case is actually determined by date information embedded in the file names themselves.
Also, the script should only move a file from /exports to... (6 Replies)
Team I need help parsing a text file that meet the layout below:
high:850:856:214:855:810
med:852:304:310
low:315:240:323:310
I need to read each line and if for example a line start with high in in that same line there is a 850 or any other number then I wan to print it. The same ohld true... (4 Replies)