createDR2SConf: Create a 'DR2S' configuration object.

Description Usage Arguments Value locus datadir Outdir Reference See Also Examples

View source: R/config.R View source: R/all-generics.R

Description

Create a DR2S configuration object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
createDR2SConf(
  sample,
  locus,
  longreads = list(dir = "pacbio", type = "pacbio", mapper = "minimap"),
  shortreads = NULL,
  datadir = ".",
  outdir = "./output",
  reference = NULL,
  details = NULL,
  opts = NULL,
  ...
)

Arguments

sample

A unique sample identifier used to locate the long and short read FASTQ/FASTA files.

locus

The HLA or KIR locus (e.g., "A", "DPB1", or "2DL1"; see Note).

longreads

Location, type, and mapper for longreads as a named list with the fields dir, type ("pacbio" or "nanopore") and mapper ("bwamem" or "minimap").

shortreads

(optional) Location, type, and mapper for short reads as a named list with the fields dir, type ("illumina") and mapper ("bwamem" or "minimap").

datadir

The data directory (See Note).

outdir

The output directory (See Note).

reference

(optional) Path to reference sequence (See Note).

details

<named list> of sample metadata or NULL. Will be written into the fasta header of the final sequences and stored in the config json

opts

<named list> of arguments to the DR2S pipeline functions or NULL. Will be stored in the config json.

...

Further arguments.

Value

A DR2S config object

locus

The locus can be specified generically, e.g. "A", "B", or "2DL1". In this case a generic, locus-specific reference will initially be used. Alternatively a locus can be specified more specifically by including allele code information (if available), e.g. "DPB1*04:01:01:01". In this case the specified allele will be used as initial reference.

datadir

A datadir must contain subdirectories (default: "pacbio" and "illumina") containig long read FASTQs/FASTAs in the format SAMPLE_LOCUS_*.fast(q|a)(.gz) and short read FASTQs/FASTAs in the format SAMPLE_LOCUS_*R[12]*.fast(q|a)(.gz), respectively.

Outdir

All output will be placed in directory hierarchy OUTDIR/SAMPLE/LOCUS

Reference

References can be specified as a path to a fasta file containing the reference sequence.

See Also

Other DR2S mapper functions: cache(), clear(), mapFinal(), mapInit(), mapIter(), partitionLongreads(), remapAlignment(), reportCheckedConsensus(), report()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
x <- InitDR2S(createDR2SConf(
  sample = "ID12300527",
  locus = "DPB1*04:01:01:01",
  datadir = "/path/to/data",
  outdir = "/path/to/output"
  )) %>%
  mapInit() %>%
  partitionLongreads() %>%
  mapIter() %>%
  partitionShortreads() %>%
  mapFinal() %>%
  report(blockWidth = 60)

## End(Not run)

DKMS-LSL/dr2s documentation built on March 14, 2021, 2:46 p.m.