GithubHelp home page GithubHelp logo

celalp / rblast Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mhahsler/rblast

0.0 0.0 0.0 379 KB

Interface for the Basic Local Alignment Search Tool (BLAST) - R-Package

License: GNU General Public License v3.0

R 100.00%

rblast's Introduction

rBLAST - Interface for BLAST search (R-Package)

Travis-CI Build Status

Interfaces the Basic Local Alignment Search Tool (BLAST) to search genetic sequence data bases with the Bioconductor infrastructure. This includes interfaces to blastn, blastp, blastx, and makeblastdb. The BLAST software needs to be downloaded and installed separately.

Installation

  1. Install the package devtools.
  2. Install the Bioconductor package Biostrings either using devtools::install_bioc("Biostrings") or directly from Bioconductor.
  3. Install rBlast from GitHub using devtools::install_github("mhahsler/rBLAST").
  4. Install the BLAST software by following the instructions found in ? blast

Usage

## download the 16S Microbial data base from NCBI
download.file("https://ftp.ncbi.nlm.nih.gov/blast/db/16S_ribosomal_RNA.tar.gz",
+   "16S_ribosomal_RNA.tar.gz", mode='wb')
trying URL 'https://ftp.ncbi.nlm.nih.gov/blast/db/16S_ribosomal_RNA.tar.gz'
Content type 'application/x-gzip' length 37346728 bytes (35.6 MB)
==================================================
downloaded 35.6 MB
untar("16S_ribosomal_RNA.tar.gz", exdir="16SMicrobialDB")

## load some test data 
seq <- readRNAStringSet(system.file("examples/RNA_example.fasta",
                        package="rBLAST"))
seq
RNAStringSet object of length 5:
    width seq                                                                 names               
[1]  1481 AGAGUUUGAUCCUGGCUCAGAACGAACGCUGG...GGUGAUCGGGGUGAAGUCGUAACAAGGUAACC 1675
[2]  1404 GCUGGCGGCAGGCCUAACACAUGCAAGUCGAA...GCAGCCGACCACGGUAAGGUCAGCGACUGGGG 4399
[3]  1426 GGAAUGCUNAACACAUGCAAGUCGCACGGGCA...UGUAGUCGNAACAAGGUAGCCGUAGGGGAACC 4403
[4]  1362 GCUGGCGGAAUGCUUAACACAUGCAAGUCGCA...AGUUGGUUUUACCUUAGGUGUCUAGGCUAACC 4404
[5]  1458 AGAGUUUGAUUAUGGCUCAGAGCGAACGCUGG...CGACUGGGGUGAAGUCGUAACAAGGUAACCGU 4411
## load a BLAST database (replace db with the location + name of the BLAST DB)
bl <- blast(db="./16S_rRNA_DB/16S_ribosomal_RNA")
bl
BLAST Database
Location: /home/hahsler/baR/rBLAST/16S_rRNA_DB/16S_ribosomal_RNA 
BLAST Type: blastn 
Database: 16S ribosomal RNA (Bacteria and Archaea type strains)
	21,856 sequences; 31,790,086 total bases

Date: May 1, 2021  5:36 AM	Longest sequence: 3,600 bases

BLASTDB Version: 5

Volumes:
	/home/hahsler/baR/rBLAST/16S_rRNA_DB/16S_ribosomal_RNA
## query a sequence using BLAST
cl <- predict(bl, seq[1,])
cl[1:5,]
  QueryID   SubjectID Perc.Ident Alignment.Length Mismatches Gap.Openings Q.start Q.end S.start
1    1675 NR_104821.1     90.816             1459        124            8      16  1468       5
2    1675 NR_117601.1     85.896             1255        160           15     229  1478     237
3    1675 NR_117601.1     93.846               65          4            0       5    69       1
4    1675 NR_074549.1     85.896             1255        160           15     229  1478     241
5    1675 NR_074549.1     94.203               69          4            0       1    69       1
  S.end        E Bits
1  1459 0.00e+00 1943
2  1479 0.00e+00 1321
3    65 7.21e-20   99
4  1483 0.00e+00 1321
5    69 4.31e-22  106

rblast's People

Contributors

mhahsler avatar ts404 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.