The cutadapt software provides a convenient and reliable way to:
# Download and unzip the latest version of cutadapt:
wget https://files.pythonhosted.org/packages/2f/02/f7550d8f1f53690d0812242800ed0f1f847945d07c0749f830a5f52c79ee/cutadapt-3.4.tar.gz
tar -xzf cutadapt-3.4.tar.gz
# Install the Python setuptools:
sudo apt-get install python-setuptools
# Install cutadapt:
cd cutadapt-3.4
sudo python setup.py install
# Read 1
cutadapt -u 3 input.fastq | cutadapt -a AAAAAAAA - | cutadapt -a AAAAAAAN$ -a AAAAAAN$ -a AAAAAN$ - | cutadapt -a AGAGCACACGTCTG - | cutadapt -O 8 -g GTTCAGAGTTCTACAGTCCGACGATCNNN - | cutadapt -m 18 -o output.fastq -
# Read 2
cutadapt -a CCCGATCGTCGG read2.fastq | cutadapt -a GGGGATCGTCGG - | cutadapt -m 18 -o output.fastq
# Read 1
cutadapt -a GATCGGAAGAGCACACGT input.fastq | cutadapt -m 18 -o output.fastq -
# Read 2
cutadapt -a GATCGGAAGAGCACACGT input.fastq | cutadapt -m 18 -o output.fastq -
# Read 1
cutadapt -a AGATCGGAAGAGCACACGTCT input.fastq | cutadapt -m 18 -o output.fastq -
# Read 2
cutadapt -a GATCGTCGGACTGTAGAACTC input.fastq | cutadapt -m 18 -o output.fastq -
# Read 1
cutadapt -a TGGAATTCTCGGGTGCCAAGG input.fastq | cutadapt -m 18 -o output.fastq -
# Read 2
cutadapt -a GATCGTCGGACTGTAGAACTC input.fastq | cutadapt -m 18 -o output.fastq -
# Read 1
cutadapt -a AGATCGGAAGAGCACACGTCT input.fastq | cutadapt -m 18 -o output.fastq -
# Read 2
cutadapt -a AGATCGGAAGAGCGTCGTGTA input.fastq | cutadapt -m 18 -o output.fastq -
# Read 1
cutadapt -a AGATCGGAAGAGCACACGTCT input.fastq | cutadapt -m 18 -o output.fastq -
# Read 2
cutadapt -a AGATCGGAAGAGCGTCGTGTA input.fastq | cutadapt -m 18 -o output.fastq -