From 0208d201c7c408c340d739ac7b5186a6dab97776 Mon Sep 17 00:00:00 2001 From: aaron Date: Thu, 23 Apr 2009 20:47:22 +0000 Subject: [PATCH] Forgot this in the last commit... git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@515 348d0f76-0448-11de-a6fe-93d51630548a --- .../dataSources/shards/ReadShardStrategy.java | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100755 java/src/org/broadinstitute/sting/gatk/dataSources/shards/ReadShardStrategy.java diff --git a/java/src/org/broadinstitute/sting/gatk/dataSources/shards/ReadShardStrategy.java b/java/src/org/broadinstitute/sting/gatk/dataSources/shards/ReadShardStrategy.java new file mode 100755 index 000000000..9d7d7287a --- /dev/null +++ b/java/src/org/broadinstitute/sting/gatk/dataSources/shards/ReadShardStrategy.java @@ -0,0 +1,82 @@ +package org.broadinstitute.sting.gatk.dataSources.shards; + +import net.sf.samtools.SAMSequenceDictionary; + +import java.util.Iterator; + +/** + * + * User: aaron + * Date: Apr 14, 2009 + * Time: 1:34:28 PM + * + * The Broad Institute + * SOFTWARE COPYRIGHT NOTICE AGREEMENT + * This software and its documentation are copyright 2009 by the + * Broad Institute/Massachusetts Institute of Technology. All rights are reserved. + * + * This software is supplied without any warranty or guaranteed support whatsoever. Neither + * the Broad Institute nor MIT can be responsible for its use, misuse, or functionality. + * + */ + + +/** + * @author aaron + * @version 1.0 + * @date Apr 14, 2009 + *

+ * Class ReadShardStrategy + *

+ * A descriptions should go here. Blame aaron if it's missing. + */ +public class ReadShardStrategy implements ShardStrategy { + + // do we use unmapped reads in the sharding strategy + private boolean unMappedReads = true; + + // our read bucket size, default + public long readCount = 100000; + + // our sequence dictionary + final private SAMSequenceDictionary dic; + + /** + * the default constructor + * @param dic the dictionary + * @param size the read count to iterate over + */ + ReadShardStrategy(SAMSequenceDictionary dic, long size) { + this.dic = dic; + readCount = size; + } + + /** + * do we have another read shard? + * @return + */ + public boolean hasNext() { + return true; + } + + public Shard next() { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public void remove() { + throw new UnsupportedOperationException("Remove not supported"); + } + + public Iterator iterator() { + return this; + } + + /** + * set the next shards size + * + * @param size adjust the next size to this + */ + public void adjustNextShardSize(long size) { + readCount = size; + } +}