Generating JSON File

 

Can be generated from Excel spreadsheet template, or for simple cases, directly from multifasta file. The Excel template is located on aspen at /scratch/dlemmer/ASAP/assay_data/ASAP_assay_template.xltx (monsoon is: /scratch/dl765/ASAP/assay_data/ASAP_assay_template.xltx)

 

prepareJSONInput -x <EXCEL_FILE> -o <OUTPUT_JSON_FILE>

 

Full usage details:

usage: prepareJSONInput [-h] (-f FILE | -x FILE) -o FILE [-w WORKSHEET] [-V]

 

asap.prepareJSONInput -- Create a JSON input file for ASAP from a multifasta or Excel spreadsheet

 

optional arguments:

-h, --help             show this help message and exit

-w WORKSHEET, --worksheet WORKSHEET

                       Excel worksheet to use, the first one in the file will be used if not specified

-V, --version          show program's version number and exit

 

required arguments:

-f FILE, --fasta FILE

                       fasta file containing amplicon sequences.

-x FILE, --excel FILE

                       Excel file of assay data.

-o FILE, --out FILE    output JSON file to write. [REQUIRED]

 

Running ASAP

 

analyzeAmplicons -n <RUN_NAME> -j <PATH_TO_JSON_FILE> -r <DIRECTORY_OF_READ_FILES> -o <OUTPUT_DIRECTORY> <other options>

 

<RUN_NAME> can be whatever you want, the final output file will be: <OUTPUT_DIRECTORY>/<RUN_NAME>_analysis.xml

 

You can also change the depth (default 100), proportion (default 0.1), breadth (default 0.8) filters using the -d and -p and -b options

 

Pre-made JSON files are located on aspen at /scratch/dlemmer/ASAP/assay_data/*.json (monsoon: /scratch/dl765/ASAP/assay_data/*.json)

 

Full usage details:

usage: analyzeAmplicons [-h] -n NAME -j JSON [-r DIR | -b DIR] [-o DIR]

 [--trim | --no-trim] [-s ADAPTERS] [-q [QUAL]]

 [-m LEN] [-a ALIGNER] [--aligner-args ARGS] [-d DEPTH]

 [--breadth BREADTH] [-p PROPORTION] [-V]

 

asap.analyzeAmplicons -- Align and interpret amplicon sequencing reads

 

optional arguments:

-h, --help              show this help message and exit

-V, --version           show program's version number and exit

 

required arguments:

-n NAME, --name NAME    name for this run. [REQUIRED]

-j JSON, --json JSON    JSON file of assay descriptions. [REQUIRED]

 

optional arguments:

-r DIR, --read-dir DIR

                        directory of read files to analyze.

--bam-dir DIR           directory of bam files to analyze.

-o DIR, --out-dir DIR

                        directory to write output files to. [default: `pwd`]

-s JOB_MANAGER, --submitter JOB_MANAGER

                        cluster job submitter to use (PBS, SLURM, SGE, none). [default: PBS]

--submitter-args ARGS

                        additional arguments to pass to the job submitter, enclosed in "".

--smor                  perform SMOR analysis with overlapping reads. [default: False]

 

read trimming options:

--trim                  perform adapter trimming on reads. [default: True]

--no-trim               do not perform adapter trimming.

-s ADAPTERS, --adapter-sequences ADAPTERS

                        location of the adapter sequence file to use for trimming. [default: 

                        <ASAP install dir>/asap/illumina_adapters_all.fasta]

-q [QUAL], --qual [QUAL]

                        perform quality trimming [default: False], optional parameter can be used to 

                        customize quality trimming parameters to trimmomatic. 

                        [default: SLIDINGWINDOW:5:20]

-m LEN, --minlen LEN    minimum read length to keep after trimming. [default: 80]

 

read mapping options:

-a ALIGNER, --aligner ALIGNER

                        aligner to use for read mapping, supports bowtie2, novoalign, and bwa. 

                        [default: bowtie2]

--aligner-args ARGS     additional arguments to pass to the aligner, enclosed in "".

-d DEPTH, --depth DEPTH

                        minimum read depth required to consider a position covered. [default: 100]

-b BREADTH, --breadth BREADTH

                        minimum breadth of coverage required to consider an amplicon as present. 

                        [default: 0.8]

-p PROPORTION, --proportion PROPORTION

                        minimum proportion required to call a SNP at a given position. [default: 0.1]

-i PERCID, --identity PERCID

                        minimum percent identity required to align a read to a reference amplicon 

                        sequence. [default: 0]

 

This command will ultimately generate the xml file. To convert this into more better things, run:

 

Formatting Output

 

formatOutput -s <XSLT_FILE> -x <XML_OUTPUT_FILE> -o <MAIN_OUTPUT_FILE_TO_WRITE>

 

This will generate all the html files, which you can open directly in your web browser. XSLT files are located on aspen at /scratch/dlemmer/ASAP/output_transforms/*.xsl (monsoon: /scratch/dl765/ASAP/output_transforms/*.xsl)

 

Full usage details:

usage: formatOutput [-h] -s FILE -x FILE [-o FILE] [-V]

 

asap.formatOutput -- Apply an XSLT transformation on the XML output to generate a more user-friendly output

 

optional arguments:

-h, --help              show this help message and exit

-t, --text              output plain text

-V, --version           show program's version number and exit

 

required arguments:

-s FILE, --stylesheet FILE

                        XSLT stylesheet to use for transforming the output. [REQUIRED]

-x FILE, --xml FILE     XML output file to transform. [REQUIRED]

-o FILE, --out FILE     output file to write. [REQUIRED]