SeqAna: Function for the annotation of assembled Transcriptome

Description Usage Arguments Examples

View source: R/DeSeqAnnot.R

Description

This function used to annotate the newly assemble transcriptome by using blast, SignalP to predict signal peptide and Hmm to identify protein domain.

Usage

1
SeqAna(file, blastdb, nthread = "8", mtras = "1", ..)

Arguments

file

transdecore pep file generated after assembly

blastdb

uniprot database

nthread

number of thread used

mtras

maximum target

..

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (file, blastdb, nthread = "8", mtras = "1", ..) 
{
    command1 <- paste("makeblastdb -in", blastdb, "-dbtype prot")
    system(command1)
    command2 <- paste("blastp -query", file, "-db", blastdb, 
        "-num_threads", nthread, "-max_target_seqs", mtras, "-outfmt 6")
    output <- system(command2, intern = TRUE)
    output <- strsplit(output, "\t")
    output <- do.call(rbind.data.frame, output)
    colnames(output) <- c("QueryID", "SubjectID", "Pidentity", 
        "AligLength", "Mismatch", "GapOpening", "Q-Start", "Q-End", 
        "s-Start", "s-end", "Evalue", "bit")
    command3 <- paste("signalp -f short", file)
    sigpep <- system(command3, intern = TRUE)
    sigpep1 <- strsplit(sigpep, " +")
    sigpep1 <- do.call(rbind.data.frame, sigpep1)
    colnames(sigpep1) <- c("name", "Cmax", "pos", "Ymax", "pos", 
        "Smax", "pos", "Smean", "D", "?", "Dmaxcut", "Networks-used")
    sigpep1 <- sigpep1[-c(1:2), ]
    sigpep1 <- sigpep1[, -13]
    comnd5 <- paste("hmmpress", db)
    system(comnd5)
    command5 <- paste("hmmscan --cpu 2 --domtblout TrinotatePFAM.out", 
        db, file)
    hmout <- system(command5, intern = TRUE)
    hmout1 <- strsplit(hmout, "\t")
    hmout1 <- do.call(rbind.data.frame, hmout1)
    new("SequnecAnalysisData", Homologus = output, signalPeptide = sigpep1, 
        HMM = hmout1)
  }

HTDA documentation built on May 2, 2019, 4:53 p.m.