Some minor fixes to the last check-in
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@387 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
f2d0d73309
commit
887adcfc7f
|
|
@ -1,6 +1,10 @@
|
|||
package org.broadinstitute.sting.gatk.dataSources.shards;
|
||||
|
||||
import net.sf.samtools.SAMSequenceDictionary;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -34,6 +38,12 @@ public class ShardStrategyFactory {
|
|||
LINEAR, EXPONENTIAL, READS
|
||||
}
|
||||
|
||||
/** our log, which we want to capture anything from this class */
|
||||
private static Logger logger = Logger.getLogger(ShardStrategyFactory.class);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* get a new shatter strategy
|
||||
*
|
||||
|
|
@ -73,6 +83,27 @@ public class ShardStrategyFactory {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get a new shatter strategy
|
||||
*
|
||||
* @param strat what's our strategy - SHATTER_STRATEGY type
|
||||
* @param dic the seq dictionary
|
||||
* @param startingSize the starting size
|
||||
* @return
|
||||
*/
|
||||
static public ShardStrategy shatter(SHATTER_STRATEGY strat, SAMSequenceDictionary dic, long startingSize, List<GenomeLoc> lst) {
|
||||
switch (strat) {
|
||||
case LINEAR:
|
||||
return new LinearLocusShardStrategy(dic, startingSize); // , lst);
|
||||
case EXPONENTIAL:
|
||||
return new ExpGrowthLocusShardStrategy(dic, startingSize); // , lst);
|
||||
default:
|
||||
throw new RuntimeException("Strategy: " + strat + " isn't implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* convert between types
|
||||
*
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import java.util.ArrayList;
|
|||
*/
|
||||
public class ShardStrategyFactoryTest {
|
||||
|
||||
FastaSequenceFile2 seq = null;
|
||||
private static FastaSequenceFile2 seq;
|
||||
|
||||
/**
|
||||
* This function (because of the @BeforeClass tag) gets called only once ever,
|
||||
|
|
@ -48,7 +48,7 @@ public class ShardStrategyFactoryTest {
|
|||
*/
|
||||
@BeforeClass
|
||||
public static void doBeforeAnyTests() {
|
||||
|
||||
seq = new FastaSequenceFile2(new File("/seq/references/Homo_sapiens_assembly18/v0/Homo_sapiens_assembly18.fasta"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -68,7 +68,7 @@ public class ShardStrategyFactoryTest {
|
|||
*/
|
||||
@Before
|
||||
public void doForEachTest() {
|
||||
seq = new FastaSequenceFile2(new File("/seq/references/Homo_sapiens_assembly18/v0/Homo_sapiens_assembly18.fasta"));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -111,12 +111,7 @@ public class ShardStrategyFactoryTest {
|
|||
SAMSequenceRecord s = dic.getSequence(1);
|
||||
// Character stream writing
|
||||
|
||||
System.err.println("Trying to sleep");
|
||||
try {
|
||||
Thread.sleep(5000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
int stop = s.getSequenceLength();
|
||||
int size = 10000;
|
||||
int location = 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue