From b69c2d0f70dba9684a6cb4108f719d7c9778274a Mon Sep 17 00:00:00 2001 From: hanna Date: Fri, 26 Feb 2010 21:50:48 +0000 Subject: [PATCH] Cleanup. Remove some unnecessary methods. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2900 348d0f76-0448-11de-a6fe-93d51630548a --- .../shards/BAMFormatAwareShard.java | 8 ------- .../shards/BlockDelimitedReadShard.java | 12 +++++------ .../shards/IndexDelimitedLocusShard.java | 21 ------------------- 3 files changed, 5 insertions(+), 36 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/datasources/shards/BAMFormatAwareShard.java b/java/src/org/broadinstitute/sting/gatk/datasources/shards/BAMFormatAwareShard.java index 5508d6db0..ca475b875 100644 --- a/java/src/org/broadinstitute/sting/gatk/datasources/shards/BAMFormatAwareShard.java +++ b/java/src/org/broadinstitute/sting/gatk/datasources/shards/BAMFormatAwareShard.java @@ -48,12 +48,4 @@ public interface BAMFormatAwareShard extends Shard { * @return An iterator over the reads stored in the shard. */ public StingSAMIterator iterator(); - - /** - * Get the bounds of the current shard. Current bounds - * will be the unfiltered extents of the current shard, from - * the start of the first interval to the end of the last interval. - * @return The bounds of the shard. - */ - public GenomeLoc getBounds(); } diff --git a/java/src/org/broadinstitute/sting/gatk/datasources/shards/BlockDelimitedReadShard.java b/java/src/org/broadinstitute/sting/gatk/datasources/shards/BlockDelimitedReadShard.java index e58551d2c..aea3a1d32 100644 --- a/java/src/org/broadinstitute/sting/gatk/datasources/shards/BlockDelimitedReadShard.java +++ b/java/src/org/broadinstitute/sting/gatk/datasources/shards/BlockDelimitedReadShard.java @@ -86,14 +86,12 @@ public class BlockDelimitedReadShard extends ReadShard implements BAMFormatAware } /** - * Get the bounds of the current shard. Current bounds - * will be the unfiltered extents of the current shard, from - * the start of the first interval to the end of the last interval. - * @return The bounds of the shard. + * returns the type of shard. */ - public GenomeLoc getBounds() { - return null; - } + @Override + public ShardType getShardType() { + return shardType; + } /** * String representation of this shard. diff --git a/java/src/org/broadinstitute/sting/gatk/datasources/shards/IndexDelimitedLocusShard.java b/java/src/org/broadinstitute/sting/gatk/datasources/shards/IndexDelimitedLocusShard.java index 7b89b7b98..3b01cd7ec 100755 --- a/java/src/org/broadinstitute/sting/gatk/datasources/shards/IndexDelimitedLocusShard.java +++ b/java/src/org/broadinstitute/sting/gatk/datasources/shards/IndexDelimitedLocusShard.java @@ -95,27 +95,6 @@ public class IndexDelimitedLocusShard extends LocusShard implements BAMFormatAwa return chunks; } - /** - * Get the bounds of the current shard. Current bounds - * will be the unfiltered extents of the current shard, from - * the start of the first interval to the end of the last interval. - * @return The bounds of the shard. - */ - public GenomeLoc getBounds() { - if(loci == null) - return null; - - String contig = null; - long start = Long.MAX_VALUE, stop = 0; - for(GenomeLoc locus: loci) { - if(contig == null) contig = locus.getContig(); - start = Math.min(locus.getStart(),start); - stop = Math.max(locus.getStop(),stop); - } - - return GenomeLocParser.createGenomeLoc(contig,start,stop); - } - /** * returns the type of shard. */