File: process_radtags.t

package info (click to toggle)
stacks 2.41+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,740 kB
  • sloc: cpp: 37,468; sh: 1,953; perl: 1,174; python: 497; makefile: 139
file content (87 lines) | stat: -rwxr-xr-x 3,039 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/usr/bin/env bash

# Preamble
test_path=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
test_data_path="$test_path/"$(basename "${BASH_SOURCE[0]}" | sed -e 's@\.t$@@')
source $test_path/setup.sh

# Setup
barcodes=$test_data_path/frequent_data/Barcodes.txt
freq_in=$test_data_path/frequent_data/in.fastq.gz 
freq_in2=$test_data_path/frequent_data/in.fastq

plan 15

# # Example libtap tests.  Uncomment to run.
# ok "This test will pass" true
# ok "This test will fail" ls -al /this/file/does/not/exist
# diag 'I just love word plays ...'
# ok "This test is expected to fail# TODO fix this" ls -al /neither/does/this/file
# skip "This command doesn't make sense:" more /dev/null

# process_radtags tests

ok_ 'input gzfastq' \
    000_input_gzfastq \
    "process_radtags -i gzfastq -f $freq_in -o %out -b $barcodes -E phred33 -e sbfI"

ok_ 'input fastq' \
    001_input_fastq \
    "process_radtags -i fastq -f $freq_in2 -o %out -b $barcodes -E phred33 -e sbfI"

diag 'FIXME: Input files for this test are NOT actaully phred64 encoded! This is just an example test...'

ok_ 'input phred64' \
    002_input_phred64 \
    "process_radtags -i gzfastq -f $freq_in -o %out -b $barcodes -E phred64 -e sbfI"

ok_ 'clean' \
    003_clean_data \
    "process_radtags -i gzfastq -f $freq_in -o %out -b $barcodes -E phred33 -e sbfI -c"

ok_ 'discarded reads' \
    004_discarded_reads \
    "process_radtags -i gzfastq -f $freq_in -o %out -b $barcodes -E phred33 -e sbfI -D"

ok_ 'fasta output' \
    005_output_fasta \
    "process_radtags -i gzfastq -f $freq_in -o %out -b $barcodes -E phred33 -e sbfI -y fasta"

ok_ 'discard low quality reads' \
    006_discard_lq \
    "process_radtags -i gzfastq -f $freq_in -o %out -b $barcodes -E phred33 -e sbfI -q"

ok_ 'rescue barcodes and radtags' \
    007_rescue_bcrt \
    "process_radtags -i gzfastq -p %in -o %out -b $barcodes -E phred33 -e sbfI -r"

ok_ 'truncate final read length' \
    008_truncate \
    "process_radtags -i gzfastq -f $freq_in -o %out -b $barcodes -E phred33 -e sbfI -t 50"

ok_ 'set window length' \
    009_winlen \
    "process_radtags -i gzfastq -p %in -o %out -b $barcodes -E phred33 -e sbfI -q -w .12"

ok_ 'minimum window score' \
    010_minscore \
    "process_radtags -i gzfastq -f $freq_in -o %out -b $barcodes -E phred33 -e sbfI -q -s 15"

ok_ 'merge output' \
    011_merge \
    "process_radtags -i gzfastq -f %in/in.fastq.gz -o %out -E phred33 -e sbfI --merge"

ok_ 'Remove sequences marked by Illumina as failing chastity/purity filter' \
    012_filt_ill \
    "process_radtags -i gzfastq -f %in/in.fastq.gz -o %out -E phred33 -e sbfI -b $barcodes --filter_illumina"

ok_ 'Disable checking for RAD site' \
    013_disrc \
    "process_radtags -i gzfastq -f %in/in.fastq.gz -o %out -E phred33 -e sbfI -b $barcodes --disable_rad_check"

ok_ 'Provide distance between barcodes for rescue' \
    014_bcdist \
    "process_radtags -i gzfastq -f %in/in.fastq.gz -o %out -E phred33 -e sbfI -b $barcodes --barcode_dist 1 -r"

# I'm not sure yet what finish() does.
finish