Skip to content

Commit 7f0b767

Browse files
committed
release version 1.2.0-beta10
1 parent be7dc6b commit 7f0b767

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# X-Mapper: a fast, accurate aligner for genomic sequences
22

3-
Download the latest release version here: https://github.com/mathjeff/Mapper/releases/download/1.2.0-beta09/x-mapper-1.2.0-beta09.jar
3+
Download the latest release version here: https://github.com/mathjeff/Mapper/releases/download/1.2.0-beta10/x-mapper-1.2.0-beta10.jar
44

55
Read about the algorithm, plus benchmarking and application in the publication here: https://genomebiology.biomedcentral.com/articles/10.1186/s13059-024-03473-7
66

src/main/java/mapper/Serializer.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
// It doesn't worry about making sure the written data can still be read by a future version of the code, because we don't need that
1111
public class Serializer {
1212
public Serializer(File file) throws IOException {
13-
this.outputStream = new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(file)));
13+
this.outputFile = file;
14+
this.tempOutputFile = new File(file.toString() + ".tmp");
15+
this.outputStream = new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(tempOutputFile)));
1416
}
1517

1618
public void writeBytesAndLength(byte[] data) throws IOException {
@@ -40,7 +42,10 @@ public void writeProperty(String key, String value) throws IOException {
4042

4143
public void close() throws IOException {
4244
this.outputStream.close();
45+
this.tempOutputFile.renameTo(this.outputFile);
4346
}
4447

4548
private BufferedOutputStream outputStream;
49+
private File outputFile;
50+
private File tempOutputFile;
4651
}

0 commit comments

Comments
 (0)