correctPP: For every with the tool checked genomes, fCAT will save the...

Description Usage Arguments Value Examples

View source: R/correctFiles.R

Description

For every with the tool checked genomes, fCAT will save the phylogenetic profile of each genome into a extended fasta file in the phyloprofile folder, which by default is the output folder in core directory or can be the folder specified by the user with the argument ppDir in the function checkCompleteness. When redo is on to recheck for a genome, whose pp exists already in the original pp, the tool must remove the lines of the genome from the original phyloprofile file. That is the purpose of this function

Usage

1
correctPP(PPFile, genome)

Arguments

PPFile

path to phylogenetic profile file

genome

name of the genome, that should be removed

Value

none

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
## Create pseudo phylogenetic profile, which contains two different genomes
geneID <- c("530670", "530730", "603043")
ncbiID <- c("ncbi9606", "ncbi9606", "ncbi9606")
orthoID <- c(
    "530670|HUMAN@9606@3|Q16526|1", "530730|HUMAN@9606@3|P05091|1",
    "603043|HOMSA@9606@2|Q39233|1"
)
FAS_F <- c(1, 1, 1)
FAS_B <- c(1, 1, 1)
pp <- data.frame(geneID, ncbiID, orthoID, FAS_F, FAS_B)

## Write the pp file in a file
wd <- getwd()
filePath <- paste(wd, "/fCAT_functiontest.phyloprofile", sep = "")
write.table(pp, filePath, sep = "\t", row.names = FALSE, quote = FALSE)

## Correcting
correctPP(filePath, "HUMAN@9606@3")

## Check if the file is corrected
read.table(filePath, header = TRUE, sep = "\t")

## Delete the file
file.remove(filePath)

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