yes, sort the lengths and calculate N50, e.g.
the sum of all scaffolds is 1901, the biggest contig is 1000, so, in this case, your N50 is 1000, as this is more than 50% of the total contig size ...
For N90 you need to calculate accordingly ..
cheers,
Sven
