Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
generic, slightly insane paired end quality trimming script
#!/bin/bash
# trim.sh - generic, slightly insane paired end quality trimming script
# Vince Buffalo <vsbuffaloAAAAAA@gmail.com> (sans poly-A)
set -e
set -u
## pre-config
ADAPTERS=illumina_adapters.fa
SAMPLE_NAME=some_sample_name
IN1=in1.fastq
IN2=in2.fastq
## presets
PRIOR=0.4
QUAL_THRESH=20
time (sickle pe -t sanger -q $QUAL_THRESH \
-f <(seqqs -e -p raw_${SAMPLE_NAME}_R1 $IN1 | scythe -a $ADAPTERS -p $PRIOR - 2> ${SAMPLE_NAME}_R1_scythe.stderr) \
-r <(seqqs -e -p raw_${SAMPLE_NAME}_R2 $IN2 | scythe -a $ADAPTERS -p $PRIOR - 2> ${SAMPLE_NAME}_R2_scythe.stderr) \
-o >(seqqs -e -p trimmed_${SAMPLE_NAME}_R1 - | gzip > ${SAMPLE_NAME}_R1_trimmed.fq.gz) \
-p >(seqqs -e -p trimmed_${SAMPLE_NAME}_R2 - | gzip > ${SAMPLE_NAME}_R2_trimmed.fq.gz) \
-s >(seqqs -e -p trimmed_${SAMPLE_NAME}_singles - | gzip > ${SAMPLE_NAME}_singles_trimmed.fq.gz) 2> ${SAMPLE_NAME}_sickle.stderr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment