parse_signalp: convert output of Signalp-2.0 and Signalp-3.0 to...

Description Usage Arguments Value See Also Examples

View source: R/parse_signalp.R

Description

This function parses the output of the command line tools signalp2 and signalp3 to standardize outputs for data analysis.

Alternatively, parse_signalp can be called independently on outputs of signalp2 and signalp3 and captured in a system call or stored in a file.

Usage

1
2
3
parse_signalp(input, input_type = c("path", "system_call"), method = c("nn",
  "hmm"), pred_filter = "Signal peptide", version = c(2, 3),
  source_fasta = NULL)

Arguments

input

output of the command line tools signalp2 or signalp3/

input_type

a character string with the following options:

  • input_type = "path" - path to a file with text output from signalp2 or signalp3

  • input_type = "system_call" - output from the signalp2 or signalp3 system call

method

which prediction method to use. Options are:

  • method = "hmm" - for HMM-based predictions

  • method = "nn" - for prediction based on neural networks

pred_filter

filter for the type of prediction. Options are:

  • pred_filter = "Signal peptide"

  • pred_filter = "Signal anchor"

  • pred_filter = "Non-secretory protein"

  • pred_filter = "all" - in case all three filter options shall be included

version

version of SignalP used: 2.0 or 3.0

source_fasta

source fasta file, required to rescue names when signalp2, nn method is used

Value

parsed signalp2 or signalp3 output, organised in a tibble object.

See Also

signalp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Example 1: parse signalp2 output, stored in a file:
s_path <- system.file("extdata", "sample_prot_sp2_hmm_out",
package = "SecretSanta")
parse_signalp(input = s_path, input_type = "path", 
pred_filter = "Signal peptide", version = 3, method = 'hmm')

# alternatively users can select for all prediction filters
parse_signalp(input = s_path, input_type = "path", pred_filter = "all", method = 'hmm', version = 2)

# Example2: parse signalp2 output
# captured in a system call. Note, here we assume that
# signalp2 is accessible via $PATH.
s_fasta <- system.file("extdata", "small_prot.fasta",
package = "SecretSanta")
# capture system call:
con_hmm <- system(paste('signalp2 -t euk -f short -m hmm -trunc 70', s_fasta), intern = TRUE)
con_nn <- system(paste('signalp3 -t euk -f short -m nn -trunc 70', s_fasta), intern = TRUE)
# parse captured system call:
parse_signalp(input = con_hmm, input_type = "system_call", method = 'hmm', version = 2)
parse_signalp(input = con_nn, input_type = "system_call",
method = 'nn', version = 3, pred_filter = 'all')

gogleva/SecretSanta documentation built on May 30, 2019, 8:02 a.m.