clean_DNA_file {baseq} | R Documentation |
Clean DNA file
Description
This function reads a multi FASTA file containing DNA sequences, removes any characters other than A, T, G, and C, and writes the cleaned sequences to a new multi FASTA file. The output file name is generated from the input file name with the suffix '_clean.fasta'.
Usage
clean_DNA_file(input_file, output_dir = "")
Arguments
input_file |
The name of the input multi FASTA file. |
output_dir |
The directory where the output file will be saved. If not given, the output file will be saved in the same directory as the input file. |
Value
A character string specifying the path to the output FASTA file.
Examples
#sample_file_path_three <- system.file("extdata", "sample2_fa.fasta", package = "baseq")
#tempdir <- tempdir()
#temp_file_path <- file.path(tempdir, basename(sample_file_path_three))
#file.copy(sample_file_path_three, temp_file_path, overwrite = TRUE)
#clean_DNA_file(temp_file_path, output_dir = tempdir)
# Write to working directory
# clean_DNA_file(file_path)
# Write to custom directory
# clean_DNA_file(file_path, output_dir = "/path/to/directory/")
[Package baseq version 0.1.4 Index]