This skill enables AI agents to help you filter and select sequences based on various criteria using Biopython.
pip install biopythonTell your AI agent what you want to do:
- "Keep only sequences longer than 500 bp"
- "Extract sequences matching these IDs"
- "Filter out sequences with N's"
- "Select sequences with GC content between 40-60%"
"Remove sequences shorter than 200 bp from my FASTA file"
"Extract sequences with IDs listed in wanted_ids.txt"
"Filter out sequences containing more than 5% N bases"
"Keep only sequences with GC content above 50%"
"Filter sequences: length >= 100, no N's, GC 40-60%"
- Load sequences from input file
- Apply specified filter criteria
- Keep sequences passing all filters
- Write filtered sequences to output
- Use generator expressions for large files (memory efficient)
- For ID-based filtering, use sets for O(1) lookup
- Combine multiple criteria in a single filter function
- Generators can only be used once - recreate if needed