write.rna_to_dna {baseq}R Documentation

Convert RNA file to DNA file

Description

This function reads a multi FASTA file containing RNA sequences, converts each RNA sequence to DNA sequence, and writes the DNA sequences to a new multi FASTA file. The output file name is generated from the input file name with the suffix '_rna.fasta'.

Usage

write.rna_to_dna(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 <- system.file("extdata", "sample3_fa.fasta", package = "baseq")
#tempdir <- tempdir()
#temp_file_path <- file.path(tempdir, basename(sample_file_path))
#file.copy(sample_file_path, temp_file_path, overwrite = TRUE)
#write.rna_to_dna(temp_file_path, output_dir = tempdir)

# Write to working directory
# write.rna_to_dna(file_path)

# Write to custom directory
# write.rna_to_dna(file_path, output_dir = "/path/to/directory/")


[Package baseq version 0.1.4 Index]