``` bash
cd ../output/21.1-Apul-mRNA-lncRNA-correlation-PCC/

#lncRNAs per mRNA
awk -F, 'NR > 1 {pair[$1","$2]=1} END {
  for (p in pair) {
    split(p, a, ",")
    count[a[1]]++
  }
  for (k in count) print count[k]
}' sig_pairs.csv > lncRNAs_per_mRNA_counts.txt

# Mean
awk '{sum+=$1} END {print "Mean:", sum/NR}' lncRNAs_per_mRNA_counts.txt

# Range
sort -n lncRNAs_per_mRNA_counts.txt | awk 'NR==1{min=$1} {max=$1} END {print "Range:", min, max}'



# mRNAs per lncRNA
awk -F, 'NR > 1 {pair[$2","$1]=1} END {
  for (p in pair) {
    split(p, a, ",")
    count[a[1]]++
  }
  for (k in count) print count[k]
}' sig_pairs.csv > mRNAs_per_lncRNA_counts.txt

# Mean
awk '{sum+=$1} END {print "Mean:", sum/NR}' mRNAs_per_lncRNA_counts.txt

# Range
sort -n mRNAs_per_lncRNA_counts.txt | awk 'NR==1{min=$1} {max=$1} END {print "Range:", min, max}'

```

```
## Mean: 3515.26
## Range: 409 13731
## Mean: 3753.48
## Range: 646 7702
```