Package org.snpeff.snpEffect

# Class Config

java.lang.Object
org.snpeff.snpEffect.Config

All Implemented Interfaces:
  `Serializable`, `Iterable<String>`

public class Config extends Object implements Serializable, Iterable<String>

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String[]`
`COMPATIBLE_WITH_5_1`
`static final String[]`
`COMPATIBLE_WITH_5_2`
`static final Map<String,String[]>`
`DATABASE_COMPATIBLE_VERSIONS`
`static final String`
`DEFAULT_CONFIG_FILE`
`static String`
`DEFAULT_COORDINATES`
`static final String`
`DEFAULT_DATA_DIR`
`static final String`
`ETC_CONFIG_FILE`
`static String`
`GENOMES_DIR`
`static final String`
`KEY_BUNDLE_SUFIX`
`static final String`
`KEY_CODON_PREFIX`
`static final String`
`KEY_CODONTABLE_SUFIX`
`static final String`
`KEY_COORDINATES`
`static final String`
`KEY_DATA_DIR`
`static final String`
`KEY_DATABASE_LOCAL`
`static final String`
`KEY_DATABASE_REPOSITORY`
`static final String`
`KEY_DATABASE_REPOSITORY_KEY`
`static final String`
`KEY_DBNSFP_FIELDS`
`static final String`
`KEY_GENOME_SUFIX`
`static final String`
`KEY_LOF_DELETE_PROTEIN_CODING_BASES`
`static final String`
`KEY_LOF_IGNORE_PROTEIN_CODING_AFTER`
`static final String`
`KEY_LOF_IGNORE_PROTEIN_CODING_BEFORE`
`static final String`
`KEY_REFERENCE_SUFIX`
`static final String`
`KEY_VERSIONS_URL`
`static final String`
`PREFERRED_CONFIG_FILE`

## Constructor Summary

Constructors
Constructor
Description
`Config(String genomeVersion)`
Create a config (uses DEFAULT_CONFIG_FILE)
`Config(String genomeVersion, String configFileName)`
Create a configuration from 'configFileName'
`Config(String genomeVersion, String configFileName, String dataDir, Map<String,String> override)`
Create a configuration from 'configFileName'
`Config(String genomeVersion, String configFileName, String dataDir, Map<String,String> override, boolean verbose)`
`Config(Genome genome)`
This constructor is used in test cases

## Method Summary

Modifier and Type
Method
Description
`static String`
`defaultConfigFile()`
If Debian-preferred config file is available, give it.
`List<URL>`
`downloadUrl(String genomeVer)`
Get a list of URLs that can be used to download a database Use compatible versions from 'getDatabaseCompatibilityVersions()'
`URL`
`downloadUrl(String genomeVer, String version)`
Build the URL for downloading a database file
`static Config`
`get()`
`String`
`getBaseFileNameGenes()`
Genes file path (no extension)
`String`
`getBaseFileNameMotif()`
`String`
`getBaseFileNameRegulation()`
Regulation file (GFF format)
`String`
`getBaseFileNameSequence()`
`String`
`getBundleName(String genomeVer)`
Is this genome packed in a bundle?
`String`
`getConfigFileCanonicaPath()`
`String`
`getConfigFileName()`
`String`
`getCoordinates()`
`List<String>`
`getDatabaseCompatibilityVersions()`
Return a list of databases that are compatible with this SnpEff version number
`String`
`getDatabaseLocal(String dbName)`
Database local file for a specific database, such as 'dbSnp', 'ClinVar', etc.
`String`
`getDatabaseLocalKey(String dbName)`
`String`
`getDatabaseRepository()`
`String`
`getDatabaseRepository(String dbName)`
Database repository for a specific database, such as 'dbSnp', 'ClinVar', etc.
`URL`
`getDatabaseRepositoryUrl(String dbName)`
`String`
`getDbNsfpFields()`
`String`
`getDirData()`
Main data directory
`String`
`getDirDataGenomeVersion()`
Data dir for a specific genome version (i.e.
`String`
`getDirMain()`
Main dir
`String`
`getDirRegulationBed()`
Directory where regulation 'BED' files are
`double`
`getDouble(String propertyName, double defaultValue)`
Get a property as a double
`List<String>`
`getFileListGenomeFasta()`
Filenames for reference sequence (fasta files)
`String`
`getFileNameCds()`
`String`
`getFileNameGenomeFasta()`
Filename for reference sequence (fasta file) Scans the list of files 'getFileListGenomeFasta()' and finds the first file that exists
`String`
`getFileNameProteins()`
`String`
`getFileNameSequence()`
`String`
`getFileNameSequence(String chr)`
`String`
`getFileSnpEffectPredictor()`
`Genome`
`getGenome()`
`Genome`
`getGenome(String genomeId)`
`String`
`getGenomeVersion()`
`double`
`getLofDeleteProteinCodingBases()`
`double`
`getLofIgnoreProteinCodingAfter()`
`double`
`getLofIgnoreProteinCodingBefore()`
`long`
`getLong(String propertyName, long defaultValue)`
Get a property as a long
`String`
`getName(String genomeVersion)`
`String`
`getProperty(String property)`
`String`
`getReference(String genomeVersion)`
`SnpEffectPredictor`
`getSnpEffectPredictor()`
`String`
`getString(String propertyName)`
Get a property as a string
`String`
`getString(String propertyName, String defaultValue)`
Get a property as a string
`String`
`getVersionsUrl()`
`boolean`
`isDebug()`
`boolean`
`isErrorChromoHit()`
`boolean`
`isErrorOnMissingChromo()`
`boolean`
`isExpandIub()`
`boolean`
`isHgvs()`
`boolean`
`isHgvs1LetterAA()`
`boolean`
`isHgvsOld()`
`boolean`
`isHgvsShift()`
`boolean`
`isHgvsTrId()`
`boolean`
`isOnlyRegulation()`
`boolean`
`isQuiet()`
`boolean`
`isTreatAllAsProteinCoding()`
`boolean`
`isVerbose()`
`Iterator<String>`
`iterator()`
`List<String>`
`keys()`
`SnpEffectPredictor`
`loadSnpEffectPredictor()`
Load a snpEff predictor WARNING: 'genome' object get replaced upon loading a snpEffectPredictor (this is a dangerous side effect)
`String[]`
`propertyToStringArray(String attr)`
Parse a comma separated property as a string array
`static Config`
`reset()`
`void`
`setDebug(boolean debug)`
`void`
`setErrorChromoHit(boolean errorChromoHit)`
`void`
`setErrorOnMissingChromo(boolean errorOnMissingChromo)`
`void`
`setExpandIub(boolean expandIub)`
`void`
`setHgvsOld(boolean hgvsDnaOld)`
`void`
`setHgvsOneLetterAA(boolean hgvsOneLetterAa)`
`void`
`setHgvsShift(boolean hgvsShift)`
`void`
`setHgvsTrId(boolean hgvsTrId)`
`void`
`setOnlyRegulation(boolean onlyRegulation)`
`void`
`setQuiet(boolean quiet)`
`void`
`setSnpEffectPredictor(SnpEffectPredictor snpEffectPredictor)`
`void`
`setString(String propertyName, String value)`
`void`
`setTreatAllAsProteinCoding(boolean treatAllAsProteinCoding)`
`void`
`setUseHgvs(boolean useHgvs)`
`void`
`setVerbose(boolean verbose)`
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

## Field Details

### DEFAULT_CONFIG_FILE

public static final String DEFAULT_CONFIG_FILE

See Also:
  - Constant Field Values

### ETC_CONFIG_FILE

public static final String ETC_CONFIG_FILE

See Also:
  - Constant Field Values

### PREFERRED_CONFIG_FILE

public static final String PREFERRED_CONFIG_FILE

### DEFAULT_DATA_DIR

public static final String DEFAULT_DATA_DIR

See Also:
  - Constant Field Values

### KEY_BUNDLE_SUFIX

public static final String KEY_BUNDLE_SUFIX

See Also:
  - Constant Field Values

### KEY_CODON_PREFIX

public static final String KEY_CODON_PREFIX

See Also:
  - Constant Field Values

### KEY_CODONTABLE_SUFIX

public static final String KEY_CODONTABLE_SUFIX

See Also:
  - Constant Field Values

### KEY_COORDINATES

public static final String KEY_COORDINATES

See Also:
  - Constant Field Values

### KEY_DATA_DIR

public static final String KEY_DATA_DIR

See Also:
  - Constant Field Values

### KEY_DATABASE_LOCAL

public static final String KEY_DATABASE_LOCAL

See Also:
  - Constant Field Values

### KEY_DATABASE_REPOSITORY

public static final String KEY_DATABASE_REPOSITORY

See Also:
  - Constant Field Values

### KEY_DATABASE_REPOSITORY_KEY

public static final String KEY_DATABASE_REPOSITORY_KEY

See Also:
  - Constant Field Values

### KEY_DBNSFP_FIELDS

public static final String KEY_DBNSFP_FIELDS

See Also:
  - Constant Field Values

### KEY_GENOME_SUFIX

public static final String KEY_GENOME_SUFIX

See Also:
  - Constant Field Values

### KEY_LOF_IGNORE_PROTEIN_CODING_AFTER

public static final String KEY_LOF_IGNORE_PROTEIN_CODING_AFTER

See Also:
  - Constant Field Values

### KEY_LOF_IGNORE_PROTEIN_CODING_BEFORE

public static final String KEY_LOF_IGNORE_PROTEIN_CODING_BEFORE

See Also:
  - Constant Field Values

### KEY_LOF_DELETE_PROTEIN_CODING_BASES

public static final String KEY_LOF_DELETE_PROTEIN_CODING_BASES

See Also:
  - Constant Field Values

### KEY_REFERENCE_SUFIX

public static final String KEY_REFERENCE_SUFIX

See Also:
  - Constant Field Values

### KEY_VERSIONS_URL

public static final String KEY_VERSIONS_URL

See Also:
  - Constant Field Values

### COMPATIBLE_WITH_5_2

public static final String[] COMPATIBLE_WITH_5_2

### COMPATIBLE_WITH_5_1

public static final String[] COMPATIBLE_WITH_5_1

### DATABASE_COMPATIBLE_VERSIONS

public static final Map<String,String[]> DATABASE_COMPATIBLE_VERSIONS

### GENOMES_DIR

public static String GENOMES_DIR

### DEFAULT_COORDINATES

public static String DEFAULT_COORDINATES

## Constructor Details

### Config

public Config(Genome genome)
This constructor is used in test cases

### Config

public Config(String genomeVersion)
Create a config (uses DEFAULT_CONFIG_FILE)

### Config

public Config(String genomeVersion, String configFileName)
Create a configuration from 'configFileName'

### Config

public Config(String genomeVersion, String configFileName, String dataDir, Map<String,String> override)
Create a configuration from 'configFileName'

### Config

public Config(String genomeVersion, String configFileName, String dataDir, Map<String,String> override, boolean verbose)

## Method Details

### get

public static Config get()

### reset

public static Config reset()

### defaultConfigFile

public static String defaultConfigFile()
If Debian-preferred config file is available, give it. else, if the config file in /etc/snpeff is available, give it. Else, default to DEFAULT_CONFIG_FILE.

### downloadUrl

public List<URL> downloadUrl(String genomeVer)
Get a list of URLs that can be used to download a database Use compatible versions from 'getDatabaseCompatibilityVersions()'

### downloadUrl

public URL downloadUrl(String genomeVer, String version)
Build the URL for downloading a database file

Format : DatabaseRepository / v VERSION / snpEff_v VERSION _ genomeVersion .zip Example : http://downloads.sourceforge.net/project/snpeff/databases/v2_0_3/snpEff_v2_0_3_EF3.64.zip

### getBaseFileNameGenes

public String getBaseFileNameGenes()
Genes file path (no extension)

### getBaseFileNameMotif

public String getBaseFileNameMotif()

### getBaseFileNameRegulation

public String getBaseFileNameRegulation()
Regulation file (GFF format)

### getBaseFileNameSequence

public String getBaseFileNameSequence()

### getBundleName

public String getBundleName(String genomeVer)
Is this genome packed in a bundle?

### getConfigFileName

public String getConfigFileName()

### getConfigFileCanonicaPath

public String getConfigFileCanonicaPath()

### getCoordinates

public String getCoordinates()

### getDatabaseCompatibilityVersions

public List<String> getDatabaseCompatibilityVersions()
Return a list of databases that are compatible with this SnpEff version number

### getDatabaseLocal

public String getDatabaseLocal(String dbName)
Database local file for a specific database, such as 'dbSnp', 'ClinVar', etc.

### getDatabaseLocalKey

public String getDatabaseLocalKey(String dbName)

### getDatabaseRepository

public String getDatabaseRepository()

### getDatabaseRepository

public String getDatabaseRepository(String dbName)
Database repository for a specific database, such as 'dbSnp', 'ClinVar', etc.

### getDatabaseRepositoryUrl

public URL getDatabaseRepositoryUrl(String dbName)

### getDbNsfpFields

public String getDbNsfpFields()

### getDirData

public String getDirData()
Main data directory

### getDirDataGenomeVersion

public String getDirDataGenomeVersion()
Data dir for a specific genome version (i.e. where the database is)

### getDirMain

public String getDirMain()
Main dir

### getDirRegulationBed

public String getDirRegulationBed()
Directory where regulation 'BED' files are

### getDouble

public double getDouble(String propertyName, double defaultValue)
Get a property as a double

### getFileListGenomeFasta

public List<String> getFileListGenomeFasta()
Filenames for reference sequence (fasta files)

### getFileNameCds

public String getFileNameCds()

### getFileNameGenomeFasta

public String getFileNameGenomeFasta()
Filename for reference sequence (fasta file) Scans the list of files 'getFileListGenomeFasta()' and finds the first file that exists

### getFileNameProteins

public String getFileNameProteins()

### getFileNameSequence

public String getFileNameSequence()

### getFileNameSequence

public String getFileNameSequence(String chr)

### getFileSnpEffectPredictor

public String getFileSnpEffectPredictor()

### getGenome

public Genome getGenome()

### getGenome

public Genome getGenome(String genomeId)

### getGenomeVersion

public String getGenomeVersion()

### getLofDeleteProteinCodingBases

public double getLofDeleteProteinCodingBases()

### getLofIgnoreProteinCodingAfter

public double getLofIgnoreProteinCodingAfter()

### getLofIgnoreProteinCodingBefore

public double getLofIgnoreProteinCodingBefore()

### getLong

public long getLong(String propertyName, long defaultValue)
Get a property as a long

### getName

public String getName(String genomeVersion)

### getProperty

public String getProperty(String property)

### propertyToStringArray

public String[] propertyToStringArray(String attr)
Parse a comma separated property as a string array

### getReference

public String getReference(String genomeVersion)

### getSnpEffectPredictor

public SnpEffectPredictor getSnpEffectPredictor()

### setSnpEffectPredictor

public void setSnpEffectPredictor(SnpEffectPredictor snpEffectPredictor)

### getString

public String getString(String propertyName)
Get a property as a string

### getString

public String getString(String propertyName, String defaultValue)
Get a property as a string

### getVersionsUrl

public String getVersionsUrl()

### isDebug

public boolean isDebug()

### setDebug

public void setDebug(boolean debug)

### isErrorChromoHit

public boolean isErrorChromoHit()

### setErrorChromoHit

public void setErrorChromoHit(boolean errorChromoHit)

### isErrorOnMissingChromo

public boolean isErrorOnMissingChromo()

### setErrorOnMissingChromo

public void setErrorOnMissingChromo(boolean errorOnMissingChromo)

### isExpandIub

public boolean isExpandIub()

### setExpandIub

public void setExpandIub(boolean expandIub)

### isHgvs

public boolean isHgvs()

### isHgvs1LetterAA

public boolean isHgvs1LetterAA()

### isHgvsOld

public boolean isHgvsOld()

### setHgvsOld

public void setHgvsOld(boolean hgvsDnaOld)

### isHgvsShift

public boolean isHgvsShift()

### setHgvsShift

public void setHgvsShift(boolean hgvsShift)

### isHgvsTrId

public boolean isHgvsTrId()

### setHgvsTrId

public void setHgvsTrId(boolean hgvsTrId)

### isOnlyRegulation

public boolean isOnlyRegulation()

### setOnlyRegulation

public void setOnlyRegulation(boolean onlyRegulation)

### isQuiet

public boolean isQuiet()

### setQuiet

public void setQuiet(boolean quiet)

### isTreatAllAsProteinCoding

public boolean isTreatAllAsProteinCoding()

### setTreatAllAsProteinCoding

public void setTreatAllAsProteinCoding(boolean treatAllAsProteinCoding)

### isVerbose

public boolean isVerbose()

### setVerbose

public void setVerbose(boolean verbose)

### iterator

public Iterator<String> iterator()

Specified by:
  `iterator` in interface `Iterable<String>`

### keys

public List<String> keys()

### loadSnpEffectPredictor

public SnpEffectPredictor loadSnpEffectPredictor()
Load a snpEff predictor WARNING: 'genome' object get replaced upon loading a snpEffectPredictor (this is a dangerous side effect)

### setHgvsOneLetterAA

public void setHgvsOneLetterAA(boolean hgvsOneLetterAa)

### setString

public void setString(String propertyName, String value)

### setUseHgvs

public void setUseHgvs(boolean useHgvs)

### toString

public String toString()

Overrides:
  `toString` in class `Object`