Package htsjdk.samtools.sra

# Class SRAAccession

java.lang.Object
htsjdk.samtools.sra.SRAAccession

All Implemented Interfaces:
  `Serializable`

public class SRAAccession extends Object implements Serializable
Describes a single SRA accession for SRA read collection Also provides app string functionality and allows to check if working SRA is supported on the running platform Important: due to checks performed in SRAAccession.isValid(), we won't recognise any accessions other than ones that follow the pattern "^[SED]RR[0-9]{6,9}$", e.g. SRR000123

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`SRAAccession(String acc)`

## Method Summary

Modifier and Type
Method
Description
`static ExceptionInInitializerError`
`checkIfInitialized()`
Tries to initialize SRA.
`static boolean`
`isSupported()`
Deprecated.
use `checkIfInitialized()` instead
`boolean`
`isValid()`
`static boolean`
`isValid(String acc)`
`static void`
`setAppVersionString(String appVersionString)`
Sets an app version string which will let SRA know which software uses it.
`String`
`toString()`

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

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

## Constructor Details

### SRAAccession

public SRAAccession(String acc)

Parameters:
  `acc` - accession

## Method Details

### setAppVersionString

public static void setAppVersionString(String appVersionString)
Sets an app version string which will let SRA know which software uses it.

Parameters:
  `appVersionString` - a string that describes running application

### isSupported

@Deprecated public static boolean isSupported()
Deprecated.
use `checkIfInitialized()` instead

Returns:
  true if SRA successfully loaded native libraries and fully initialized, false otherwise

### checkIfInitialized

public static ExceptionInInitializerError checkIfInitialized()
Tries to initialize SRA. Initialization error is saved during first call, all subsequent calls will return the same saved error or null.

Returns:
  ExceptionInInitializerError if initialization failed, null if initialization was successful

### isValid

public static boolean isValid(String acc)

Parameters:
  `acc` - accession
Returns:
  true if a string is a valid SRA accession

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### isValid

public boolean isValid()

Returns:
  true if contained string is an SRA accession