Question: Removal of primers from matched sequences
0
gravatar for adrian18_07
6 days ago by
adrian18_070 wrote:

I have a list of two matched sequences:

[[('---------------C----C---GT----GTR-GGK---AC-TGM-GGA-GGW--CATTGTCGAA-CATGCCCGACAGAGCGACCCGCGAACACGTTACAAACACTACGCGGGGTGGCCCCGGCTGCCTCGCGCGGAGGTGCTGCGGCTGAGTGCGCAAACTAGCTGCGCGCACGCTGTCCGTGCCACCTCCACTAACAGAACCCCGGCGCGGACTGCGCCAAGGAATAAAAAACGAATGAGAGCGAGCGCGCCCCCCTCGCCCCGGAGACGGTGCGCGATGGTGTGTGCCTCGCTGTCCATTGATAAACTAAACGACTCTCGGCAACGGATATCTCGGCTCTCGCATCGATGAARAACGTAGCGAAATGCGATACTTGGTGTGAATTGCARAATCCCGTGAATCATCGAGTCTTTGAACGCAAGTTGCGCCCGAAGCCTTCTGGCCGAGGGCACGTCTGCCTGGGTGTCACGCAACGTCGCCGCCAACCCCACCCCTAGGGGCGGGAAGTTGGGGGCGGACTCTGGCCTCCCGTGCGCCTCGGCGCGCGGATGGCCTAAATTTCAGCTCCTGGCGAGGATCGCCACGACAAGCGGTGGTTTTTTGAACTAAGGACCTCGGGTGTTGTCGTGCGGCCTCCCGGAGGGAACGGACCCTGTGCGCTCGCGCACCATCCTATCGAGACCCCAGGTCAGTCGG--GAACACC-CGCTGAATTTAAGCATATCAATAAGCGGAGG', 'GGKAARKWAAAAAGTCGTAACAAGGTTTCCGT-AGG-TGAACCTG-CGGAAGG-ATCATTGTCGAAACATGCCCGACAGAGCGACCCGCGAACACGTTACAAACACTACGCGGGGTGGCCCCGGCTGCCTCGCGCGGAGGTGCTGCGGCTGAGTGCGCAAACTAGCTGCGCGCACGCTGTCCGTGCCACCTCCACTAACAGAACCCCGGCGCGGACTGCGCCAAGGAATAAAAAACGAATGAGAGCGAGCGCGCCCCCCTCGCCCCGGAGACGGTGCGCGATGGTGTGTGCCTCGCTGTCCATTGATAAACTAAACGACTCTCGGCAACGGATATCTCGGCTCTCGCATCGATGAAGAACGTAGCGAAATGCGATACTTGGTGTGAATTGCAGAATCCCGTGAATCATCGAGTCTTTGAACGCAAGTTGCGCCCGAAGCCTTCTGGCCGAGGGCACGTCTGCCTGGGTGTCACGCAACGTCGCCGCCAACCCCACCCCTAGGGGCGGGAAGTTGGGGGCGGACTCTGGCCTCCCGTGCGCCTCGGCGCGCGGATGGCCTAAATTTCAGCTCCTGGCGAGGATCGCCACGACAAGCGGTGGTTTTTTGAACTAAGGACCTCGGGTGTTGTCGTGCGGCCTCCCGGAGGGAACGGACCCTGTGCGCTCGCGCACCATCCTATCGAGACCCCAGGTCAGT---YAGAAC-CCACG-----TT----------------------', 1312.2000000000025, 0, 743)], [('------------C------------CC-TGWAGGK---AC-TGCGGA-GGW--CATTGTCGAA-CATGCCCGACAGAGCGACCCGCGAACACGTTACAAACACTACGCGGGGTGGCCCCGGCTGCCTCGCGCGGAGGTGCTGCGGCTGAGTGCGCAAACTAGCTGCGCGCACGCTGTCCGTGCCACCTCCACTAACAGAACCCCGGCGCGGAC-TGCGCCAAGGAATAAAAAACGAATGAGAGCGAGCGCGCCCCCCTCGCCCCGGAGACGGTGCGCGATGGTGTGTGCCTCGCTGTCCATTGATAAACTAAACGACTCTCGGCAACGGATATCTCGGCTCTCGCATCGATGAAR-AACGTAGCGAAATGCGATACTTGGTGTGAATTGCAR-AATCCCGTGAATCATCGAGTCTTTGAACGCAAGTTGCGCCCGAAGCCTTCTGGCCGAGGGCACGTCTGCCTGGGTGTCACGCAACGTCGCCGCCAACCCCACCCCTAGGGGCGGGAAGTTGGGGGCGGACTCTGGCCTCCCGTGCGCCTCGGCGCGCGR-ATGGCCTAAW-TTTCAGCTCCTGGCGAGGATCGCCACGACAAGCGGTGGTTTTTTGAACTAAGGACCTCGGGTGTTGTCGTGCGGCCTCCCGGAGGGAACGGACCCTGTGCGCTCGCGCACCATCCTATCGAGACCCCAGGTCAG-TCGG--GAA-CACCCGCTGA-ATTTAAGCATATCAATAAGCGGARGAA', 'KAAGTATAAAGTCGTAACAAGGTTTCCGT--AGG-TGAACCTGCGGAAGG-ATCATTGTCGAAACATGCCCGACAGAGCGACCCGCGAACACGTTACAAACACTACGCGGGGTGGCCCCGGCTGCCTCGCGCGGAGGTGCTGCGGCTGAGTGCGCAAACTAGCTGCGCGCACGCTGTCCGTGCCACCTCCACTAACAGAACCCCGGCGCGGA-YTGCGCCAAGGAATAAAAAACGAATGAGAGCGAGCGCGCCCCCCTCGCCCCGGAGACGGTGCGCGATGGTGTGTGCCTCGCTGTCCATTGATAAACTAAACGACTCTCGGCAACGGATATCTCGGCTCTCGCATCGATGAA-GAACGTAGCGAAATGCGATACTTGGTGTGAATTGCA-GAATCCCGTGAATCATCGAGTCTTTGAACGCAAGTTGCGCCCGAAGCCTTCTGGCCGAGGGCACGTCTGCCTGGGTGTCACGCAACGTCGCCGCCAACCCCACCCCTAGGGGCGGGAAGTTGGGGGCGGACTCTGGCCTCCCGTGCGCCTCGGCGCGCG-GATGGCCTAA-ATTTCAGCTCCTGGCGAGGATCGCCACGACAAGCGGTGGTTTTTTGAACTAAGGACCTCGGGTGTTGTCGTGCGGCCTCCCGGAGGGAACGGACCCTGTGCGCTCGCGCACCATCCTATCGAGACCCCA-GTCA-KT---YAGAAMC-CCC----AMAT-----C----C--T-----------', 1304.0000000000023, 0, 747)]]

