Skip to content

Commit

Permalink
Putting guards around parts of source that should not be formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdavidsmith committed Jun 23, 2024
1 parent 41067cc commit 5b9b71f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions dna_four_bit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "dna_four_bit.hpp"

// clang-format off
char dna_four_bit_decoding[] = {
'Z', // = 0000 = 0 = {} = Zero bases
'A', // = 0001 = 1 = {A} = Adenine
Expand Down Expand Up @@ -76,3 +77,4 @@ uint8_t dna_four_bit_encoding[] = {
};
// . A B C D . . G H . . K . M N .
// . . R S T . V W . Y Z
// clang-format on
8 changes: 6 additions & 2 deletions smithlab_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,16 @@ smithlab::get_fdr_cutoff(const size_t n_tests, vector<double> &pvals,
char
complement(int i) {
static const int b2c_size = 20;
// clang-format off
static const char b2c[] = {
//A, b, C, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, T
'T','N','G','N','N','N','C','N','N','N','N','N','N','N','N','N','N','N','N','A'
'T','N','G','N','N','N','C','N','N','N','N','N','N','N','N','N','N','N','N','A'
};
static const char b2cl[] = {
//A, b, C, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, T
't','n','g','n','n','n','c','n','n','n','n','n','n','n','n','n','n','n','n','a'
't','n','g','n','n','n','c','n','n','n','n','n','n','n','n','n','n','n','n','a'
};
// clang-format on
if (i - 'A' >= 0 && i - 'A' < b2c_size)
return b2c[i - 'A'];
else if (i - 'a' >= 0 && i - 'a' < b2c_size)
Expand Down Expand Up @@ -236,6 +238,7 @@ ProgressBar::report(std::ostream &out, const size_t i) {
out << '\n';
}

// clang-format off
char to_valid_five_letter[] = {
/* 0*/ 'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N', /* 15*/
/* 16*/ 'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N', /* 31*/
Expand All @@ -246,3 +249,4 @@ char to_valid_five_letter[] = {
/* 96*/ 'N','A','N','C','N','N','N','G','N','N','N','N','N','N','N','N', /*111*/
/*112*/ 'N','N','N','N','T','N','N','N','N','N','N','N','N','N','N','N' /*127*/
};
// clang-format on

0 comments on commit 5b9b71f

Please sign in to comment.