Skip to content

Commit

Permalink
release notes v1.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
yhoogstrate committed Mar 3, 2020
1 parent f28e9df commit 320ae7c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project(fastafs)
# Do this once in a while - find different bugs
#set(CMAKE_CXX_COMPILER "clang++")

set(PROJECT_VERSION "1.7.4")
set(PROJECT_VERSION "1.7.5")
set(PACKAGE_URL "https://github.com/yhoogstrate/fastafs")
set(PACKAGE_BUGREPORT "${PACKAGE_URL}/issues")

Expand Down
10 changes: 8 additions & 2 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
2020-20-27 Youri Hoogstrate
2020-03-03 Youri Hoogstrate

* v1.7.5
* Added argument `check -5/--md5sum` to do file verification using md5sums as well
* Fixed error code returned after `fastafs check --help`

2020-02-27 Youri Hoogstrate

* v1.7.4
* Added argument `cache --2bit` for statistical analysis

2020-20-26 Youri Hoogstrate
2020-02-26 Youri Hoogstrate

* v1.7.3
* Small decoy function added for basic snakemake compatiblity
Expand Down
17 changes: 16 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ void usage_check(void)
{
std::cout << "usage: " << PACKAGE << " check [<options>] <fastafs-id>\n\n";
std::cout << " -f, --file Provide fastafs by file path, not from database (cache)" << std::endl;
std::cout << " -5, --md5 Check file integrity using whole-file-CRC32 plus per-sequence MD5" << std::endl;
std::cout << std::endl;
std::cout << " -h, --help Display this help and exit";
std::cout << std::endl;
Expand Down Expand Up @@ -272,12 +273,21 @@ int main(int argc, char *argv[])
}
} else if(strcmp(argv[1], "check") == 0) {
if(argc > 2) {
if(strcmp(argv[2], "--help") == 0 or strcmp(argv[2], "-h") == 0) {
usage_check();
exit(0);
}

bool from_file = false;
bool check_md5 = false;

for(int i = 2; i < argc - 1; i++) {
if(strcmp(argv[i], "-f") == 0 or strcmp(argv[i], "--file") == 0) {
from_file = true;
}
else if (strcmp(argv[i], "-5") == 0 or strcmp(argv[i], "--md5") == 0) {
check_md5 = true;
}
}

std::string fname;
Expand All @@ -297,7 +307,12 @@ int main(int argc, char *argv[])
f.load(fname);

bool check1 = f.check_file_integrity(true);
bool check2 = f.check_sequence_integrity(true);
bool check2 = true;

if(check_md5) {
check2 = f.check_sequence_integrity(true);
}

if(check1 and check2) {
return 0;
} else {
Expand Down

0 comments on commit 320ae7c

Please sign in to comment.