Skip to content

Commit

Permalink
Add Closest reference name back in
Browse files Browse the repository at this point in the history
Also some cosmetic changes to test_stxtyper.sh
  • Loading branch information
evolarjun committed Jan 14, 2025
1 parent 5d87136 commit 198873c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
3 changes: 2 additions & 1 deletion stxtyper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* Dependencies: NCBI BLAST, gunzip (optional)
*
* Release changes:
* 1.0.31 01/14/2025 PD-5215 "re-enable reporting Name of closest sequence"
* 1.0.30 01/14/2025 PD-5215 "Closest reference accession" field should have two accessions separated by "," for two-subunit operons
* 1.0.29 01/10/2025 PD-6215 "Name of closest sequence": na for two-subunit operons
* 1.0.28 01/10/2025 PD-5215 blanks fields -> na; "Closest reference accession" is na for two-subunit operons
Expand Down Expand Up @@ -605,7 +606,7 @@ struct Operon
<< refIdentity //17 "% Identity to reference sequence"
<< alignmentLen //18 "Alignment length"
<< refAccessions //19 "Accession of closest sequence"
<< na /*"Shiga toxin " + genesymbol*/ //20 "Name of closest sequence"
<< "Shiga toxin " + genesymbol //20 "Name of closest sequence"
<< na //21 "HMM id"
<< na //22 "HMM description"
;
Expand Down
12 changes: 6 additions & 6 deletions test/amrfinder_integration.expected
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#Protein id Contig id Start Stop Strand Element symbol Element name Scope Type Subtype Class Subclass Method Target length Reference sequence length % Coverage of reference % Identity to reference Alignment length Closest reference accession Closest reference name HMM accession HMM description
NA partial 27 1048 + stx2_operon Partial stx2 operon plus VIRULENCE STX_TYPE STX2 STX2 PARTIAL 1022 NA NA 99.41 337 NA Shiga toxin stx2 NA NA
NA partial_contig_end 3 661 - stx2_operon Partial stx2 operon plus VIRULENCE STX_TYPE STX2 STX2 PARTIAL_CONTIG_END 659 NA NA 100.00 216 NA Shiga toxin stx2 NA NA
NA stx1a 218 1444 + stx1a_operon stx1a operon plus VIRULENCE STX_TYPE STX1 STX1A COMPLETE 1227 NA NA 100.00 406 NA Shiga toxin stx1a NA NA
NA stx2_fs 2165 3232 + stx2_operon stx2 operon with frameshift plus VIRULENCE STX_TYPE STX2 STX2 FRAMESHIFT 1068 NA NA 99.15 355 NA Shiga toxin stx2c NA NA
NA stx2_novel 216 1456 + stx2_operon Novel stx2 operon plus VIRULENCE STX_TYPE STX2 STX2 COMPLETE_NOVEL 1241 NA NA 99.76 410 NA Shiga toxin stx2c NA NA
NA partial 27 1048 + stx2_operon Partial stx2 operon plus VIRULENCE STX_TYPE STX2 STX2 PARTIAL 1022 NA NA 99.41 337 AAA16362.1,AAS07607.1 Shiga toxin stx2 NA NA
NA partial_contig_end 3 661 - stx2_operon Partial stx2 operon plus VIRULENCE STX_TYPE STX2 STX2 PARTIAL_CONTIG_END 659 NA NA 100.00 216 AAM70046.1,AAA16362.1 Shiga toxin stx2 NA NA
NA stx1a 218 1444 + stx1a_operon stx1a operon plus VIRULENCE STX_TYPE STX1 STX1A COMPLETE 1227 NA NA 100.00 406 AAA98347.1,AAA71894.1 Shiga toxin stx1a NA NA
NA stx2_fs 2165 3232 + stx2_operon stx2 operon with frameshift plus VIRULENCE STX_TYPE STX2 STX2 FRAMESHIFT 1068 NA NA 99.15 355 AAG01033.1,AAA16363.1 Shiga toxin stx2c NA NA
NA stx2_novel 216 1456 + stx2_operon Novel stx2 operon plus VIRULENCE STX_TYPE STX2 STX2 COMPLETE_NOVEL 1241 NA NA 99.76 410 AAA19623.1,AAA16363.1 Shiga toxin stx2c NA NA
NA stx2_stop 694 1653 + stx2_operon stx2 operon with internal stop plus VIRULENCE STX_TYPE STX2 STX2 INTERNAL_STOP 960 NA NA 91.25 320 AUM09788.1 Shiga toxin stx2h subunit A NA NA
NA stx2c 1298 2538 - stx2c_operon stx2c operon plus VIRULENCE STX_TYPE STX2 STX2C COMPLETE 1241 NA NA 100.00 410 NA Shiga toxin stx2c NA NA
NA stx2c 1298 2538 - stx2c_operon stx2c operon plus VIRULENCE STX_TYPE STX2 STX2C COMPLETE 1241 NA NA 100.00 410 AAA16363.1,AAS07596.1 Shiga toxin stx2c NA NA
12 changes: 6 additions & 6 deletions test/amrfinder_integration2.expected
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#Protein id Contig id Start Stop Strand Element symbol Element name Scope Type Subtype Class Subclass Method Target length Reference sequence length % Coverage of reference % Identity to reference Alignment length Closest reference accession Closest reference name HMM accession HMM description Hierarchy node
NA partial 27 1048 + stx2_operon Partial stx2 operon plus VIRULENCE STX_TYPE STX2 STX2 PARTIAL 1022 NA NA 99.41 337 NA Shiga toxin stx2 NA NA stxA2c::stxB2a
NA partial_contig_end 3 661 - stx2_operon Partial stx2 operon plus VIRULENCE STX_TYPE STX2 STX2 PARTIAL_CONTIG_END 659 NA NA 100.00 216 NA Shiga toxin stx2 NA NA stxB2a::stxA2c
NA stx1a 218 1444 + stx1a_operon stx1a operon plus VIRULENCE STX_TYPE STX1 STX1A COMPLETE 1227 NA NA 100.00 406 NA Shiga toxin stx1a NA NA stxA1a::stxB1a
NA stx2_fs 2165 3232 + stx2_operon stx2 operon with frameshift plus VIRULENCE STX_TYPE STX2 STX2 FRAMESHIFT 1068 NA NA 99.15 355 NA Shiga toxin stx2c NA NA stxA2c::stxB2c
NA stx2_novel 216 1456 + stx2_operon Novel stx2 operon plus VIRULENCE STX_TYPE STX2 STX2 COMPLETE_NOVEL 1241 NA NA 99.76 410 NA Shiga toxin stx2c NA NA stxA2c::stxB2c
NA partial 27 1048 + stx2_operon Partial stx2 operon plus VIRULENCE STX_TYPE STX2 STX2 PARTIAL 1022 NA NA 99.41 337 AAA16362.1,AAS07607.1 Shiga toxin stx2 NA NA stxA2c::stxB2a
NA partial_contig_end 3 661 - stx2_operon Partial stx2 operon plus VIRULENCE STX_TYPE STX2 STX2 PARTIAL_CONTIG_END 659 NA NA 100.00 216 AAM70046.1,AAA16362.1 Shiga toxin stx2 NA NA stxB2a::stxA2c
NA stx1a 218 1444 + stx1a_operon stx1a operon plus VIRULENCE STX_TYPE STX1 STX1A COMPLETE 1227 NA NA 100.00 406 AAA98347.1,AAA71894.1 Shiga toxin stx1a NA NA stxA1a::stxB1a
NA stx2_fs 2165 3232 + stx2_operon stx2 operon with frameshift plus VIRULENCE STX_TYPE STX2 STX2 FRAMESHIFT 1068 NA NA 99.15 355 AAG01033.1,AAA16363.1 Shiga toxin stx2c NA NA stxA2c::stxB2c
NA stx2_novel 216 1456 + stx2_operon Novel stx2 operon plus VIRULENCE STX_TYPE STX2 STX2 COMPLETE_NOVEL 1241 NA NA 99.76 410 AAA19623.1,AAA16363.1 Shiga toxin stx2c NA NA stxA2c::stxB2c
NA stx2_stop 694 1653 + stx2_operon stx2 operon with internal stop plus VIRULENCE STX_TYPE STX2 STX2 INTERNAL_STOP 960 NA NA 91.25 320 AUM09788.1 Shiga toxin stx2h subunit A NA NA stxA2h
NA stx2c 1298 2538 - stx2c_operon stx2c operon plus VIRULENCE STX_TYPE STX2 STX2C COMPLETE 1241 NA NA 100.00 410 NA Shiga toxin stx2c NA NA stxB2c::stxA2a
NA stx2c 1298 2538 - stx2c_operon stx2c operon plus VIRULENCE STX_TYPE STX2 STX2C COMPLETE 1241 NA NA 100.00 410 AAA16363.1,AAS07596.1 Shiga toxin stx2c NA NA stxB2c::stxA2a
10 changes: 5 additions & 5 deletions test_stxtyper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ FAILURES=0
TESTS=0
TEST_TEXT=''

echo "TERM=$TERM"
# echo "TERM=$TERM"

# some color macros
if [ "$TERM" == "" ] || [ "$TERM" == "dumb" ]
if [ "$TERM" == "" ] || [ "$TERM" == "dumb" ] || [ ! -t 1 ]
then
green='' # no colors
red=''
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.30
1.0.31

0 comments on commit 198873c

Please sign in to comment.