1
$\begingroup$
>003197.2:c1179912-1178219_reverse_complement
AGGCTTTTAAAAGCCTCCTGGGTTTTTAGTGAAGCTGAGTGATAGAAGCTCTGTATTTGCATAGCGTTTT
GTCGGGCGCTTTAGCCGGCGCTTTGCCCTGGCCTGAGAGAATCTGCATTCCGTTGTATAAGGTTTTTTGT
CCTTCTGATGCTGTAGATAATTCCCCCATGTCGCGCCGGGTTCTCGCAGGACAATAATTTCCGGGCGAGC
AGAACGGTTGCCGCGACGGTAAGAAGATCGCGCTGTAAGTTATAGAGGTTATGCAGCGAGTGGTTAGACG
CCGGTCCGCTTTAACTTTGGCTAACTCCATTTGGTTTGCCATTGACGTTAGAACCGGGTCTTGTTTACCC
GTGCTGCAATAAGTTCGATAAGATTTTTCTTCAATGCTTTTGCCGCGGCTTCTTCTTGTTTTGTTGCTGG
GCATCTCTAAACGCTACTGCCGCAAAGCGATGAGCTTCTTTTGCAGGTAAGCCATCCTGCTGCTGAGTGC
GTGATGCCCGTTATGCGTGAGTGTATTTTTTATGGTTTGCCAGGGCTGGTTATTAAGCTGCTTGACCTGA
CATAAGCACTGGGAAAGATATCTTTTGCGCCGATTTTCATCTCTGCTGCAGGGAGCTGCGTGTTGGTATA
ACCGTGGACATCCACAAATTATTGGCGTGATGAATATTCTTGGTATCCCAACTGCATACGCCCTTTCCCT
ATAGGGGGAAAGCACGCCATGACGTATCCCGCAAAAAAGCGTTTTATCTTTACCGTCCTCATGCACACTC
GTGCCGCAGTTAATACTTCTTTGGCTTTGTTTTCAGCGCCGACGTGACGCAGAAGCGGATCTTTTTCATG
ACGGATACCAGTTTCAGGCTTACCGCCTCGCCCGCTAAGGCTTTGTTAAGCAACTCAGGTTTACTAAAAA
CCATGCGCGCATTTGGTCCTCGACCATCGTTCCCTCTTTGCCGAAAATATTCGACGCGGTGAGTAACCCG
CCGTCTGTAGATCGCCATCTTTATTGCGGATTTTTAAATGAATCATTTTTCCCGGCTGGGTCAACGATTG
CCAAAGCCGAGCTTGAGCGCCAGCTCATTAACACCCACATTAAATGCGGCGACGTCCGGTTTTATTTTTA
TTCAGGGCGTAAATCATTGCCTAATAACTGATGTAGCGCCTCGGCATTATAGCTATCCGATGCCTTAAGG
ATGTATTGACGACCTCATAATTATCCGGGTATTGCGCCAGCCATTCGCCAACCCAGCCACCTGGTCTGGC
AGTTTATAGGGTTCGCCGCCATCTTTATGATGTTGGTTATTTTTCCATATATCCTTAATCTGGCGCGCTA
TTTGCCGCTTTTACAATTCCAGGCGGGTACCGCGTCAATTTCATGGGCTAACATGGCAAGGCGTTGTGCG
TTAACATATGGGTCTGATGTAAGGAAATGATCTCTCGCTTGATTTCTGAATCCATCATCCCTGTACGATC
TTACCGCTATTCAGTAATACTTTTTGGAAAATTTTCTGTCCACCGCTATCCGGAAGACTACCAGGCGCAC
CACCTCTGGCGATAAATTTTTCATTACTTTGTTTCCCGCCCCGCCCGTATTTTGTTTCTGAATCTCCAGG
ATGAAGAAATGCCTTTTACTGACTGCCAAATATTTTCATCCCCAACTCGTTTTTGATAGGAAAGATTGAG
TCAAGATGTGATTA
>003197.2:c3026750-3024686_reverse_complement
TTTGATCTCGGTCTGCATACCTGGCATTATGACGGGGGGCTGAGTCCTTACACTTGTAACCATTATTAAT
CCCCTGACAGCGTCGCTGTGGCACTTTCTCTGACTGCGGAAAGATTCGCCGCAAGATTCGTGGCCTGCGT
TTAAACAATGCATCCAGACTCGCCTGTTTGATCAGCGCGGGAAAATCTTCCAGTTGCGGGCCTTTAATTT
CGCTTTCTTACCGGCGACATTATTTGAATTGGTAAAAACTTCTTTTAACGCCTCAGCGTCTTTCCCGCAT
GCGTCTTCGCCTCAGGAGAATCACTGGTGGCGTTGAGCGCTGAACGAAAGAGCCCGGCAAACTCCATTAT
AAAGCTGACTTTTCTTTCAGGCCATCTTTTATGATTTGCGCGGTATACTCTGCCCCCACCTTCATCAGTA
ATCTAACAGCTGCTTTTCCAGGTTTTCCAGCTTCGCTTCCGCTTTCTTTGTTTCTGGCAGCCATGGCCCA
GCATCACCTCCTGCATAACAAGATTCGTCGATAATTTACTTAATTCACCGCCAGTGTTATTTTTGATAAT
GTAAGATTGCTGCGGGTTAACGGATCTAACGTACAGCCAAAGTTATGTTCAATGCAGCTGGCAATATAGG
TTGCGTTAATTTTTGGTGGCACATATCAAGCGCCTCAACAGCCTTCGCCGCCGCTTTGTCAACAAGGTGC
GTAGCAGCAGGGGTATCAACGTTTGCATTTCAAGGTGCCGGGCTTCCCGTCCTACGCTGGTACCCTGCTC
GGTCCAGCCGCAGGCTCCGGAATTTTAGGGTCAGGCAGTTTATCTGCAGGAATTTGTGCAAAAACATTAC
GTTACTGCTATCAATATTAATATTGATATTAATACCCGTAGGTTCTGCTTTTTTCCCACCATCAGGTACT
CGATATGGCGCTGGCTATTATCGACATGGCTTCGGCTATTGTTAATATGCTTACTGTTATCCACGCTATG
CGTTGGCTGTTATCAATAAATGTTCGGCTATTATCAATCGTCTTCCGGCTATTATCATGGTTGCTATTAT
AGTCGAATCCACACGCGAATGACTATGACTTACGTTGCTGCTGTTAGTCGAATGGTGTGACTCGCCATTG
CAATTTTACCCGCGATGCCATGGTCAATTGCCCCTGTGCTGGCGCTGTGTGCCGTCTCCGTTTGATGCGT
ACCACCTTTCCATCTTTACTTTCGGATGAAGCGTTGGTCACAGCCTCTGCCGTCGCATGAGCCGTGACGT
GCTCTTGCTGGTTACGCCATCGACTTCATCAAAAGAGGTTGTTTCACCCGTAGTGCCCTTTTCTGACGTG
CTGCCGTCTGGCTTTGCTGTTTATTATCATCAACGCCGTGCACCGTGGCCTGTACCGGCTTGCCGATAAT
TGTAAGGTATCGGTTTTAACATTCTCGACGCCAGCCAGTTGACTGGCAAGCGGCTTCACATTCACAATCT
CTTATCTGTCTGACTATTATCATTATCGGTCGTACCGGCTTTATTACCTGTAATTACCGTCGTGTCTGAT
TATTCGTAACGCTCGGTACTGTTGAGAGGAAACTATTTTGCTTAAACTTCAAACCAGAAAATGGGCCAGT
GTATCTGGCTCCAGGGCTTTACGTATCACACCCAAAAACGTCTCACGGGCGTCGAAATGCATTGAATGCA
TATCGTGTCATTGGGTAATATTTCCGCACGCAAGCCGTCAAACGCTCTGCGTACAGGGAACGGTGTGGAG
TCTCCATTTTCGCTTTCAATTCTGGGTGCTTGTCAATATCGCTACATTGCGCTTTCAACGCTGCACTCTT
CTGGCAAACTGCAGTGCAATCTCAGCCAGTTTTTCTTTTTGTGGATGATGAGTAATGACCTCTTTGAGAG
GATAAGGCCGTCCAGCACATTACTTAACACATAGTCAGTTTCCCCTTTTAGCCTGGTCAGCCCCGCCTCT
TAACCCGATCCACGCCAGGTTTATTCAGGTATGACTCGTAAGCCGGGCCAGCTCGCCAGCTACCGTCTCC
TTAACGCTGCATGTGCAAGCCATCAACGGTAGTAA
>003197.2:c3010816-3009905_reverse_complement
TATTACGAGTCGTAGGACTTAGCATACTTTTCCCTCCACATGATAGCTCCTGCACCGAAAATATCATCTT
ACAATACAGGTCAATGCTTCGGTGTTTAGCTCCCCGCTGACGTCAGGCTGAGGCGATAAACTCGCCCCCA
TTCGAGATCGGTTTCCTCGTAACTGATATGAATCCAGCTGCCATCTATAATTTCACTTTCCAGACGCTCA
CTGACATAACAAATTTAAGATTTAACTCTGGATACTTCTTATTGGCCTGTGCAACAAGAAAAGGCATCAT
TTTACGAGAAATCGGGCAGATTCAACGCCTTCCATTCTGGTCTCCTTTATAGAGGAAACAAGCTCATGGA
AATCACCGATGTCTTTCCGTCCATAACTCTAAAATCGACGACTGAAATATGGATACCTGAACTTCCCATA
CAAGAGCTGCTTTGGTCCTCAACGCCAGTAAAGCAGGTCCAAAAGCGCTACACGCTGCTGGTTCGAACAA
CATTCAGAAGAGCTTCGTTGAATGTCCAGCTCGACCATAGCAAAATAACAATCAGGCAGTTGTTCACGTT
TTCATGAATTTTTACTAAGTTCATAAATTCAAGCTGAAGTTTTTTGGCGAGCGCCAGGCTAAAAATACCG
GCAGATAGCGGTCTGCTTTATCGGACGGGAGAAAAGGTTCTTCACCACACAGACGTTCACAAATATTATC
GCCGCCGGATTGGCCTCCACATATTCATTTAATCGTTGTGCGCCTTGAGTATGTTTGTAAAAACTCACCG
TAGCATAACGGCATTGTTATCGAATCGCTCATAAAGCGTTTCATTCTTTTTGTTTACTATACTGCTTCCC
ACGGTTTAAGTAAAGACTTATATTCAGCTATCCTTTTTTTATGAGCGGATATAGAGAGTTTTTTATCGTT
TT
>003277.2:c27903-27178_reverse_complement
CCCCATCATAAGCAGCTACAATATTCAAAGGAGGGATGTTTAGATTTAGATTAGGCCTATTTATGGGCAT
ATCTTCCGCATTTGGTTGTGCAAGGAGTTGAAATTATTTTTCAGGTGCTTATTTGTAGATGGTATTTCCG
AAAGAAACCACTCTGGCGCATCCCTGAATAGTCAGGCACATCCAGCGCCTCTTTAAAGTGGGATACCGGC
GTGATTCTCGACGAGCATGGATGAAAACATCGTAACCATGGTTATTCAGCTGAAAACCTTGGCTCATAGC
GCTTGTGGCACCATATCCCTGAGCACACTGATGTGGAACTTGTCACCGGCAAATTTGCCCTGAGACTGAG
CATATCGGTCACTTTCCACTTATCTACCGGACTGTCCTCTGAAAACAGCAATCCGGACAGCGCTTGAAAT
CCTGGTCTGGTTTTATATACAACGTGAACTGAGCGCCCAGGCTAACACGGGCTTGTTGAACGACCTTCTC
AGTCTGGATTCCAGACACTCTATAAATTGCCGTGTCTTGTGGAGAAACGACGCACTGTACTGCGAATTTT
GAGATATTTCCAATTTTCAGGATGAACGTCTGACTCAGGACACTGTCCTGAAATAACCCCATTTTCGGAT
GTTCCTCACGTAAAGCCTGTCTCTGCATTTCGCCACCATCACGCCCACTTCGTAGTTCATTACGATAACT
TTACTCTGTCATCAAACGATAAAACG
$\endgroup$
3
  • $\begingroup$ Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. $\endgroup$
    – Community Bot
    Jun 10, 2023 at 16:20
  • $\begingroup$ Welcome to the site @tonu. Please make your question clear within the question. Finally, what coding are you happy with, bash(shell), R, Python, Perl, awk etc ...? $\endgroup$
    – M__
    Jun 10, 2023 at 16:24
  • $\begingroup$ @Tonu this has been correctly answered could you please consider upvoting/accepting? $\endgroup$
    – M__
    Sep 15, 2023 at 16:04

1 Answer 1

1
$\begingroup$

Since you tag python, I suggest a simple Biopython solution:

from Bio import SeqIO

print(sum(s.seq.count("TAA") for s in SeqIO.parse("file.fa", "fasta")))
# 97 on your input file

If you wanted an overlapping sequence count, Biopython has a method for this too:

print(sum(s.seq.count_overlap("TAA") for s in SeqIO.parse("file.fa", "fasta")))

Here they are the same, but for a string like "TAT" they could be different:

>>> from Bio.Seq import Seq
>>> Seq("TATAT").count("TAT")
1
>>> Seq("TATAT").count_overlap("TAT")
2
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.