Learn R Programming

VIProDesign (version 0.1.0)

run_VIProDesign: Run VIProDesign Workflow

Description

This function performs the VIProDesign workflow for clustering and analyzing protein sequences. It includes steps for filtering sequences, removing redundancy, identifying and removing outliers, and clustering sequences using PAM (Partitioning Around Medoids). This function requires the `cd-hit` executable to be installed and accessible in the system's PATH if `use_cd_hit = TRUE`. If `cd-hit` is not available, the workflow will skip redundancy removal and proceed with the filtered sequences.

Usage

run_VIProDesign(
  file,
  output_prefix,
  max_cluster_number = NULL,
  predefined_cluster_number = NULL,
  use_cd_hit = TRUE,
  cd_hit_path,
  cutoff = 0.99,
  remove_outliers = TRUE,
  verbose = FALSE
)

Value

A list containing the following elements:

  • filtered_file: A file containing the filtered sequences (if redundancy removal was performed).

  • non_redundant_file: A file containing the non-redundant sequences (if redundancy removal was performed).

  • no_outlier_obj: A `AAStringSet` object containing the sequences with outliers removed (if outlier removal was performed).

  • clustering_info: Clustering information generated by PAM clustering.

  • final_panel: The final representative sequences selected by the workflow.

Arguments

file

A string specifying the path to the input FASTA file containing protein sequences.

output_prefix

A string specifying the prefix for output files generated by the workflow.

max_cluster_number

An integer specifying the maximum number of clusters to evaluate (optional).

predefined_cluster_number

An integer specifying a predefined number of clusters for PAM clustering (optional).

use_cd_hit

A logical value indicating whether to remove redundant sequences using `cd-hit` (default: TRUE).

cd_hit_path

A string specifying the path to the `cd-hit` executable (default: "cd-hit").

cutoff

A numeric value specifying the redundancy cutoff for `cd-hit` (default: 0.99).

remove_outliers

A logical value indicating whether to identify and remove outliers using DBSCAN clustering (default: TRUE).

verbose

A logical value indicating whether to print detailed messages during execution (default: FALSE).

Details

To install `cd-hit`, you can use conda: ``` conda install -c bioconda cd-hit ``` Or download it from the official website: http://weizhong-lab.ucsd.edu/cd-hit/

The workflow includes the following steps: - Filtering sequences. - Removing redundancy using `cd-hit`. - Identifying and removing outliers using DBSCAN clustering. - Performing PAM clustering to identify representative sequences. - Calculating entropy to evaluate clustering quality.

Examples

Run this code
# Example usage:
temp_dir <- tempdir()
temp_prefix <- file.path(temp_dir, "output")
input_file <- system.file("extdata", "input.fasta", package = "VIProDesign")
run_VIProDesign(
  file = input_file,
  output_prefix = temp_prefix,
  max_cluster_number = 5,
  use_cd_hit = TRUE,
  cd_hit_path = "/data/kiryst/conda/envs/VIProDesign/bin/cd-hit",
  cutoff = 0.99,
  remove_outliers = TRUE
)
# Clean up
unlink(list.files(temp_dir, full.names = TRUE))

Run the code above in your browser using DataLab