import_dnds_tbl: Import a dnds table generated with 'dnds'

Description Usage Arguments Author(s) Examples

View source: R/import_dnds_tbl.R

Description

This function reads a file that stores a dnds table generated with dnds.

Usage

1
import_dnds_tbl(file, sep = ";")

Arguments

file

file path to dnds table with sep separated columns.

sep

column separator used in the input dnds table.

Author(s)

Hajk-Georg Drost

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
# generate dnds table
dNdS_tbl <- dnds(query_file      = system.file('seqs/ortho_thal_cds.fasta', package = 'orthologr'),
subject_file    = system.file('seqs/ortho_lyra_cds.fasta', package = 'orthologr'),
ortho_detection = "DIAMOND-RBH",
aa_aln_type     = "pairwise",
aa_aln_tool     = "NW",
codon_aln_tool  = "pal2nal",
dnds_estimation = "Li",
cores           = 1 )

# save dnds table as ';' column separated file
utils::write.table(
dNdS_tbl,
file.path(tempdir(), "dNdS_tbl.csv"), sep = ";",
col.names = TRUE,
row.names = FALSE,
quote     = FALSE )

# import dNdS table into R session
dNdS_tbl_import <- import_dnds_tbl(file.path(tempdir(), "dNdS_tbl.csv"))

## End(Not run)

drostlab/homologr documentation built on Sept. 28, 2020, 12:44 a.m.