anvi-script-filter-fasta-by-blast

Filter FASTA file according to BLAST table (remove sequences with bad BLAST alignment).

🔙 To the main page of anvi’o programs and artifacts.

Authors

Requires

contigs-fasta blast-table

Provides

contigs-fasta

Usage

This program takes a contigs-fasta and blast-table and removes sequences without BLAST hits of a certain level of confidence.

For example, you could use this program to filter out sequences that do not have high-confidence taxonomy assignments before running a phylogenomic analysis.

To run this program, you’ll need to provide the contigs-fasta that you’re planning to filter, the blast-table, a list of the column headers in your blast-table (as given to BLAST by -outfmt), and a proper_pident threshold at which to remove the sequences. This threshold will remove sequences less than the given percent of the query amino acids that were identical to the corresponding matched amino acids. Note that this diffres from the pident blast parameter because it doesn’t include unaligned regions.

For example, if you ran

anvi-script-filter-fasta-by-blast -f contigs-fasta \ -o path/to/contigs-fasta \ -b blast-table \ -s qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore qlen slen \ -t 30

Then the output file would be a contigs-fasta that contains only the sequences in your input file that have a hit in your blast table with more than 30 percent of the amino acids aligned.

Edit this file to update this information.

Command line interface

The following is the list of parameters and their descriptions in the latest version of anvi-script-filter-fasta-by-blast.

The code that generates this web page ensures that this information is the latest available in 9-dev (eunice). Which means, in some cases the information in this section (generated automatically) might be more comprehensive or up-to-date compared to the descriptions above (written by humans).


Command line usage

anvi-script-filter-fasta-by-blast [-h] [-f FASTA file] [-o FILE_PATH] -b TAB DELIMITED FILE -s OUTFMT -t THRESHOLD [--just-do-it]

Parameters and their descriptions

options
-f, --fasta-file FASTA FILE
A FASTA-formatted input file.
-o, --output-file FILE_PATH
File path to store results.
-b, --blast-output TAB DELIMITED FILE required
BLAST table generated with blastp. `--outfmt 6` as the output format is assumed.
-s, --outfmt OUTFMT required
Specify the column ordering of your BLAST report. We add the following paramter to our BLAST searches so the output report contains the `qlen` field, which is not included by default: `-outfmt '6 qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore qlen slen'`. You may have used a different `-outfmt` paramter, and you should use this parameter to explicitly define the column names in your output file. For instance, if you had used the parameter mentioned above, then the correct version of this parameter would be: "qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore qlen slen". Regardless of the BLAST output format, your columns MUST contain the following parameters for this program to work properly: 'qseqid', 'bitscore', 'length', 'qlen', and 'pident'.
-t, --threshold THRESHOLD required
What `proper_pident` threshold do you want to use for filtering out sequences whose top bit-score matches have `proper_pident`s less than this threshold? We have defined `proper_pident` to be the percentage of the query amino acids that both aligned to and were identical to the corresponding matched amino acid. Note that the `pident` parameter output by BLAST does not include regions of the query sequence unaligned to the matched sequence, whereas `proper_pident` does. For example, a sequence that's only half aligned by a match but with 100% identity at matched regions has a `pident` of 100 but a `proper_pident` of 50. The default is 30.0%. Default: 30.0
--just-do-it
Don't bother me with questions or warnings, just do it.

Additional Resources

Are you aware of resources that may help users better understand the utility of this program? Please feel free to edit this file on GitHub. If you are not sure how to do that, find the __resources__ tag in this file to see an example.