vendredi 24 août 2018

replace in a text file the string "NNNNN" by a different random string in each line

I have a text file like this:

.....
GGCCAAGGTCTGACAACCCTAGGGCTTCAGCTTCCCGATATCCGACGGTAGTGTNNNNNAAAGCCTCAGAAAAAACG
GTGGGGCTCTCAAAGTGACTTTGTTAAAACTTCAGCTTCCCGATATCCGACGGTAGTGTNNNNNTGTTTTTGTTCCTCCT
GGGAGCAATACAACAGGTTCAATGGGTGCTTCAGCTTCCCGATATCCGACGGTAGTGTNNNNNAACACATGACACACTCA
CAGCCTCTGAGGAACCGCACCAGTCTTCAGCTTCCCGATATCCGACGGTAGTGTNNNNNGTGGCTTTTTGGTGTTTG
GTTTGTAGAGTGGGGTGGGCTTCAGTCGCTTCAGCTTCCCGATATCCGACGGTAGTGTNNNNNTCTTTATTTCTCTCCC
GCTGAGCTCAGTGGCTCACACCTGTAATCTTCAGCTTCCCGATATCCGACGGTAGTGTNNNNNAATCACATGCCACACA
GCCGTGCTGGAAGCCTTTGTCTATGACCTTCAGCTTCCCGATATCCGACGGTAGTGTNNNNNCTTTGGGTGGAGAGTT
.....

I need to replace every NNNNN by a different random string of five characters (using only A, C, T or G letters)

Thank you!




Aucun commentaire:

Enregistrer un commentaire