Search Results

Search: Posts Made By: mouchkam
5,860
Posted By mouchkam
Great! Learning slowly but surely. Thanks for...
Great! Learning slowly but surely. Thanks for all of your help!
5,860
Posted By mouchkam
awk '{n=0;for(i=2;i<=5;i++) if ($i+0!=0) n++}n'...
awk '{n=0;for(i=2;i<=5;i++) if ($i+0!=0) n++}n' FS=',' myFile

Just changed the format to .csv and the code worked great! Thanks for you patience!

One more question, if I want to put the...
5,860
Posted By mouchkam
When I run this code, it removes all rows with...
When I run this code, it removes all rows with any zeros in columns 2-5 (e.g. 0 0 1 1 or
0 1 1 1 get removed), not just rows for which there are zeros in every column (e.g. 0 0 0 0 ).
5,860
Posted By mouchkam
Okay...the data above was just made-up data to...
Okay...the data above was just made-up data to avoid the lengthy name of contigs. My data is in a tab delimited text file and looks as follows:
...
5,860
Posted By mouchkam
This is what I type: mep74-1:Desktop...
This is what I type:

mep74-1:Desktop morganmouchka$ awk '{n=0;for(i=2;i<=5;i++) if ($i+0!=0) n++}n' FS=',' AT_counts.txt

And nothing prints on the screen and it directs me to the next command...
5,860
Posted By mouchkam
When I run this script nothing seems to happen? ...
When I run this script nothing seems to happen? Is the output being directed somewhere? Sorry for my ignorance.
5,860
Posted By mouchkam
When I run this script (from rdrtx1), it seems to...
When I run this script (from rdrtx1), it seems to have taken out all of the rows that have any zeros and not just rows for which all four columns have zeros. Also, is there a way to print the data...
5,860
Posted By mouchkam
Deleting row if all column values are a particular string
Hello,

I have a very large file for which I would like to remove all rows for which the value of columns 2-5 is zero.

For instance I would like this file:
contig1, 0, 0, 0, 0
contig2, 1,...
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 10:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy