parse_imgt_fasta {TCRconvertR}R 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)

[Package TCRconvertR version 1.0 Index]