This is a test version of Biostars. For the public version, visit https://www.biostars.org.
grouping the genes based on the length of coding sequence

I have a list of genes with coding sequence length. I want to group them into 10 groups. do you know what the best way is to do so?

sequencing

1 answer

if your data is:

gene1(tab)length
gene2(tab)length
(...)
geneN(tab)length

I would try:

sort -t $'\t' -k2,2n data.tsv | split -l ` awk 'END {print  NR/10}' data.tsv `  - OUT

Pierre always give us shell magic :)

Log in to answer this question.