public static final String DAS_ACTIVE_SOURCE = "DAS_ACTIVE_SOURCE";
+ public static final String DEFAULT_SIFTS_DOWNLOAD_DIR = System
+ .getProperty("user.home")
+ + File.separatorChar
+ + ".sifts_downloads" + File.separatorChar;
/**
* Initialises the Jalview Application Log
*/
SiftsSettings
.setMapWithSifts(Cache.getDefault("MAP_WITH_SIFTS", false));
+ SiftsSettings.setSiftDownloadDirectory(jalview.bin.Cache.getDefault(
+ "sifts_download_dir", DEFAULT_SIFTS_DOWNLOAD_DIR));
+
System.out
.println("Jalview Version: " + codeVersion + codeInstallation);
ArrayList<SequenceI[]> seqsMap = new ArrayList<SequenceI[]>();
for (SequenceI seq : sequences)
{
+ new jalview.ws.DBRefFetcher(new SequenceI[] { seq }, null,
+ null, null, false).fetchDBRefs(true);
seqsMap.add(new SequenceI[] { seq });
}
SequenceI[][] collatedSeqs = seqsMap.toArray(new SequenceI[0][0]);
private static final String SIFTS_FTP_BASE_URL = "ftp://ftp.ebi.ac.uk/pub/databases/msd/sifts/xml/";
- public static final String DEFAULT_SIFTS_DOWNLOAD_DIR = System
- .getProperty("user.home")
- + File.separatorChar
- + ".sifts_downloads" + File.separatorChar;
-
- public static final String SIFTS_DOWNLOAD_DIR = jalview.bin.Cache
- .getDefault("sifts_download_dir", DEFAULT_SIFTS_DOWNLOAD_DIR);
-
private final static String NEWLINE = System.lineSeparator();
private String curSourceDBRef;
*/
public static File getSiftsFile(String pdbId) throws SiftsException
{
- File siftsFile = new File(SIFTS_DOWNLOAD_DIR + pdbId.toLowerCase()
+ File siftsFile = new File(SiftsSettings.getSiftDownloadDirectory()
+ + pdbId.toLowerCase()
+ ".xml.gz");
if (siftsFile.exists())
{
{
String siftFile = pdbId + ".xml.gz";
String siftsFileFTPURL = SIFTS_FTP_BASE_URL + siftFile;
- String downloadedSiftsFile = SIFTS_DOWNLOAD_DIR + siftFile;
- File siftsDownloadDir = new File(SIFTS_DOWNLOAD_DIR);
+ String downloadedSiftsFile = SiftsSettings.getSiftDownloadDirectory()
+ + siftFile;
+ File siftsDownloadDir = new File(
+ SiftsSettings.getSiftDownloadDirectory());
if (!siftsDownloadDir.exists())
{
siftsDownloadDir.mkdirs();
*/
public static boolean deleteSiftsFileByPDBId(String pdbId)
{
- File siftsFile = new File(SIFTS_DOWNLOAD_DIR + pdbId.toLowerCase()
+ File siftsFile = new File(SiftsSettings.getSiftDownloadDirectory()
+ + pdbId.toLowerCase()
+ ".xml.gz");
if (siftsFile.exists())
{
else
{
DBRefEntry[] dbRefs = seq.getDBRefs();
- if (dbRefs == null || dbRefs.length < 1)
- {
- final SequenceI[] seqs = new SequenceI[] { seq };
- new jalview.ws.DBRefFetcher(seqs, null, null, null, false)
- .fetchDBRefs(true);
- dbRefs = seq.getDBRefs();
- }
+ // if (dbRefs == null || dbRefs.length < 1)
+ // {
+ // // final SequenceI[] seqs = new SequenceI[] { seq };
+ // // new jalview.ws.DBRefFetcher(seqs, null, null, null, false)
+ // // .fetchDBRefs(true);
+ // dbRefs = seq.getDBRefs();
+ // }
if (dbRefs == null || dbRefs.length < 1)
{
{
private static boolean mapWithSifts = false;
+ private static String siftDownloadDirectory;
+
public static boolean isMapWithSifts()
{
return mapWithSifts;
{
SiftsSettings.mapWithSifts = mapWithSifts;
}
+
+ public static String getSiftDownloadDirectory()
+ {
+ return siftDownloadDirectory;
+ }
+
+ public static void setSiftDownloadDirectory(String siftDownloadDirectory)
+ {
+ SiftsSettings.siftDownloadDirectory = siftDownloadDirectory;
+ }
}