I would like to remove primers in these sequences. Going from the middle right and left to find the first character "-". And then delete everything that is in front of this sign. For example, for the first match I would like to receive:

[('CATGCCCGACAGAGCGACCCGCGAACACGTTACAAACACTACGCGGGGTGGCCCCGGCTGCCTCGCGCGGAGGTGCTGCGGCTGAGTGCGCAAACTAGCTGCGCGCACGCTGTCCGTGCCACCTCCACTAACAGAACCCCGGCGCGGACTGCGCCAAGGAATAAAAAACGAATGAGAGCGAGCGCGCCCCCCTCGCCCCGGAGACGGTGCGCGATGGTGTGTGCCTCGCTGTCCATTGATAAACTAAACGACTCTCGGCAACGGATATCTCGGCTCTCGCATCGATGAARAACGTAGCGAAATGCGATACTTGGTGTGAATTGCARAATCCCGTGAATCATCGAGTCTTTGAACGCAAGTTGCGCCCGAAGCCTTCTGGCCGAGGGCACGTCTGCCTGGGTGTCACGCAACGTCGCCGCCAACCCCACCCCTAGGGGCGGGAAGTTGGGGGCGGACTCTGGCCTCCCGTGCGCCTCGGCGCGCGGATGGCCTAAATTTCAGCTCCTGGCGAGGATCGCCACGACAAGCGGTGGTTTTTTGAACTAAGGACCTCGGGTGTTGTCGTGCGGCCTCCCGGAGGGAACGGACCCTGTGCGCTCGCGCACCATCCTATCGAGACCCCAGGTCAGTCGG', 'ATCATTGTCGAAACATGCCCGACAGAGCGACCCGCGAACACGTTACAAACACTACGCGGGGTGGCCCCGGCTGCCTCGCGCGGAGGTGCTGCGGCTGAGTGCGCAAACTAGCTGCGCGCACGCTGTCCGTGCCACCTCCACTAACAGAACCCCGGCGCGGACTGCGCCAAGGAATAAAAAACGAATGAGAGCGAGCGCGCCCCCCTCGCCCCGGAGACGGTGCGCGATGGTGTGTGCCTCGCTGTCCATTGATAAACTAAACGACTCTCGGCAACGGATATCTCGGCTCTCGCATCGATGAAGAACGTAGCGAAATGCGATACTTGGTGTGAATTGCAGAATCCCGTGAATCATCGAGTCTTTGAACGCAAGTTGCGCCCGAAGCCTTCTGGCCGAGGGCACGTCTGCCTGGGTGTCACGCAACGTCGCCGCCAACCCCACCCCTAGGGGCGGGAAGTTGGGGGCGGACTCTGGCCTCCCGTGCGCCTCGGCGCGCGGATGGCCTAAATTTCAGCTCCTGGCGAGGATCGCCACGACAAGCGGTGGTTTTTTGAACTAAGGACCTCGGGTGTTGTCGTGCGGCCTCCCGGAGGGAACGGACCCTGTGCGCTCGCGCACCATCCTATCGAGACCCCAGGTCAGT', 1312.2000000000025, 0, 743)]

And the same for the others.

Thanks for any answer.

biopython • 64 views
ADD COMMENTlink written 6 days ago by adrian18_070

I am reasonably certain bbduk.sh from BBMap suite can do this. A guide is available here.

ADD REPLYlink written 6 days ago by genomax85k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1754 users visited in the last hour