Class TestCasesBase
- java.lang.Object
-
- org.snpeff.snpEffect.testCases.unity.TestCasesBase
-
- Direct Known Subclasses:
TestCasesAnn
,TestCasesAnnParse
,TestCasesBaseApply
,TestCasesBuild
,TestCasesCds
,TestCasesDels
,TestCasesDnaSequence
,TestCasesEffectCollapse
,TestCasesEffectCollapse2
,TestCasesFasta
,TestCasesFileIndexChrPos
,TestCasesHgvs
,TestCasesHgvsDnaDup
,TestCasesHgvsDnaDupNegative
,TestCasesHgvsProtDup
,TestCasesIns
,TestCasesIntergenic
,TestCasesIntervals
,TestCasesIntervalVariant
,TestCasesIntStats
,TestCasesJaspar
,TestCasesMnps
,TestCasesSeekableReader
,TestCasesSequenceIndexer
,TestCasesSnps
,TestCasesSpliceRegion
,TestCasesSpliceSite
,TestCasesStructuralDel
,TestCasesStructuralDup
,TestCasesStructuralInv
,TestCasesVariantRealignment
,TestCasesVcf
,TestCasesZzz
public class TestCasesBase extends java.lang.Object
Base class for some test cases- Author:
- pcingola
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
addUtrs
static java.lang.String
BASE_DIR
protected char[]
chromoBases
protected java.lang.String
chromoSequence
protected Chromosome
chromosome
protected CodonTable
codonTable
protected Config
config
protected boolean
debug
protected Gene
gene
protected Genome
genome
protected java.lang.String
genomeName
protected int
maxExons
protected int
maxGeneLen
protected int
maxTranscripts
protected int
minExons
protected int
numGenes
protected boolean
onlyMinusStrand
protected boolean
onlyPlusStrand
protected java.util.List<java.lang.String>
prefixes
protected java.util.Random
rand
protected int
randSeed
protected boolean
shiftHgvs
protected SnpEffectPredictor
snpEffectPredictor
protected int
spliceRegionExonSize
protected int
spliceRegionIntronMax
protected int
spliceRegionIntronMin
protected java.lang.String
testType
protected Transcript
transcript
protected boolean
verbose
-
Constructor Summary
Constructors Constructor Description TestCasesBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
after()
void
before()
void
checkApply(Variant variant, Variant.VariantType varType, java.lang.String expectedCds, java.lang.String expectedProtein, int exonRank, int expectedExon1Start, int expectedExon1End)
Apply a variant to a transcript and check resulting CDS sequence, protein sequence and exon coordinatesvoid
checkApplyDel(Variant variant, java.lang.String expectedCds, java.lang.String expectedProtein, int exonRank, int expectedExon1Start, int expectedExon1End)
void
checkApplyIns(Variant variant, java.lang.String expectedCds, java.lang.String expectedProtein, int exonRank, int expectedExon1Start, int expectedExon1End)
void
checkApplyMixed(Variant variant, java.lang.String expectedCds, java.lang.String expectedProtein, int exonRank, int expectedExon1Start, int expectedExon1End)
void
checkApplyMnp(Variant variant, java.lang.String expectedCds, java.lang.String expectedProtein, int exonRank, int expectedExon1Start, int expectedExon1End)
void
checkApplySnp(Variant variant, java.lang.String expectedCds, java.lang.String expectedProtein, int exonRank, int expectedExon1Start, int expectedExon1End)
protected void
checkEffect(Variant variant, EffectType effectExpected)
protected void
checkEffect(Variant variant, EffectType effectExpected, EffectType effectNotExpected, VariantEffect.EffectImpact impact)
protected EffFormatVersion
formatVersion(java.lang.String vcfFileName)
Get file's format versionprotected boolean
hasEffect(java.lang.String effectExpected, java.lang.String effStr)
Is effectExpected included in effStr (many effects delimited by '&'protected void
init()
protected void
initRand()
protected void
initSnpEffPredictor()
protected void
initSnpEffPredictor(Gene[] genesToAdd)
Create a predictor For the default parameters the first predictor created has only one transcript: 1:880-1001, strand: +, id:transcript_0, Protein Exons: 1:880-1001 'exon_0_0', rank: 1, frame: ., sequence: taaccccatatgattagtacggtagaggaaaagcacctaacccccattgagcaggatctctttcgtaatactctgtatcgatgaccgatttatttgattccccacatttatttcatcggga CDS : taaccccatatgattagtacggtagaggaaaagcacctaacccccattgagcaggatctctttcgtaatactctgtatcgatgaccgatttatttgattccccacatttatttcatcgggac Protein : *PHMISTVEEKHLTPIEQDLFRNTLYR*PIYLIPHIYFIG?java.lang.String
path(java.lang.String fileName)
protected java.lang.String
pathClassName()
protected void
prependSequenceToFirstExon(java.lang.String prepend)
Prepend first's exons sequence with a given one
-
-
-
Field Detail
-
BASE_DIR
public static final java.lang.String BASE_DIR
- See Also:
- Constant Field Values
-
debug
protected boolean debug
-
verbose
protected boolean verbose
-
randSeed
protected int randSeed
-
genomeName
protected java.lang.String genomeName
-
addUtrs
protected boolean addUtrs
-
onlyPlusStrand
protected boolean onlyPlusStrand
-
onlyMinusStrand
protected boolean onlyMinusStrand
-
shiftHgvs
protected boolean shiftHgvs
-
numGenes
protected int numGenes
-
maxGeneLen
protected int maxGeneLen
-
maxTranscripts
protected int maxTranscripts
-
maxExons
protected int maxExons
-
minExons
protected int minExons
-
spliceRegionExonSize
protected int spliceRegionExonSize
-
spliceRegionIntronMin
protected int spliceRegionIntronMin
-
spliceRegionIntronMax
protected int spliceRegionIntronMax
-
rand
protected java.util.Random rand
-
config
protected Config config
-
genome
protected Genome genome
-
chromosome
protected Chromosome chromosome
-
gene
protected Gene gene
-
transcript
protected Transcript transcript
-
snpEffectPredictor
protected SnpEffectPredictor snpEffectPredictor
-
chromoSequence
protected java.lang.String chromoSequence
-
chromoBases
protected char[] chromoBases
-
codonTable
protected CodonTable codonTable
-
testType
protected java.lang.String testType
-
prefixes
protected java.util.List<java.lang.String> prefixes
-
-
Method Detail
-
after
@AfterEach public void after()
-
before
@BeforeEach public void before()
-
checkApply
public void checkApply(Variant variant, Variant.VariantType varType, java.lang.String expectedCds, java.lang.String expectedProtein, int exonRank, int expectedExon1Start, int expectedExon1End)
Apply a variant to a transcript and check resulting CDS sequence, protein sequence and exon coordinates
-
checkApplyDel
public void checkApplyDel(Variant variant, java.lang.String expectedCds, java.lang.String expectedProtein, int exonRank, int expectedExon1Start, int expectedExon1End)
-
checkApplyIns
public void checkApplyIns(Variant variant, java.lang.String expectedCds, java.lang.String expectedProtein, int exonRank, int expectedExon1Start, int expectedExon1End)
-
checkApplyMixed
public void checkApplyMixed(Variant variant, java.lang.String expectedCds, java.lang.String expectedProtein, int exonRank, int expectedExon1Start, int expectedExon1End)
-
checkApplyMnp
public void checkApplyMnp(Variant variant, java.lang.String expectedCds, java.lang.String expectedProtein, int exonRank, int expectedExon1Start, int expectedExon1End)
-
checkApplySnp
public void checkApplySnp(Variant variant, java.lang.String expectedCds, java.lang.String expectedProtein, int exonRank, int expectedExon1Start, int expectedExon1End)
-
checkEffect
protected void checkEffect(Variant variant, EffectType effectExpected)
-
checkEffect
protected void checkEffect(Variant variant, EffectType effectExpected, EffectType effectNotExpected, VariantEffect.EffectImpact impact)
-
formatVersion
protected EffFormatVersion formatVersion(java.lang.String vcfFileName)
Get file's format version
-
hasEffect
protected boolean hasEffect(java.lang.String effectExpected, java.lang.String effStr)
Is effectExpected included in effStr (many effects delimited by '&'
-
init
protected void init()
-
initRand
protected void initRand()
-
initSnpEffPredictor
protected void initSnpEffPredictor()
-
initSnpEffPredictor
protected void initSnpEffPredictor(Gene[] genesToAdd)
Create a predictor For the default parameters the first predictor created has only one transcript: 1:880-1001, strand: +, id:transcript_0, Protein Exons: 1:880-1001 'exon_0_0', rank: 1, frame: ., sequence: taaccccatatgattagtacggtagaggaaaagcacctaacccccattgagcaggatctctttcgtaatactctgtatcgatgaccgatttatttgattccccacatttatttcatcggga CDS : taaccccatatgattagtacggtagaggaaaagcacctaacccccattgagcaggatctctttcgtaatactctgtatcgatgaccgatttatttgattccccacatttatttcatcgggac Protein : *PHMISTVEEKHLTPIEQDLFRNTLYR*PIYLIPHIYFIG?
-
path
public java.lang.String path(java.lang.String fileName)
-
pathClassName
protected java.lang.String pathClassName()
-
prependSequenceToFirstExon
protected void prependSequenceToFirstExon(java.lang.String prepend)
Prepend first's exons sequence with a given one
-
-