Entering edit mode
6.2 years ago
bk11
★
3.0k
Hi
I have several thousand lines sheet with columns like this:
Count Cell_Types FPKM transcript_name
1 alternatively activated macrophage 0.02 AP002954.3
2 alternatively activated macrophage 0 AP002954.3
3 alternatively activated macrophage 0.02 AP002954.3
4 alternatively activated macrophage 0.03 AP002954.3
5 alternatively activated macrophage 0.01 AP002954.3
6 alternatively activated macrophage 0.04 AP002954.3
7 alternatively activated macrophage 0 AP002954.3
272 alternatively activated macrophage 62.54 ARCN1
273 alternatively activated macrophage 63.81 ARCN1
274 alternatively activated macrophage 59.45 ARCN1
275 alternatively activated macrophage 60.11 ARCN1
276 alternatively activated macrophage 65.07 ARCN1
277 alternatively activated macrophage 61.61 ARCN1
278 alternatively activated macrophage 46.62 ARCN1
542 alternatively activated macrophage 199.45 ATP5L
543 alternatively activated macrophage 212.03 ATP5L
544 alternatively activated macrophage 195.81 ATP5L
545 alternatively activated macrophage 266.32 ATP5L
546 alternatively activated macrophage 218.48 ATP5L
547 alternatively activated macrophage 216 ATP5L
548 alternatively activated macrophage 227.52 ATP5L
I want to take average of FPKM for individual transcript_names from individual Cell_types and get result like this:
Count Cell_Types Average_FPKM transcript_name
1 alternatively activated macrophage 0.017 AP002954.3
2 alternatively activated macrophage 59.887 ARCN1
3 alternatively activated macrophage 219.372 ATP5L
I will appreciate any help. Thanks.
with datamash:
with tsv-utils: