Matrix generation + Sequence files read/write