concanateFiles: After fdogFAS is finished. It will leave in a temporary...

Description Usage Arguments Value Examples

View source: R/runFdog.R

Description

After fdogFAS is finished. It will leave in a temporary folder the phylogenetic profiles (pp). The pps can not be used direct to assess the completeness of the interested genome. This function processes the pp files in a folder and merged them.

Usage

1
concanateFiles(directory, genomeName, scoreMode)

Arguments

directory

path to the folder, that contains the pp files

genomeName

the genomeID of the interested genome

scoreMode

the mode determines the method to scoring the founded ortholog and how to classify them. Choices: 1, 2, 3, "busco"

Value

a list which contains the pp of the interested genome in data.frame, the extended fasta file of the interested genome in form of a vector, which contains the lines of the file and 2 domains file in form of data.frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Creating some pseudo data
geneID <- c("HUMAN@96063")
ncbiID <- c("ncbi9606")
orthoID <- c("123at123|HUMAN@9606@3|Q123123|1")
FAS_F <- c(1)
FAS_B <- c(1)
pp1 <- data.frame(geneID, ncbiID, orthoID, FAS_F, FAS_B)
pp2 <- data.frame(geneID, ncbiID, orthoID, FAS_F, FAS_B)

## Write them in 2 files in a test folder in the current working directory
wd <- getwd()
testFolder <- paste(wd, "/fCAT_testfunction", sep = "")
dir.create(testFolder, recursive = TRUE)
filePath1 <- paste(testFolder, "/test1.phyloprofile", sep = "")
filePath2 <- paste(testFolder, "/test2.phyloprofile", sep = "")
write.table(pp1, filePath1, row.names = FALSE, quote = FALSE, sep = "\t")
write.table(pp2, filePath2, row.names = FALSE, quote = FALSE, sep = "\t")

test <- concanateFiles(testFolder, "HUMAN@9606@3", scoreMode = 2)
print(test)

## Delete test folder
unlink(testFolder, recursive = TRUE)

giangnguyen0709/fCAT documentation built on Feb. 10, 2021, 4:31 a.m.