Description Usage Arguments Value Examples
View source: R/getBlastResults.R
A function that gets the BLAST hits of the submitted fasta file in the submitted fasta dabatase file. Creates a fasta database out of the user-submitted fastaDatabse file.
1 2 3 4 5 6 7 | getBlastResults(
userFasta,
fastaDatabase,
maxSequencesReturned = 5,
dbType,
userFastaType
)
|
userFasta |
A fasta file containing one fasta entry. This sequence is the one the users wishes to compare to the entries in the fastaDatabse file. |
fastaDatabase |
A fasta file containing fasta entries with sequences the user wishes to create a database out of and compare userFasta to. |
maxSequencesReturned |
The maximum amount of sequences that should be returned from the BLAST. Requires >= 1. |
dbType |
The sequence type of the database fasta. Is required to be "nucl" for nucleotide or "prot" for protein |
userFastaType |
The sequence type of the fasta to perorm BLAST on. Is required to be "nucl" for nucleotide or "prot" for protein |
Returns a list containing the BLAST result template.
QueryID - The name of the query sequence
SubjectID - The name of the matched sequence
Perc.Ident - The percent identity of the sequence match
Alignment.Length - The length of the alignment in the match
Mismatches - The number of mismatches in the alignments
Gap.Openings - The number of gaps in the alignment
Q.start - The start of the alignment on the query sequence
Q.end - The end of the alignment of the query sequence
S.start - The start of the alignment on the subject sequence
S.end - The end of the alignment of the subject sequence
E - The E-value of the alignment
Bits - The bit score of the alignment
1 2 3 4 5 6 7 8 9 10 | # Example 1:
# Using the provided fasta query and database files
# data(databaseFasta)
# data(queryFasta)
# sink("tmpDatabase.fasta")
# cat(databaseFasta)
# sink("tmpQuery.fasta")
# cat(queryFata)
# blastResults <- getBlastResults("tmpQuery.fasta", "tmpDatabase.fasta", maxSequencesReturned=5, dbType="nucl", userFastaType="prot")
# blastResults
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.