From dd46d843fb186b4b9bd377cba0374b326865f460 Mon Sep 17 00:00:00 2001 From: Eric Banks Date: Wed, 6 Jun 2012 11:04:55 -0400 Subject: [PATCH] IR should skip Ion reads just like it does with 454 reads; Tim has confirmed that official platform name for Ion. --- .../gatk/walkers/indels/IndelRealigner.java | 5 +++-- .../sting/utils/sam/ReadUtils.java | 21 ++++++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java index 8f939fc49..e12f26fcc 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java @@ -532,8 +532,9 @@ public class IndelRealigner extends ReadWalker { read.getMappingQuality() == 0 || read.getAlignmentStart() == SAMRecord.NO_ALIGNMENT_START || ConstrainedMateFixingManager.iSizeTooBigToMove(read, MAX_ISIZE_FOR_MOVEMENT) || - ReadUtils.is454Read(read); - // TODO -- it would be nice if we could use indels from 454 reads as alternate consenses + ReadUtils.is454Read(read) || + ReadUtils.isIonRead(read); + // TODO -- it would be nice if we could use indels from 454/Ion reads as alternate consenses } private void cleanAndCallMap(ReferenceContext ref, GATKSAMRecord read, ReadMetaDataTracker metaDataTracker, GenomeLoc readLoc) { diff --git a/public/java/src/org/broadinstitute/sting/utils/sam/ReadUtils.java b/public/java/src/org/broadinstitute/sting/utils/sam/ReadUtils.java index 4e2fd1446..d2d5e6bc5 100755 --- a/public/java/src/org/broadinstitute/sting/utils/sam/ReadUtils.java +++ b/public/java/src/org/broadinstitute/sting/utils/sam/ReadUtils.java @@ -211,7 +211,7 @@ public class ReadUtils { } /** - * is the read a 454 read ? + * is the read a 454 read? * * @param read the read to test * @return checks the read group tag PL for the default 454 tag @@ -221,7 +221,17 @@ public class ReadUtils { } /** - * is the read a SOLiD read ? + * is the read an IonTorrent read? + * + * @param read the read to test + * @return checks the read group tag PL for the default ion tag + */ + public static boolean isIonRead(SAMRecord read) { + return isPlatformRead(read, "IONTORRENT"); + } + + /** + * is the read a SOLiD read? * * @param read the read to test * @return checks the read group tag PL for the default SOLiD tag @@ -231,7 +241,7 @@ public class ReadUtils { } /** - * is the read a SLX read ? + * is the read a SLX read? * * @param read the read to test * @return checks the read group tag PL for the default SLX tag @@ -241,10 +251,11 @@ public class ReadUtils { } /** - * checks if the read has a platform tag in the readgroup equal to 'name' ? + * checks if the read has a platform tag in the readgroup equal to 'name'. + * Assumes that 'name' is upper-cased. * * @param read the read to test - * @param name the platform name to test + * @param name the upper-cased platform name to test * @return whether or not name == PL tag in the read group of read */ public static boolean isPlatformRead(SAMRecord read, String name) {