Skip to contents

Export junction or amino acid sequences in fasta format.

Usage

exportFasta(
  study_table,
  type = "junction",
  names = c("rank", "junction_aa", "duplicate_count")
)

Arguments

study_table

A tibble consisting of antigen receptor sequences imported by the LymphoSeq function readImmunoSeq().

type

A character vector indicating whether "junction_aa" or "junction" sequences should be exported. If "junction_aa" is specified, then run productiveSeq() first.

names

A character vector of one or more column names to name the sequences.If "rank" is specified, then the rank order of the sequences by frequency is used.

Value

Exports fasta files to the working directory.

Examples

file_path <- system.file("extdata", "TCRB_sequencing",
 package = "LymphoSeq2")
# Export raw data
study_table <- LymphoSeq2::readImmunoSeq(path = file_path, threads = 1)
study_table <- LymphoSeq2::topSeqs(study_table, top = 100)
LymphoSeq2::exportFasta(
  study_table = study_table, type = "junction",
  names = c("junction_aa", "duplicate_count")
)
#> Fasta files saved to /home/runner/work/LymphoSeq2/LymphoSeq2/docs/reference
# Export only productive junction amino acid sequences
amino_table <- LymphoSeq2::productiveSeq(
  study_table = study_table,
  aggregate = "junction_aa"
)
LymphoSeq2::exportFasta(
  study_table = amino_table, type = "junction_aa",
  names = "duplicate_frequency"
)
#> Fasta files saved to /home/runner/work/LymphoSeq2/LymphoSeq2/docs/reference