Description Usage Arguments Value Examples
To prepare the simulation, the user needs to specify the directory containing the sam-files
and the directory containing the excel result files from
the prior mapping results. The simulation result files will be stored in the
metasimulations directory which the user must specify, too. The R-function
create_directories_and_file_paths
creates subdirectories in the metasimulations directory
and stores the directories and file paths needed later as global variables.
1 2 3 4 5 | create_directories_and_file_paths(
sam.directory,
excel.directory,
metasimulations.directory
)
|
sam.directory |
Directory of the sam-files with original mapping results |
excel.directory |
Directory of the excel-files with mapped viruses information |
metasimulations.directory |
Directory of the files produced by simulation procedure |
None
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 27 28 | # Create new folders "sam_directory", "excel_directory" and "metasimulations_directory" at the desktop,
# extract the sam-file to the sam-directory and copy the excel-file to the excel-directory.
{
if ( Sys.info()[1] == "Windows") {
desktop.directory = file.path(Sys.getenv("USERPROFILE"))
desktop.directory = gsub("\\\\","/",desktop.directory)
desktop.directory = paste0(desktop.directory,"/Desktop")
my.sam.directory = paste0(desktop.directory,"/sam_directory")
my.excel.directory = paste0(desktop.directory,"/excel_directory")
my.metasimulations.directory = paste0(desktop.directory,"/metasimulations_directory")
}
else if ( Sys.info()[1] == "Linux") {
desktop.directory=system("xdg-user-dir DESKTOP",intern = T)
my.sam.directory = paste0(desktop.directory,"/sam_directory")
my.excel.directory = paste0(desktop.directory,"/excel_directory")
my.metasimulations.directory = paste0(desktop.directory,"/metasimulations_directory")
}
else {
my.sam.directory = file.choose() # Choose sam directory
my.excel.directory = file.choose() # Choose excel directory
my.metasimulations.directory = file.choose() # Choose metasimulations directory
}
}
dir.create(my.sam.directory)
dir.create(my.excel.directory)
unzip(zipfile = "./inst/extdata/NGS-12345_mapq_filtered.zip",exdir = my.sam.directory)
file.copy(from = "./inst/extdata/NGS-12345.xlsx",to = my.excel.directory)
create_directories_and_file_paths ( sam.directory = my.sam.directory , excel.directory = my.excel.directory , metasimulations.directory = my.metasimulations.directory )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.