selex.defineSample {SELEX} | R Documentation

## Define annotation for an individual sample

### Description

A function used to manually load SELEX sample metadata and make it visible to the current session, which can then be used to create a sample handle (see `selex.sample`. It is functionally identical to `selex.loadAnnotation`, except constrained to take manual inputs for a single sample.

### Usage

    selex.defineSample(seqName, seqFile=NULL, sampleName, round, varLength,
      leftBarcode, rightBarcode, leftFlank=NULL, rightFlank=NULL,
      round0SeqName=NULL, round0SampleName=NULL)

### Arguments

`seqName` | Desired sequencing run name
`seqFile` | Path to the FASTQ file containing the sample. Can be `NULL` if `seqFile` has been previously specified for the `seqName`.
`sampleName` | Desired sample name
`round` | Sample round
`varLength` | Length of the variable region
`leftBarcode` | Left barcode sequence
`rightBarcode` | Right barcode sequence
`leftFlank` | Left flank sequence
`rightFlank` | Right flank sequence
`round0SeqName` | The sequencing run name of the round 0 data associated with this sample
`round0SampleName` | The sample name of the round 0 data associated with this sample

### Details

`selex.defineSample` should be used for rapid testing or when it is not worthwhile to generate a generate a sample annotation file. Unlike `selex.loadAnnotation`, the unique name requirement is relaxed, requiring only unique `seqName`, `seqFile`, and `round` combinations. Only one `seqFile` can be specified for a given `seqName`; for example, the following will throw an error:
`selex.defineSample('Seq1', 'Seq1.fastq.gz', round=1, rightBarcode='CCAGCTG', ...)`
`selex.defineSample('Seq1', 'Seq2.fastq.gz', round=2, rightBarcode='CCAGCTG', ...)`
However, `seqFile` can be omitted if a new sample is being specified with the same `seqName`:
`selex.defineSample('Seq1', 'Seq1.fastq.gz', round=1, rightBarcode='CCAGCTG', ...)`
`selex.defineSample('Seq1', NULL, round=1, rightBarcode='CCACGTC', ...)`
The sequencing run name and sample name of the round 0 file associated with a later-round sample can be provided to keep samples and their random pools in order.

### Value

Not applicable

### See Also

`selex.getAttributes`, `selex.loadAnnotation`, `selex.sample`, `selex.sampleSummary`, `selex.saveAnnotation`

### Examples

    selex.defineSample(seqName='R0.libraries', seqFile=exampleFiles[1],
                    sampleName='R0.barcodeGC', round = 0, varLength = 16,
                    leftBarcode = 'TGG', rightBarcode= 'CCAGCTG')

[Package SELEX version 1.16.0 Index]