From b6c3ed0295395cc07dda28a02c05a619ae1983d8 Mon Sep 17 00:00:00 2001
From: Mauricio Carneiro This tool provides simple, powerful read clipping capabilities that allow you to remove low quality strings of bases, sections of reads, and reads containing user-provided sequences.
- * It allows the user to clip bases in reads with poor quality scores, that match particular
- * sequences, or that were generated by particular machine cycles.
+ * There are three options for clipping (quality, position and sequence), which can be used alone or in combination. In addition, you can also specify a clipping representation, which determines exactly how ClipReads applies clips to the reads (soft clips, writing Q0 base quality scores, etc.). Please note that you MUST specify at least one of the three clipping options, and specifying a clipping representation is not sufficient. If you do not specify a clipping option, the program will run but it will not do anything to your reads.
*
*
- *
argmax_x{ \sum{i = x + 1}^l (qTrimmingThreshold - qual)
- * to the end of the read. This is blatantly stolen from BWA.
+ * argmax_x{ \sum{i = x + 1}^l (qTrimmingThreshold - qual)
+ * to the end of the read. This is copied from BWA.
*
* Walk through the read from the end (in machine cycle order) to the beginning, calculating the
* running sum of qTrimmingThreshold - qual. While we do this, we track the maximum value of this
* sum where the delta > 0. After the loop, clipPoint is either -1 (don't do anything) or the
* clipping index in the read (from the end).
- *
*
*
@@ -99,7 +97,7 @@ import java.util.regex.Pattern; * operation applied to each read. *
*- *
* Number of examined reads 13 * Number of clipped reads 13 @@ -113,16 +111,29 @@ import java.util.regex.Pattern; ** * - *
- *
+ * java -jar GenomeAnalysisTK.jar \ + * -T ClipReads \ + * -R reference.fasta \ + * -I original.bam \ + * -o clipped.bam \ + * -XF seqsToClip.fasta \ + * -X CCCCC \ + * -CT "1-5,11-15" \ + * -QT 10 + *+ *
The command line shown above will apply all three options in combination. See the detailed examples below to see how the choice of clipping representation affects the output.
+ * + *Suppose we are given this read:
** 314KGAAXX090507:1:19:1420:1123#0 16 chrM 3116 29 76M * * * * TAGGACCCGGGCCCCCCTCCCCAATCCTCCAACGCATATAGCGGCCGCGCCTTCCCCCGTAAATGATATCATCTCA * #################4?6/?2135;;;'1/=/<'B9;12;68?A79@,@==@9?=AAA3;A@B;A?B54;?ABA ** - * If we are clipping reads with -QT 10 and -CR WRITE_NS, we get: + *
If we are clipping reads with -QT 10 and -CR WRITE_NS, we get:
* ** 314KGAAXX090507:1:19:1420:1123#0 16 chrM 3116 29 76M * * * @@ -130,26 +141,20 @@ import java.util.regex.Pattern; * #################4?6/?2135;;;'1/=/<'B9;12;68?A79@,@==@9?=AAA3;A@B;A?B54;?ABA ** - * Whereas with -CR WRITE_Q0S: + *
Whereas with -QT 10 -CR WRITE_Q0S:
** 314KGAAXX090507:1:19:1420:1123#0 16 chrM 3116 29 76M * * * * TAGGACCCGGGCCCCCCTCCCCAATCCTCCAACGCATATAGCGGCCGCGCCTTCCCCCGTAAATGATATCATCTCA * !!!!!!!!!!!!!!!!!4?6/?2135;;;'1/=/<'B9;12;68?A79@,@==@9?=AAA3;A@B;A?B54;?ABA ** - * Or -CR SOFTCLIP_BASES: + *
Or -QT 10 -CR SOFTCLIP_BASES:
** 314KGAAXX090507:1:19:1420:1123#0 16 chrM 3133 29 17S59M * * * * TAGGACCCGGGCCCCCCTCCCCAATCCTCCAACGCATATAGCGGCCGCGCCTTCCCCCGTAAATGATATCATCTCA * #################4?6/?2135;;;'1/=/<'B9;12;68?A79@,@==@9?=AAA3;A@B;A?B54;?ABA *- * * - *
- * -T ClipReads -I my.bam -I your.bam -o my_and_your.clipped.bam -R Homo_sapiens_assembly18.fasta \ - * -XF seqsToClip.fasta -X CCCCC -CT "1-5,11-15" -QT 10 - ** @author Mark DePristo * @since 2010 @@ -158,10 +163,9 @@ import java.util.regex.Pattern; @Requires({DataSource.READS}) public class ClipReads extends ReadWalker