Skip to content

Commit

Permalink
add VERBOSE
Browse files Browse the repository at this point in the history
  • Loading branch information
Zilong-Li committed Jul 2, 2024
1 parent f2b4429 commit ae06697
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: MacOS

on:
push:
branches: [ main, dev ]
branches: [ main, doc ]
pull_request:
branches: [ main ]

Expand All @@ -23,8 +23,8 @@ jobs:
- name: test
run: |
cd test
export LIBRARY_PATH="${LIBRARY_PATH}:$(brew --prefix)/lib"
export C_INCLUDE_PATH="${C_INCLUDE_PATH}:$(brew --prefix)/include"
export CPPFLAGS="-I"$(brew --prefix)/include
make
export LIBRARY_PATH=${LIBRARY_PATH}:$(brew --prefix)/lib
export C_INCLUDE_PATH=${C_INCLUDE_PATH}:$(brew --prefix)/include
export CPPFLAGS=-I"$(brew --prefix)/include"
make HTSINC=$(brew --prefix)/include HTSLIB=$(brew --prefix)/lib
make test
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY = /home/zilong/Projects/mysite/content/proj
OUTPUT_DIRECTORY = /home/zilong/Projects/mysite/public/proj

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
Expand Down
18 changes: 17 additions & 1 deletion vcfpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @file https://github.com/Zilong-Li/vcfpp/vcfpp.h
* @author Zilong Li
* @email [email protected]
* @version v0.3.9
* @version v0.4.0
* @breif a single C++ file for manipulating VCF
* Copyright (C) 2022-2023.The use of this code is governed by the LICENSE file.
******************************************************************************/
Expand Down Expand Up @@ -497,7 +497,9 @@ class BcfRecord
ret = bcf_get_genotypes(header->hdr, line.get(), &gts, &ndst);
if(ret <= 0)
{
# if defined(VERBOSE)
std::cerr << "GT not present for current site. did you initilize the variant object?\n";
# endif
return false;
}
// if nploidy is not set manually. find the max nploidy using the first variant (eg. 2) resize v as
Expand Down Expand Up @@ -568,7 +570,9 @@ class BcfRecord
ret = bcf_get_genotypes(header->hdr, line.get(), &gts, &ndst);
if(ret <= 0)
{
# if defined(VERBOSE)
std::cerr << "GT not present for current site. did you initilize the variant object?\n";
# endif
return false;
}
v.resize(ret);
Expand Down Expand Up @@ -767,8 +771,10 @@ class BcfRecord
}
else
{
# if defined(VERBOSE)
std::cerr << "there are multiple values for " + tag
+ " in INFO for current site. please use vector instead\n";
# endif
return false;
}
}
Expand Down Expand Up @@ -825,7 +831,9 @@ class BcfRecord
}
if(ret < 0)
{
# if defined(VERBOSE)
std::cerr << "couldn't set " + tag + " for this variant.\nplease add the tag in headerfirst.\n";
# endif
return false;
}
return true;
Expand Down Expand Up @@ -861,7 +869,9 @@ class BcfRecord

if(ret < 0)
{
# if defined(VERBOSE)
std::cerr << "couldn't set " + tag + " for this variant.\nplease add the tag in headerfirst.\n";
# endif
return false;
}
return true;
Expand Down Expand Up @@ -927,7 +937,9 @@ class BcfRecord
if(bcf_update_genotypes(header->hdr, line.get(), gt, v.size()) < 0)
{
free(gt);
# if defined(VERBOSE)
std::cerr << "couldn't set genotypes correctly.\n";
# endif
return false;
}
free(gt);
Expand Down Expand Up @@ -994,7 +1006,9 @@ class BcfRecord

if(ret < 0)
{
# if defined(VERBOSE)
std::cerr << "couldn't set format " + tag + " corectly.\n";
# endif
return false;
}
return true;
Expand Down Expand Up @@ -1026,7 +1040,9 @@ class BcfRecord
}
if(ret < 0)
{
# if defined(VERBOSE)
std::cerr << "couldn't set format " + tag + " corectly.\n";
# endif
return false;
}
return true;
Expand Down

0 comments on commit ae06697

Please sign in to comment.