placeSeed: This function take the path to the interested genome and its...

Description Usage Arguments Value Examples

View source: R/placeSeed.R

Description

This function take the path to the interested genome and its FAS annotation (if FAS annotation was not provided, the function will call annoFAS tool to compute it) as the input. The function will make a copy of the genome fasta file and a symbolic link (not in case annoFAS is called) and arrange them into the query_taxon folder and into the weight_dir folder of the core directory.

Usage

1
placeSeed(genome, fasAnno = NULL, root, process = FALSE, weightDir = NULL)

Arguments

genome

the path to the fasta file of the genome

fasAnno

the path to the fas annotation file of the genome. If equal NULL, the function will compute the annotation, and arrange it into the weight_dir folder of the core directory

root

The path to the core directory, where the core set is stored within weight_dir, blast_dir, etc.

process

A logical option to determine if the function was used as a modul in the processCoreSet function

weightDir

The user can replace the weight_dir folder in the core directory by specifying the path to the replacing folder in this argument

Value

none

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Take the demo data
coreFolder <- system.file("extdata", "sample", package = "fCAT")
genome <- system.file("extdata", "HUMAN@9606@3.fa", package = "fCAT")
fasAnno <- system.file("extdata", "HUMAN@9606@3.json", package = "fCAT")
## Place seed
placeSeed(genome, fasAnno, coreFolder)
## Test if the seed was place
fastaPath <- paste(coreFolder, "/query_taxon/HUMAN@9606@3/HUMAN@9606@3.fa",
    sep = ""
)
annoPath <- paste(coreFolder, "/weight_dir/HUMAN@9606@3.json", sep = "")
if (file.exists(fastaPath) && file.exists(annoPath)) {
    print("Seed is placed")
}

## Delete seed
fastaFolder <- paste(coreFolder, "/query_taxon/HUMAN@9606@3", sep = "")
annoPath <- paste(coreFolder, "/weight_dir/HUMAN@9606@3.json", sep = "")
unlink(fastaFolder, recursive = TRUE)
file.remove(annoPath)

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