parse_imgt_fasta: Extract gene names from a reference FASTA

View source: R/build_lookup.R

parse_imgt_fastaR Documentation

Extract gene names from a reference FASTA

Description

parse_imgt_fasta() extracts the second element from a "|"-delimited FASTA header, which will be the gene name for IMGT reference FASTAs.

Usage

parse_imgt_fasta(infile)

Arguments

infile

A string, the path to FASTA file.

Value

A character vector of gene names.

Examples

# Given a FASTA file containing this header:
#   >SomeText|TRBV29-1*01|MoreText|
#   >SomeText|TRBV29-1*02|MoreText|
#   >SomeText|TRBV29/OR9-2*01|MoreText|

fasta <- get_example_path("fasta_dir/test_trbv.fa")
parse_imgt_fasta(fasta)

TCRconvertR documentation built on June 8, 2025, 10:43 a.m.