readClonotypeSet: read clonotype table set

Description Usage Arguments Value See Also Examples

Description

function reads all clonotype tables stored in a folder, filters reads and assay reads for each clonotype.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
readClonotypeSet(
  fileList,
  cores = 1L,
  aligner = c("MiXCR", "Adaptive", "rTCR", "ClonotypeR"),
  chain = c("A", "B"),
  sampleinfo = NULL,
  keep.ambiguous = FALSE,
  keep.unproductive = FALSE,
  filterSingleton = FALSE,
  aa.th = 8,
  raretab = TRUE
)

Arguments

fileList

a list of file paths to import.

cores

an interger number of cores to use. Default is 1.

aligner

software used to align reads ("Adaptive", "rTCR", "ClonotypeR" or "MiXCR"). Default is MiXCR.

chain

an character indicates which TCR chain alpha or beta to import, Use A for alpha chain and B for beta chain. Default is A.

sampleinfo

a data frame containing sample information for each clonotype file in fileList. The number of rows of sampleinfo must be identical to the number of file in fileList. A data frame containing If NULL

keep.ambiguous

a boolean. If TRUE, ambiguous clonotypes (contain STOP codon) will be kept in analysis. Default is FALSE.

keep.unproductive

a boolean. If TRUE, unproductive clonotypes (Euclidean dividion of aa length by 3 > 0) will be kept in analysis. Default is FALSE.

filterSingleton

a boolean. If TRUE clonotypes having 1 count in only 1 sample will be removed. Default is FALSE.

aa.th

an interger indicates the maximal number of amino acids could be deviated from the mean length. Default is 8.

raretab

a boolean indicating whether a rarefaction tab should be generated.

Value

an object of class RepSeqExperiment.

See Also

raretabRepSeq

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
# The package RepSeqData contains example datasets 
l <- list.files(system.file(file.path('extdata/mixcr'), 
                     package = 'RepSeqData'), 
                     full.names = TRUE)
l# list of gz-compressed files 
sampleData <- read.table(system.file(file.path('extdata/sampledata.txt'), 
                         package='RepSeqData'), 
                         sep = "\t", 
                         row.names = 2) 
dataset <- readClonotypeSet(fileList = l, 
                       cores=1L, 
                       aligner = "MiXCR", 
                       chain = "B", 
                       sampleinfo = sampleData, 
                       keep.ambiguous=FALSE, 
                       keep.unproductive=FALSE, 
                       aa.th=8,
                       raretab = TRUE)
dataset

## End(Not run)

ph-pham/RepSeq documentation built on Dec. 22, 2021, 7:47 a.m.