3 # Remove adaptor from sequences and trim according to scores.
4 # Produces a number of plots during the process.
6 # Usage: read_fastq -i test.fq | clean_reads.sh | write_fastq -xo clean.fq
8 adaptor='TCGTATGCCGTCTTCTGCTTG' # 454 adaptor
9 #adaptor='AGATCGGAAGACACACGTCT' # Solexa adaptor
13 plot_lendist -t post -o 00_remove_adaptor_lendist_seq_before.$pid.ps -k SEQ_LEN |
14 find_adaptor -a $adaptor -p |
15 plot_histogram -t post -o 01_remove_adaptor_histogram_adaptor_pos.$pid.ps -k ADAPTOR_POS -s num |
16 plot_lendist -t post -o 02_remove_adaptor_lendist_adaptor_len.$pid.ps -k ADAPTOR_LEN |
17 analyze_vals -k ADAPTOR_POS,ADAPTOR_LEN -o 03_remove_adaptor_analyze_vals.$pid.txt |
19 plot_scores -t post -o 04_trim_seq_scores_pretrim.$pid.ps |
20 plot_lendist -k SEQ_LEN -t post -o 05_trim_seq_lendist_pretrim.$pid.ps |
22 grab -e "SEQ_LEN>=50" |
24 grab -e "SCORES_LOCAL_MEAN>=15" |
25 plot_scores -t post -o 06_trim_seq_scores_posttrim.$pid.ps |
26 plot_lendist -k SEQ_LEN -t post -o 07_trim_seq_lendist_posttrim.$pid.ps