I’m trying to find genes obtained from genome and compare with a Virulent Factors database (VFDB), so, not all genes from the genome will give a match against the database; my problem is, if don’t give a match against database how to avoid a Error/Warnings:
<0 rows> (or 0-length row.names)
Warning message:
In predict.BLAST(VFDB, sq1, custom_format = "qseqid sseqid pident length mismatch gapopen qstart qend sstart send qlen slen evalue bitscore qcovs") :
BLAST did not return a match!
I just want to avoid the Error/Warning, if don't return any match just use the next seq in a loop
# F multiples seqs in Biostrings format
for(i in 1:length(F)){
result <- stats::predict(VFDB, F[i], custom_format = "qseqid sseqid pident length mismatch gapopen qstart qend sstart send qlen slen evalue bitscore qcovs")
# some code to avoid the warning with seqs that did not match !!!!
}
I’m trying to find genes obtained from genome and compare with a Virulent Factors database (VFDB), so, not all genes from the genome will give a match against the database; my problem is, if don’t give a match against database how to avoid a Error/Warnings:
VFDB is the database
sq1 is a Biostrings sequence
stats::predict(VFDB, sq1, custom_format = "qseqid sseqid pident length mismatch gapopen qstart qend sstart send qlen slen evalue bitscore qcovs") Error in read.table(outfile, sep = ",", quote = "") : no lines available in input [1] qseqid sseqid pident length mismatch gapopen qstart qend sstart send qlen slen evalue bitscore qcovs
<0 rows> (or 0-length row.names) Warning message: In predict.BLAST(VFDB, sq1, custom_format = "qseqid sseqid pident length mismatch gapopen qstart qend sstart send qlen slen evalue bitscore qcovs") : BLAST did not return a match! I just want to avoid the Error/Warning, if don't return any match just use the next seq in a loop # F multiples seqs in Biostrings format for(i in 1:length(F)){ result <- stats::predict(VFDB, F[i], custom_format = "qseqid sseqid pident length mismatch gapopen qstart qend sstart send qlen slen evalue bitscore qcovs") # some code to avoid the warning with seqs that did not match !!!! }