annotate filter-wrapper.sh @ 8:35f9b833e12b draft default tip

planemo upload commit 2774930eebe258ecd56c8f1c5ddabf5092282ab9
author bcclaywell
date Mon, 12 Oct 2015 16:09:02 -0400
parents 2d023c621bd0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
1 #!/bin/bash
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
2
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
3 source $(dirname $0)/util.sh
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
4 source $1
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
5
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
6 INPUT_QUAL=$(extify qual ${INPUT_QUAL})
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
7 BARCODES=$(extify csv ${BARCODES})
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
8 RAW_SEQS=$(extify fasta ${RAW_SEQS})
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
9
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
10 seqmagick quality-filter \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
11 --input-qual ${INPUT_QUAL} \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
12 --barcode-file ${BARCODES} \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
13 --primer "${PRIMER}" \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
14 --report-out ${FILTER_REPORT} \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
15 --details-out ${FILTER_DETAILS} \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
16 --map-out ${SPLIT_MAP} \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
17 --barcode-header \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
18 --min-length ${MIN_LENGTH} \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
19 --min-mean-quality ${MIN_QUALITY} \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
20 --quality-window 30 \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
21 --quality-window-prop 0.9 \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
22 --quality-window-mean-qual 15 \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
23 ${RAW_SEQS} \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
24 filtered.fasta
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
25
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
26 if [[ ${REVERSE_COMPLEMENT} == "TRUE" ]]; then
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
27 seqmagick mogrify \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
28 --reverse-complement \
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
29 filtered.fasta
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
30 fi
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
31
ce6db18f5fd3 Uploaded
bcclaywell
parents:
diff changeset
32 mv filtered.fasta ${FILTERED_SEQS}
5
2d023c621bd0 Uploaded
bcclaywell
parents: 2
diff changeset
33
2d023c621bd0 Uploaded
bcclaywell
parents: 2
diff changeset
34 sequencing_quality_report.py ${PLATE_JSON} -t "Sequencing quality report" -o ${SQR_DIR}
2d023c621bd0 Uploaded
bcclaywell
parents: 2
diff changeset
35
2d023c621bd0 Uploaded
bcclaywell
parents: 2
diff changeset
36 cat <<EOF > ${SQR}
2d023c621bd0 Uploaded
bcclaywell
parents: 2
diff changeset
37 <!DOCTYPE HTML>
2d023c621bd0 Uploaded
bcclaywell
parents: 2
diff changeset
38 <html lang="en-US">
2d023c621bd0 Uploaded
bcclaywell
parents: 2
diff changeset
39 <head/>
2d023c621bd0 Uploaded
bcclaywell
parents: 2
diff changeset
40 <body>
2d023c621bd0 Uploaded
bcclaywell
parents: 2
diff changeset
41 <a href="index.html">Sequencing quality report</a>
2d023c621bd0 Uploaded
bcclaywell
parents: 2
diff changeset
42 </body>
2d023c621bd0 Uploaded
bcclaywell
parents: 2
diff changeset
43 </html>
2d023c621bd0 Uploaded
bcclaywell
parents: 2
diff changeset
44 EOF