This python script does the N50 calculation on a text file with a list of contigs.
Note current version uses an a text file in the input form as:
CONTIG
47
142
192
350
48
613
739
335
288
512
754
878
984
921
72
350
597
and can parse through the numbers of the contigs. For dynamic file parsing must be implemented.