One-liners

From wiki
Revision as of 17:50, 13 March 2017 by Rf (talk | contribs) (Created page with " You have a genome coverage file in bedgraph format (final, fourth column is the coverage for a particular section) amd would like to find the max value: awk '{if($4>mxc) m...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


You have a genome coverage file in bedgraph format (final, fourth column is the coverage for a particular section) amd would like to find the max value:

awk '{if($4>mxc) mxc=$4} END {print mxc}' v30chronly_s.cov

A genome coverage file what is the average coverage per base?

awk '{tot=tot+$4/($3-$2); la=$3} END {print tot/la}' v30chronly_s.cov