From 3edcefb7fbccd5826d3f4f56bf492c21d3ca11b0 Mon Sep 17 00:00:00 2001 From: asivache Date: Wed, 27 Jan 2010 17:06:49 +0000 Subject: [PATCH] add _gI and _gD to the indel probe names according to the spec (in the hope that wiki is not obsolete); added optional cmd line param -project_id to prefix all probe names with. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2704 348d0f76-0448-11de-a6fe-93d51630548a --- .../gatk/walkers/fasta/PickSequenomProbes.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/fasta/PickSequenomProbes.java b/java/src/org/broadinstitute/sting/gatk/walkers/fasta/PickSequenomProbes.java index 12580ae68..965ee935c 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/fasta/PickSequenomProbes.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/fasta/PickSequenomProbes.java @@ -22,7 +22,8 @@ import java.util.*; public class PickSequenomProbes extends RefWalker { @Argument(required=false, shortName="snp_mask", doc="positions to be masked with N's") protected String SNP_MASK = null; - + @Argument(required=false, shortName="project_id",doc="If specified, all probenames will be prepended with 'project_id|'") + String project_id = null; private byte [] maskFlags = new byte[401]; private SeekableRODIterator snpMaskIterator=null; @@ -103,8 +104,18 @@ public class PickSequenomProbes extends RefWalker { else return ""; - String assay_id = new String(context.getLocation().toString() + "_" + ref.getWindow().toString()).replace(':', '_'); - return assay_id + "\t" + assay_sequence + "\n"; + StringBuilder assay_id = new StringBuilder(); + if ( project_id != null ) { + assay_id.append(project_id); + assay_id.append('|'); + } + assay_id.append(context.getLocation().toString().replace(':','_')); + assay_id.append('_'); + if ( variant.isInsertion() ) assay_id.append("gI_"); + else if ( variant.isDeletion()) assay_id.append("gD_"); + + assay_id.append(ref.getWindow().toString().replace(':', '_')); + return assay_id.toString() + "\t" + assay_sequence + "\n"; } public String reduceInit() {