Finding non ATGCN sequences using python
I want to search for non sequences in a file, to substitute them.
for file in SeqIO.parse('myfile.fasta', 'r'):
sequence = re.search('^ATGCN', record.seq)
output_file=open('files.fasta, 'w+')
• 917 views
•
link
1 answer
Go to a site like:
to test your regular expressions (select Python as the language). To match characters except ATGCN the pattern would be:
[^ACGTN]
you get quite helpful tips in the sidebar
• 0 views
•
link
Log in to answer this question.