Skip to content

Step by Step Guide

Prakki Rama edited this page Jul 7, 2020 · 3 revisions

Introduction

CPgeneProfiler uses NCBI BLAST+ installed in Unix/Linux system and R framework to profile CP genes from genome assemblies. Currently, CPgeneProfiler database includes the following CP gene families: IMI, IMP, KPC, NDM, OXA, VIM

Installation

Step 1A: Linux package installation (Reference: Standalone BLAST Setup for Unix)

Go to page: https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.9.0/

Save ncbi-blast-2.9.0+-x64-linux.tar.gz in the local directory

To install, simply extract the downloaded package after placing it under a desired directory. This can be accomplished by a single tar command, or a combination of gunzip and tar commands in Unix/Linux terminal.

$ tar zxvpf ncbi-blast-2.9.0+-x64-linux.tar.gz

Step 1B: Configuration of NCBI BLAST+ executables

Under bash, the following command appends the path to the new BLAST bin directory to the existing PATH setting:

$ export PATH=$PATH:$HOME/ncbi-blast-2.9.0+/bin

Step 2a: R dependency package installation

To install multiple packages used by CPgeneProfiler, in the Rstudio console run the following command:

install.packages(c("ggplot2","dplyr", "tidyverse", "UpSetR", "scales", "ape", "reshape2", "gridExtra"))

Step 2b: Biostrings package installation

(With R version <= 3.4 )

> source("https://bioconductor.org/biocLite.R")

> biocLite("Biostrings")

(With R version 3.5 or greater)

> install.packages("BiocManager")

> BiocManager::install(c("Biostrings"))

Step 3: CPgeneProfiler Installation

Install devtools first, and then need to load them:

> install.packages(devtools)

> library(devtools)

Then install the CPgeneProfiler package using devtools. While installing, switching off to upgrade dependencies

devtools::install_github("ramadatta/CPgeneProfiler")

Step 4: Check installation

Ensure you have installed the package properly by running following command in R console:

?CPgeneProfiler

Step 5: Download CP gene database using R console

Step 5a: Specify CP gene database URL

> url <- "https://raw.githubusercontent.com/ramadatta/CPgene-profiler/master/ARG-annot_CPGene_DB.fasta"

Step 5b: Specify destination where CP gene database file should be saved

> path <- "/home/user/db" # Can change to preferable location

> setwd(path)

> destfile <- "ARG-annot_CPGene_DB.fasta"

Step 5c: Download the CP gene database file to the folder set in "path"

> download.file(url, destfile)

Step 6: Make sure "testData" folder is downloaded along with the package.

Step 7: Run the CPgeneProfiler package in console providing fasta file folder location and ARG-annot database location

> CPgeneProfiler("/home/user/testData/fasta","/home/user/testData/db/")