Skip to content

Commit 150011d

Browse files
committed
Merge branch 'bugfixes-4.2'
2 parents d735ca6 + 5c1a335 commit 150011d

File tree

5 files changed

+169
-151
lines changed

5 files changed

+169
-151
lines changed

biojava-core/src/main/java/org/biojava/nbio/core/alignment/template/AlignedSequence.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,20 @@ enum Step { COMPOUND, GAP }
158158
*/
159159
boolean isGap(int alignmentIndex);
160160

161+
/**
162+
* Returns number of gap positions (gap openings and extensions) in the sequence. This could be determined from the {@link Location}
163+
* information or from gap {@link Compound}s, which may not necessarily result in the same number.
164+
*
165+
* @return number of gap positions in the sequence
166+
*/
167+
int getNumGapPositions();
168+
169+
/**
170+
* Returns the coverage, as a fraction between 0 and 1, of this {@link AlignedSequence} with respect to the original sequence.
171+
* This is equivalent to ({@link #getLength()} - {@link #getNumGapPositions()}) / getOriginalSequence().getLength().
172+
*
173+
* @return coverage of the original sequence by the aligned sequence
174+
*/
175+
double getCoverage();
176+
161177
}

biojava-structure/src/main/java/org/biojava/nbio/structure/cath/CathInstallation.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,7 @@ private void parseCathDomall(BufferedReader bufferedReader) throws IOException{
636636

637637
protected void downloadFileFromRemote(URL remoteURL, File localFile) throws IOException{
638638
// System.out.println("downloading " + remoteURL + " to: " + localFile);
639+
LOGGER.info("Downloaded file {} to local file {}", remoteURL, localFile);
639640

640641
long timeS = System.currentTimeMillis();
641642
File tempFile = File.createTempFile(FileDownloadUtils.getFilePrefix(localFile), "."+ FileDownloadUtils.getFileExtension(localFile));
@@ -665,7 +666,7 @@ protected void downloadFileFromRemote(URL remoteURL, File localFile) throws IOEx
665666
disp = disp / 1024.0;
666667
}
667668
long timeE = System.currentTimeMillis();
668-
LOGGER.info("Downloaded file {} ({}) to local file {} in {} sec.", remoteURL, String.format("%.1f",disp) + unit, localFile, (timeE - timeS)/1000);
669+
LOGGER.info("Downloaded {} in {} sec. to {}", String.format("%.1f",disp) + unit, (timeE - timeS)/1000, localFile);
669670
}
670671

671672
private boolean domainDescriptionFileAvailable(){

0 commit comments

Comments
 (0)