I was looking through my created fasta files and realized that the number of bases are consistently 6 above the number that it should be according to the coordinates. I am not a strong scripter so how would I remove the last 6 bases from every sequence in my fasta file? Note: each line in the sequence is on a new line so I can't just remove 6 from the end of every other, I would need to iterate through it as a fasta file format.
>gene1 CACTGATTTGAGTTTTTTTCATAAATCAGAAACCGTTTGAATTATAAAAA AAAAAACCTCACACAGCTCAAACTCAACCTCTGAAAAATAACCCCCAAAG TGTAGCACTTCTAGCCCAATTCTTTAAACTTTGGTTGAAGGCTTCTGCAT AGAGACGCGGGAAAGACAGTTTTACTGTTTAGCACTCTATGGAGCAACAT CTGTAGCAACACTACTGGGGGGCCAGCGCGAGTATATGGACACAAAACAT CATGTAGTGTAGGATTTCTGAATAGCAATACACCCTTTGTGGTGATGTAA CAATAAAGGAAAGGGCATATTTTTGATGATCATGAGGTGTAGCCCCT
I would like to remove "GCCCCT" from the end. This is a multifasta file so there are hundreds of similar cases within the same fasta file. Thank you!