Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ncbi/stxtyper
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 24ec79d025481df37f47635b976380a71818d0f4
Choose a base ref
...
head repository: ncbi/stxtyper
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a9b7b05298aa04c9624cc814c6c293bd710e8ce6
Choose a head ref
  • 3 commits
  • 5 files changed
  • 2 contributors

Commits on Dec 20, 2024

  1. Copy the full SHA
    b9cbc08 View commit details
  2. Copy the full SHA
    23f5dab View commit details
  3. PD-5201 Change empty fields to NA

    Vyacheslav Brover committed Dec 20, 2024
    Copy the full SHA
    a9b7b05 View commit details
Showing with 24 additions and 21 deletions.
  1. +2 −1 amrfinder_columns.hpp
  2. +17 −15 stxtyper.cpp
  3. +1 −1 test/cases.expected
  4. +3 −3 test_stxtyper.sh
  5. +1 −1 version.txt
3 changes: 2 additions & 1 deletion amrfinder_columns.hpp
Original file line number Diff line number Diff line change
@@ -66,4 +66,5 @@ constexpr const char* hierarchyNode_colName = "Hierarchy node";

// PD-5155
constexpr const char* fusion_infix = "::"; // was: "/"


constexpr const char* na ("NA");
32 changes: 17 additions & 15 deletions stxtyper.cpp
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@
* Dependencies: NCBI BLAST, gunzip (optional)
*
* Release changes:
* 1.0.32 12/20/2024 PD-5201 Change empty fields to NA
* 1.0.31 12/17/2024 PD-5181 COMPLETE and COMPLETE_NOVEL is preferred over the other operon types
* operons with higher identity and higher coverage are preferred
* 1.0.30 12/14/2024 Bug in --debug
@@ -129,7 +130,7 @@ constexpr size_t slack = 30;
constexpr double identity_min = 0.8; // PD-5192

const string stxS ("stx");
const string na ("NA");
//const string na ("NA");



@@ -351,8 +352,8 @@ struct BlastAlignment
<< subclass //12 "Subclass"
<< quality //13 "Method"
<< targetEnd - targetStart /*targetAlign*/ //14 "Target length"
<< noString /*refLen*/ //15 "Reference sequence length"
<< noString /*refCoverage*/ //16 "% Coverage of reference sequence"
<< na /*refLen*/ //15 "Reference sequence length"
<< na /*refCoverage*/ //16 "% Coverage of reference sequence"
<< refIdentity //17 "% Identity to reference sequence"
<< length //18 "Alignment length"
<< refAccession //19 "Accession of closest sequence"
@@ -368,24 +369,24 @@ struct BlastAlignment
td << targetName
<< stxType_reported
<< quality
<< noString
<< na
<< targetStart + 1
<< targetEnd
<< strand;
if (subunit == 'B')
td << noString
<< noString
<< noString
<< noString;
td << na
<< na
<< na
<< na;
td << refAccession
<< subClass
<< refIdentity
<< refCoverage;
if (subunit == 'A')
td << noString
<< noString
<< noString
<< noString;
td << na
<< na
<< na
<< na;
}
td. newLn ();
}
@@ -608,6 +609,7 @@ struct Operon
: al1->partial ()
|| al2->partial ()
? "PARTIAL"
// complete operon types
: novel
? ambig ()
? "AMBIGUOUS"
@@ -656,8 +658,8 @@ struct Operon
<< subclass //12 "Subclass"
<< quality //13 "Method"
<< targetAlign //14 "Target length"
<< noString /*refLen*/ //15 "Reference sequence length"
<< noString /*refCoverage*/ //16 "% Coverage of reference sequence"
<< na /*refLen*/ //15 "Reference sequence length"
<< na /*refCoverage*/ //16 "% Coverage of reference sequence"
<< refIdentity //17 "% Identity to reference sequence"
<< alignmentLen //18 "Alignment length"
<< refAccessions //19 "Accession of closest sequence"
@@ -945,7 +947,7 @@ struct ThisApplication final : ShellApplication
stderr << "Version: " << version << '\n';

const string logFName (tmp + "/log");
const string qcS (qc_on ? " -qc" : "");
const string qcS (qc_on ? " -qc" : noString);


// blast_bin
2 changes: 1 addition & 1 deletion test/cases.expected
Original file line number Diff line number Diff line change
@@ -4,5 +4,5 @@ PD-4797_multirow stx1 PARTIAL 100.00 1625 2852 - AAA98347.1 stxA1a 100.00 100.00
PD-4897_multirow_contig_end stx2 PARTIAL_CONTIG_END 11 274 + AAA16361.1 stxB2b 100.00 100.00
PD-4898_A2a_B2l stx2a COMPLETE 100.00 718 1958 + QZL10984.1 stxA2a 100.00 100.00 QZL10985.1 stxB2 100.00 100.00
PD-5064_ambiguous_bases stx2 AMBIGUOUS 99.27 333 1573 - AAA19623.1 stxA2 99.38 100.00 AAM90978.1 stxB2a 98.89 100.00
multiple_calls_overlapping_PD-5181 stx2 PARTIAL 100.00 336 1474 + AAS07596.1 stxA2 100.00 100.00 AAA16363.1 stxB2c 100.00 62.22
multiple_calls_overlapping_PD-5181 stx2 PARTIAL 100.00 336 1474 + AAS07596.1 stxA2 100.00 100.00 EED0303793.1 stxB2j 100.00 63.64
stx2d_better_stxB2k stx2d COMPLETE 100.00 3 1243 + AAM22256.1 stxA2 100.00 100.00 MCW3229578.1 stxB2d 100.00 100.00
6 changes: 3 additions & 3 deletions test_stxtyper.sh
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ function test_input_file {
then
echo "${red}not ok: $STXTYPER returned a non-zero exit value indicating a failure of the software${reset}"
echo "# $STXTYPER $options -n test/$test_base.fa > test/$test_base.got"
TEST_TEXT="$TEST_TEXT"$'\n'"Failed $test_base"
TEST_TEXT="$TEST_TEXT"$'\n'"${red}Failed $test_base${reset}"
return 1
else
if ! diff -q "test/$test_base.expected" "test/$test_base.got"
@@ -73,7 +73,7 @@ function test_input_file {
diff "test/$test_base.expected" "test/$test_base.got"
echo "# To approve run:"
echo "# mv test/$test_base.got test/$test_base.expected "
TEST_TEXT="$TEST_TEXT"$'\n'"Failed $test_base"
TEST_TEXT="$TEST_TEXT"$'\n'"${red}Failed $test_base${reset}"
return 1
else
echo "${green}ok:${reset} test/$test_base.fa"
@@ -95,7 +95,7 @@ then
diff "test/basic.nuc_out.expected" "test/basic.nuc_out.got"
echo "# To approve run:"
echo "# mv test/basic.nuc_out.got test/basic.nuc_out.expected "
TEST_TEXT="$TEST_TEXT"$'\n'"Failed basic --nucleotide_output test"
TEST_TEXT="$TEST_TEXT"$'\n'"${red}Failed basic --nucleotide_output test${reset}"
FAILURES=$(( $FAILURES + 1 ))
else
echo "${green}ok:${reset} --nucleotide_output test/basic.nuc_out.got options worked"
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.31
1.0.32