checkIndexType {Rbowtie2} | R Documentation

## Determine bowtie2 index type

### Description

This is an internal function that is not meant to be used outside of the package. It determines whether the given index library comprises of small indexes (.bt2) or large indexes (.bt2l).

### Usage

    checkIndexType(filePath)

### Arguments

`filePath` | `Character` scalar. The path where bowtie2 index files are located. Include the basename of the index files at the end of the path (i.e. path_to_index_dir/index_basename). Do not include the bowtie2 index file extension (.bt2 or .bt2l).

### Details

The function first tries to determine whether path_to_index_dir/index_basename.1.bt2 exists and if it doesn't exist then it tries to determine whether path_to_index_dir/index_basename.1.bt2l exists. If neither of those files exist then there is an issue with the index files that must be addressed.

### Value

`Character` scalar. Returns either "SMALL" if the .bt2 file is found, "LARGE" if the .bt2l file is found, or "ERROR" if neither the .bt2 nor .bt2l file is found.

[Package Rbowtie2 version 2.0.0 Index]