Remove sequences by sequence ID. It is the opposite of sequence extraction, and is faster when you remove fewer than half of the sequences.
Example
Section titled “Example”Set the input with input_dir or input_files, then call a removal method.
import pysegul
def remove_sequences(): remove = pysegul.SequenceRemoval( input_fmt='nexus', datatype='dna', output_path='tests/output', output_format='fasta', ) remove.input_dir = 'tests/align-data' remove.remove_id_list(['abce1', 'abce2'])Options
Section titled “Options”| Option | Default | Description |
|---|---|---|
input_fmt | Required | 'auto', 'fasta', 'nexus', 'phylip' |
datatype | Required | 'dna', 'aa', 'ignore' |
output_path | Required | Output directory |
output_format | Required | 'fasta', 'nexus', 'phylip', or interleaved 'fasta-int', 'nexus-int', 'phylip-int' |
| Attribute | Description |
|---|---|
input_dir | Directory of input sequence files |
input_files | List of input sequence files |
Methods
Section titled “Methods”| Method | Remove sequences |
|---|---|
remove_regex(regex) | whose IDs match a regular expression (Rust regex syntax) |
remove_id_list(id) | with the IDs in a list |