generate_ogrdb_report {ogrdbstats} | R Documentation |
Generate OGRDB reports from specified files.
Description
This creates the genotype report (suffixed _ogrdb_report.csv) and the plot file (suffixed _ogrdb_plos.pdf). Both are created in the directory holding the annotated read file, and the file names are prefixed by the name of the annotated read file.
Usage
generate_ogrdb_report(
ref_filename,
inferred_filename,
species,
filename,
chain,
hap_gene,
segment,
chain_type,
plot_unmutated,
all_inferred = FALSE,
format = "pdf"
)
Arguments
ref_filename |
Name of file containing IMGT-aligned reference genes in FASTA format |
inferred_filename |
Name of file containing sequences of inferred novel alleles, or '-' if none |
species |
Species name used in field 3 of the IMGT germline header with spaces omitted, if the reference file is from IMGT. Otherwise ” |
filename |
Name of file containing annotated reads in AIRR, CHANGEO or IgDiscover format. The format is detected automatically |
chain |
one of IGHV, IGKV, IGLV, IGHD, IGHJ, IGKJ, IGLJ, TRAV, TRAj, TRBV, TRBD, TRBJ, TRGV, TRGj, TRDV, TRDD, TRDJ |
hap_gene |
The haplotyping columns will be completed based on the usage of the two most frequent alleles of this gene. If NA, the column will be blank |
segment |
one of V, D, J |
chain_type |
one of H, L |
plot_unmutated |
Plot base composition using only unmutated sequences (V-chains only) |
all_inferred |
Treat all alleles as novel |
format |
The format for the plot file ('pdf', 'html' or 'none') |
Value
None
Examples
# prepare files for example
reference_set = system.file("extdata/ref_gapped.fasta", package = "ogrdbstats")
inferred_set = system.file("extdata/novel_gapped.fasta", package = "ogrdbstats")
repertoire = system.file("extdata/ogrdbstats_example_repertoire.tsv", package = "ogrdbstats")
file.copy(repertoire, tempdir())
repfile = file.path(tempdir(), 'ogrdbstats_example_repertoire.tsv')
generate_ogrdb_report(reference_set, inferred_set, 'Homosapiens',
repfile, 'IGHV', NA, 'V', 'H', FALSE, format='none')
#clean up
outfile = file.path(tempdir(), 'ogrdbstats_example_repertoire_ogrdb_report.csv')
file.remove(repfile)
file.remove(outfile)