removed old shard strategy code
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@386 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
dd604799dc
commit
f2d0d73309
|
|
@ -1,94 +0,0 @@
|
|||
package org.broadinstitute.sting.gatk.dataSources.shards;
|
||||
|
||||
import net.sf.samtools.SAMSequenceDictionary;
|
||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* User: aaron
|
||||
* Date: Apr 6, 2009
|
||||
* Time: 8:23:19 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 6, 2009
|
||||
* <p/>
|
||||
* Class LinearShard
|
||||
* <p/>
|
||||
* A exponential strategy
|
||||
*/
|
||||
public class ExpGrowthShardStrategy extends ShardStrategy {
|
||||
|
||||
// fixed size
|
||||
private long baseSize = 100000;
|
||||
private long currentExp = 0;
|
||||
|
||||
/**
|
||||
* the constructor, taking a seq dictionary to parse out contigs
|
||||
*
|
||||
* @param dic the seq dictionary
|
||||
*/
|
||||
ExpGrowthShardStrategy(SAMSequenceDictionary dic, long startSize) {
|
||||
super(dic);
|
||||
this.baseSize = startSize;
|
||||
currentExp = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* the constructor, taking a seq dictionary to parse out contigs
|
||||
*
|
||||
* @param dic the seq dictionary
|
||||
*/
|
||||
ExpGrowthShardStrategy(SAMSequenceDictionary dic, long startSize, List<GenomeLoc> lst) {
|
||||
super(dic, lst);
|
||||
this.baseSize = startSize;
|
||||
currentExp = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* the constructor, taking a seq dictionary to parse out contigs
|
||||
*
|
||||
* @param strat the shatter to convert from
|
||||
*/
|
||||
ExpGrowthShardStrategy(ShardStrategy strat) {
|
||||
super(strat);
|
||||
this.baseSize = strat.nextShardSize();
|
||||
currentExp = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* set the next shards size
|
||||
*
|
||||
* @param size adjust the next size to this
|
||||
*/
|
||||
public void adjustNextShardSize(long size) {
|
||||
baseSize = size;
|
||||
currentExp = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is how the various shards strategies implements their approach
|
||||
*
|
||||
* @return the next shard size
|
||||
*/
|
||||
protected long nextShardSize() {
|
||||
// we grow the exponentially, we just have to make sure we start at zero
|
||||
++currentExp;
|
||||
return (long) Math.floor(Math.pow((double) baseSize, (double) currentExp));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
package org.broadinstitute.sting.gatk.dataSources.shards;
|
||||
|
||||
import net.sf.samtools.SAMSequenceDictionary;
|
||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* User: aaron
|
||||
* Date: Apr 6, 2009
|
||||
* Time: 7:18:19 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 6, 2009
|
||||
* <p/>
|
||||
* Class AdaptiveShard
|
||||
* <p/>
|
||||
* allows you to change the sharding length as you traverse
|
||||
*/
|
||||
class LinearShardStrategy extends ShardStrategy {
|
||||
|
||||
// default the next size to 100,000
|
||||
private long nextShardSize = 100000;
|
||||
|
||||
/**
|
||||
* the constructor, taking a seq dictionary to parse out contigs
|
||||
*
|
||||
* @param dic the seq dictionary
|
||||
*/
|
||||
LinearShardStrategy(SAMSequenceDictionary dic, long startSize) {
|
||||
super(dic);
|
||||
this.nextShardSize = startSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* the constructor, taking a seq dictionary to parse out contigs
|
||||
*
|
||||
* @param strat the shatter to convert from
|
||||
*/
|
||||
LinearShardStrategy(ShardStrategy strat) {
|
||||
super(strat);
|
||||
this.nextShardSize = strat.nextShardSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* the constructor, taking a seq dictionary to parse out contigs
|
||||
*
|
||||
* @param dic the seq dictionary
|
||||
* @param lst the list of genome locations to iterate over
|
||||
*/
|
||||
LinearShardStrategy(SAMSequenceDictionary dic, long startSize, List<GenomeLoc> lst) {
|
||||
super(dic, lst);
|
||||
this.nextShardSize = startSize;
|
||||
}
|
||||
/**
|
||||
* set the next shards size
|
||||
*
|
||||
* @param size adjust the next size to this
|
||||
*/
|
||||
public void adjustNextShardSize(long size) {
|
||||
nextShardSize = size;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is how the various shards strategies implements their approach
|
||||
*
|
||||
* @return the next shard size
|
||||
*/
|
||||
protected long nextShardSize() {
|
||||
return nextShardSize;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue