Check whether input file contains dna as required.

file_contains_dna(file, input_type)

Arguments

file

file path to fasta file.

input_type

a character string specifying whether input file a "query" or "subject" file.

Value

When a file contains the correct sequence type then this function will only execute without any output. In case a file does not contains the correct sequence type then an error is thrown.

Author

Hajk-Georg Drost

Examples

# test an dna file
file_contains_dna(file = system.file('seqs/qry_nn.fa', package = 'metablastr'),
                  input_type = "query")