Trimming adapter sequences of paired-end experiments is sometimes a problem. If you clip the mates in two steps, it migh happen that you loose one mate, but not the corresponding one, resulting in two uneven sets of mates. With the small perl-script clipPairedEndFastq.pl you are able to clip the adapters of both mates and you will end up with two correct fastq files. If both mates are too short after clipping (<15nt), both mates are deleted. If one mate is too short after clipping , but the other is long enough, there are two possibilities (-n parameter): 1) The mate which is too short is replaced by an "N", or 2) it is replaced by the original (untrimmed) read.NOTE: cutadapt has to be installed on your machine!
clipPairedEndFastq.pl
usage: clipPairedEndFastq.pl -m1 <file> -m2 <file> -o1 <file> -o2 <file> -s1 <file> -s2 <file>
[INPUT]
-m1 <file> raw mates 1
-m2 <file> raw mates 2
-a1 <string> adapter for mates 1
-a2 <string> adapter for mates 2
-o1 <file> clipped mates 1
-o2 <file> clipped mates 2
-s1 <file> clippStat mates 1
-s2 <file> clippStat mates 2
-n <int> 1: fill mates <15nt with Ns (default)
0: reset mates <15nt with original mate
-h <file> this (usefull) help message
Example: ./clipPairedEndFastq.pl -m1 R1.fq -m2 R2.fq -o1 R1.clipped.fq -o2 R2.clipped.fq -a1 ACGT -a2 ...