Learn R Programming

SELEX (version 1.4.0)

selex.loadAnnotation: Load a sample annotation file

Description

A function used to load sample metadata contained within a sample annotation file and make it visible to the current SELEX session. These samples can then be used to create sample handles (see selex.sample).

Usage

selex.loadAnnotation(config_path, data_folder=NULL)

Arguments

config_path
Location on disk to the sample annotation file.
data_folder
Location on disk where FASTQ sample files are stored. This is either an absolute path, or relative to the location of the annotation file. If unspecified, it uses the parent folder of the annotation file.

Value

Details

A sample annotation file is an XML file that acts as a database storing metadata for different SELEX experiments. Here, a SELEX experiment refers to a single SELEX round that has been sequenced. Such a database allows the user to explicitly store all relevant information in a structured manner for easy future access. A sample annotation file is provided below. Every annotation file can contain multiple SequencingRunInfo instances; every instance within an annotation file must contain a unique name. If multiple annotation files are used in a given SELEX session, all such names must be unique. For example, the following annotation files A and B File A and File B have a legal naming system if either File A or File B is used in a single SELEX session, but have an invalid naming system if both are used. In general, it is a good idea to ensure that every SequencingRunInfo name is unique. Every SequencingRunInfo instance references a single FASTQ file. The user has the option of providing additional metadata regarding the FASTQ file. A SequencingRunInfo instance can contain multiple Samples. Every Sample name within a SequencingRunInfo instance must contain a unique name and round combination. For example, and is a valid name Sample name combinations while and is not. Non Round 0 Samples have the option of referencing a Round 0 file, working as a checking mechanism to prevent the wrong Round 0 sample from being used to analyze a later round sample. Once samples have been loaded into the current SELEX session, a sample handle can be generated using the SequencingRunInfo name, Sample name, and Round number. Sample handles make it easier to reference individual Samples while running an analysis. See selex.sample for more information.

See Also

selex.defineSample, selex.getAttributes, selex.sample, selex.sampleSummary, selex.saveAnnotation

Examples

Run this code
#Initialize the SELEX package
#options(java.parameters="-Xmx1500M")
#library(SELEX) 

# Configure the current session
workDir = file.path(".", "SELEX_workspace")
selex.config(workingDir=workDir,verbose=FALSE, maxThreadNumber= 4)

# Extract sample data from package, including XML database
sampleFiles = selex.exampledata(workDir)

# Load & display all sample files using XML database
selex.loadAnnotation(sampleFiles[3])
selex.sampleSummary()

# Create a sample handle
r0 = selex.sample(seqName="R0.libraries", sampleName="R0.barcodeGC", round=0)

# Use the sample handle to display sample properties
selex.getAttributes(r0)

Run the code above in your browser using DataLab