From 862b299b47a3806344b05a3154f4f05c60abf132 Mon Sep 17 00:00:00 2001 From: hanna Date: Wed, 26 Jan 2011 03:42:46 +0000 Subject: [PATCH] Fix Picard OTF index generation issue. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5077 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/utils/sam/GATKSAMRecord.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/java/src/org/broadinstitute/sting/utils/sam/GATKSAMRecord.java b/java/src/org/broadinstitute/sting/utils/sam/GATKSAMRecord.java index 3536e847d..2ce8653b1 100755 --- a/java/src/org/broadinstitute/sting/utils/sam/GATKSAMRecord.java +++ b/java/src/org/broadinstitute/sting/utils/sam/GATKSAMRecord.java @@ -443,4 +443,20 @@ public class GATKSAMRecord extends SAMRecord { public String toString() { return mRecord.toString(); } public SAMFileSource getFileSource() { return mRecord.getFileSource(); } + + /** + * Sets a marker providing the source reader for this file and the position in the file from which the read originated. + * @param fileSource source of the given file. + */ + @Override + protected void setFileSource(final SAMFileSource fileSource) { + try { + Method method = SAMRecord.class.getDeclaredMethod("setFileSource",SAMFileSource.class); + method.setAccessible(true); + method.invoke(mRecord,fileSource); + } + catch(Exception ex) { + throw new ReviewedStingException("Unable to invoke setFileSource method",ex); + } + } }