Hi. I am an amateur undergraduate computational biologist so please cut me some slack
I have a BED file with five columns, and the fifth column has some field with blank values. So when I intersect it with another file, it shows an error. What command(s) should I write to find and replace the blank values in the fifth column and replace it with something else?
Thanks a lot!
Hi. I have to modify my question. Whenever I search a blank field, can I write a command to delete that line containing the blank field?
Even if I replace it with 0 or XX, can I delete that line?That was actually the main purpose. I may have thousands of lines that have blank fields and I need to delete them all. Can it be done in one line or first I replace them with 0 or XX and then run some command to delete the line containing that string? If so, what is that 'sed' command? Can i replace 0 with sed in that loop?
Here is the solution.
Remove lines from tab-delimited file with missing values
And please utilise
ADD COMMENT
function to add your comments instead of usingAdd your answer
box.Ah so you modified the question then. You do not need to move to 0 for deleting the row. Simple grep that identifies a cell with space removes it. Venu shows the correct one. Please keep your questions targetted as to what you want to do and what you have tried.