get_fasta_seqs: Get fasta sequences

Description Usage Arguments Value Author(s) See Also Examples

Description

Get fasta sequences

Usage

1
2
get_fasta_seqs(data_in, filein, demo_data, input_type_fasta,
    concat_fasta, path, dir_format, file_ext, id_format)

Arguments

data_in

a dataframe of the input phylogenetic profiles, that contains at least 3 columns: geneIDs, orthoIDs and ncbiIDs

filein

main input file (for checking input type)

demo_data

name of demo data set (either "ampk-tor", "lca-micros", or "none")

input_type_fasta

source of fasta sequences ("Concatenated fasta file" or "Fasta folder")

concat_fasta

input concatenated fasta file

path

path to fasta folder

dir_format

directory format (either "path/speciesID.fa*" or "path/speciesID/speciesID.fa*")

file_ext

fasta file extension ("fa", "fasta", "fas" or "txt")

id_format

fasta header format (">speciesID:seqID", ">speciesID@seqID", ">speciesID|seqID" or only "seqID")

Value

A dataframe contains fasta sequences

Author(s)

Vinh Tran tran@bio.uni-frankfurt.de

See Also

check_input_validity, str_reverse, main_long_raw

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
data("main_long_raw", package="phyloprofile")
data_in <- main_long_raw
filein <- system.file(
    "extdata", "test.main.long", package = "phyloprofile", mustWork = TRUE
)
demo_data <- "none"
input_type_fasta <- "Concatenated fasta file"
concat_fasta <- system.file(
    "extdata", "fasta_files/concatenatedFile.fa",
    package = "phyloprofile", mustWork = TRUE
)
# the following parameters are conly required if upload a fasta folder!
path <- NULL
dir_format <- NULL
file_ext <- NULL
id_format <- NULL
# get fasta sequences
get_fasta_seqs(
    data_in, filein, demo_data,
    input_type_fasta,
    concat_fasta,
    path,
    dir_format,
    file_ext,
    id_format
)

trvinh/test documentation built on May 9, 2019, 2:26 a.m.