samedi 29 novembre 2014

delete lines that sum to zero


I need to delete all lines in a file, if the values in all the columns are 0 (so if the sum of the row is 0).


My file is like this (13 columns and 60000 rows, tab delimited)



KO gene S10 S11 S12 S1 S2 S3 S4 S5 S6 S7 S8 S9
K02946 aap:NT05HA_2163 0 0 0 0 1 0 8 0 0 5 0 0
K06215 aar:Acear_1499 0 0 0 0 0 0 8 0 0 0 0 0
K00059 acd:AOLE_11635 0 0 5 0 0 0 0 0 8 0 0 0
K00991 afn:Acfer_0744 0 0 0 0 0 0 0 0 0 0 0 0
K01784 aha:AHA_2893 0 0 0 0 0 0 7 0 0 0 0 0
K01497 amd:AMED_3340 0 0 0 0 0 0 0 0 0 0 0 0


How can I do?



Aucun commentaire:

Enregistrer un commentaire