Hi, I have a text file with a long list of DNA sequences.
I would like to convert them all to the same length, with that length being the longest sequences. "D's" should be added to those sequences that are shorter.
Is there anyway to do this in R or Biophython, some script like:
1) Read sequences and find longest sequence
2) Loop through each sequence adding "D"s to match the length of the longest sequence
I was looking through the APE package in R as I imagine something must exist already to accomplish this.
Any help with be appreciated.
Is your file in fasta format? Not clear from your question.
No, the file is not yet in fasta format. Just a text document.