public class Astral extends Object
Set<String> astralSet = Astral.getRepresentatives(Astral.AstralSet.NINETY_FIVE_175B);This class uses a multiton pattern with soft references for caching. In short: the first time you call the above, it will fetch the data from ASTRAL; the second time will (probably) not have to; and the instances can still be garbage-collected if necessary (meaning they don't require heap memory).
Modifier and Type | Class and Description |
---|---|
static class |
Astral.AstralSet
An ASTRAL sequence-identity cutoff with an identifier such as:
1.75A_95
Also contains a URL pointing to a FASTA file containing the representatives.
|
Constructor and Description |
---|
Astral(Astral.AstralSet cutoff)
Constructs a new Astral object.
|
Astral(String id,
Reader reader)
Constructs a new Astral object.
|
Astral(String id,
URL url)
Constructs a new Astral object.
|
Modifier and Type | Method and Description |
---|---|
LinkedHashMap<Integer,String> |
getFailedLines()
Gets a map describing lines read in the file that weren't understood.
|
Set<String> |
getNames() |
static Set<String> |
getRepresentatives(Astral.AstralSet cutoff)
Get a list of representatives' names for the specified ASTRAL cutoff.
|
static Set<String> |
getRepresentatives(String id)
Get a list of representatives' names for the specified ASTRAL cutoff.
|
public Astral(Astral.AstralSet cutoff)
getRepresentatives(AstralSet)
instead. This constructor should only be used when an ASTRAL set not
included in Astral(AstralSet)
is required.cutoff
- The ASTRAL sequence-identity cutoff requiredRuntimeException
- If the Astral set could not be parsed or accessed for any reasonpublic Astral(String id, URL url)
getRepresentatives(AstralSet)
instead. This constructor should only be used when an ASTRAL set not
included in Astral(AstralSet)
is required.RuntimeException
- If the Astral set could not be parsed or accessed for any reasonpublic Astral(String id, Reader reader)
getRepresentatives(AstralSet)
instead. This constructor should only be used when an ASTRAL set not
included in Astral(AstralSet)
is required.RuntimeException
- If the Astral set could not be parsed or accessed for any reasonpublic static Set<String> getRepresentatives(Astral.AstralSet cutoff)
public static Set<String> getRepresentatives(String id)
id
- An ASTRAL Id, such as 1.75A_95.public LinkedHashMap<Integer,String> getFailedLines()
Copyright © 2000–2019 BioJava. All rights reserved.