ns.blast: Perform a sequence-alignment

Description Usage Arguments Details Value Author(s) References Examples

Description

Calculate alignments of one or more sequences in fasta format to a sequence database using the blast tools. The sequence database is set up using init.blast.

Usage

1
ns.blast(x, database, eval = 10, filter = FALSE, add.parm = "")

Arguments

x

A character vector containing the sequence(s) to be blasted. The character vector is interprented a fasta file where elements in the vector are lines.

database

A reference to the database to blast against, use the output of the function ns.blast.db here

eval

Numerical threshold e-value. Only alignments with an e-value equal or smaller than eval will be returned

filter

If filter is set then repetative sequences in the database and sequence are not considered for alignment. See blastn documentation for details

add.parm

Additional options to be passed to blastn can be set here. For example to lower the gap penalty use add.parm = "-gapextend -2"

Details

The function executes "blastn ....." and retrieves the results. Execute system("blastn -help") to get an overview of the options which can be passed to the add.parm.

Value

The function returns a data.frame containing the blast result for all submitted sequences; one row per alignment. The columns in the output contain the following information with respect to the alignment.

query

Name of query sequence.

sequence

Name of sequence in the data base.

mlength

Length of the match.

identity

percent identy of the match.

mismatches

The number of mismatches in the alignment.

gaps

The number of gaps in the alignment.

qstart

The start of the match in the query.

qstop

The end of the match in the query.

sstart

The start of the match in the query.

sstop

The end of the match in the query.

eval

The e-value of the match.

bitscore

The the bit-score of the match.

Author(s)

Wim de Leeuw (w.c.deLeeuw@uva.nl)

References

Blast: Altschul, Stephen F., Thomas L. Madden, Alejandro A. Schaeffer, Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. Lipman (1997), "Gapped BLAST and PSI-BLAST: a new generation of protein database search programs", Nucleic Acids Res. 25:3389-3402.

Examples

1
2
3
4
5
6
  ts = c("sequence_1"="ATGCGCGTACATCGCCCCCCCGGGGGG","sequence_2"="TCCCCCCCCGGGGGGATCTTATATATATCCCCCGGGGG")
  # Self-self blast 
  ns.blast(ts,ns.blast.db(sequences=ts))
  # Blast some sequecnes
  my.db <- ns.blast.db(sequences=ts)
  ns.blast(c("query_A"="TCGCCCCCCCGGGGGG","query_B"="GATCTTATATATATCCC"),my.db,eval=1)

UvA-MAD/SeqLibR documentation built on May 9, 2019, 9:40 p.m.