Remove spaces from fasta file in python
I have downloaded Severe acute respiratory syndrome coronavirus 2 isolate FASTA sequence but when I tried to get the exact length and C and G count I got the wrong answer every time.
genome = open("C://Users//USER//Desktop/Corona.fasta") dna = genome.read() dna1 = dna.rstrip("n") print(len(dna1))
The exact length of the sequence is 29903 without a header 30018 but I don't understand why I am not getting 30018 although I am using strip function as well
Plz help me
• 215 views