Skip to content

Instantly share code, notes, and snippets.

@mdshw5
Created January 5, 2015 15:44
Show Gist options
  • Select an option

  • Save mdshw5/c6b9f7c08d36b3a3c5b0 to your computer and use it in GitHub Desktop.

Select an option

Save mdshw5/c6b9f7c08d36b3a3c5b0 to your computer and use it in GitHub Desktop.
biostars 125610
>c1042
ACCGTACCC
>c1043
GCTACAGTTGAAAGGGGACCGTACCC
>c1044
ATGAATAAAATAATTTTGTATCATAAATCGAGCTGTTAATTATT
>c1045
TTCATATTTGTAGCTAAGCAGAGGCGAAGCGTTCTTGTATCG
from pyfaidx import Fasta
fa = Fasta('125610.fa')
for sequence in fa:
if 'ACCGTACCC' in str(sequence):
print('>' + sequence.name)
print(sequence)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment