Skip to content

Commit

Permalink
Update consolidation test data
Browse files Browse the repository at this point in the history
  • Loading branch information
eaasna committed Sep 12, 2023
1 parent 52756a1 commit 0d6303c
Show file tree
Hide file tree
Showing 18 changed files with 154 additions and 478 deletions.
12 changes: 2 additions & 10 deletions test/api/utilities/consolidate/consolidate_matches_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ std::filesystem::path consolidation_meta_path(size_t const number_of_bins, size_
return data(name);
}

std::filesystem::path stellar_gold_path(size_t const overlap) noexcept
{
std::string name{};
name += std::to_string(overlap);
name += "overlap_full.gff";
return data(name);
}

void compare_gff_out(std::vector<valik::stellar_match> const & expected,
std::vector<valik::stellar_match> const & actual)
{
Expand Down Expand Up @@ -70,7 +62,7 @@ TEST(consolidate_matches, bins8overlap50)
valik::consolidate_matches(arguments);

valik::database_metadata reference(arguments.ref_meta_path, false);
auto expected = valik::read_stellar_output(stellar_gold_path(segment_overlap), reference, std::ios::binary);
auto expected = valik::read_stellar_output(data("stellar_truth.gff"), reference, std::ios::binary);
auto actual = valik::read_stellar_output("consolidated.gff", reference);

compare_gff_out(expected, actual);
Expand All @@ -89,7 +81,7 @@ TEST(consolidate_matches, bins16overlap50)
valik::consolidate_matches(arguments);

valik::database_metadata reference(arguments.ref_meta_path, false);
auto expected = valik::read_stellar_output(stellar_gold_path(segment_overlap), reference, std::ios::binary);
auto expected = valik::read_stellar_output(data("stellar_truth.gff"), reference, std::ios::binary);
auto actual = valik::read_stellar_output("consolidated.gff", reference);

compare_gff_out(expected, actual);
Expand Down
46 changes: 23 additions & 23 deletions test/data/consolidate/16bins50overlap_dream_all.gff
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
3 Stellar eps-matches 1 176 94.382 + . 1;seq2Range=686,863;eValue=5.12253e-72;cigar=169M1I4M1I3M;mutations=49G,57C,71C,89C,97T,165A,170A,173G,175T,176T
3 Stellar eps-matches 1 176 94.382 + . 1;seq2Range=686,863;eValue=5.12253e-72;cigar=169M1I4M1I3M;mutations=49G,57C,71C,89C,97T,165A,170A,173G,175T,176T
3 Stellar eps-matches 1 176 94.382 + . 1;seq2Range=686,863;eValue=5.12253e-72;cigar=169M1I4M1I3M;mutations=49G,57C,71C,89C,97T,165A,170A,173G,175T,176T
2 Stellar eps-matches 187 386 94.0594 + . 1;seq2Range=662,863;eValue=5.91081e-81;cigar=193M1I4M1I3M;mutations=2T,21C,73G,81C,95C,113C,121T,189A,194A,197G,199T,200T
2 Stellar eps-matches 187 386 94.0594 + . 1;seq2Range=662,863;eValue=5.91081e-81;cigar=193M1I4M1I3M;mutations=2T,21C,73G,81C,95C,113C,121T,189A,194A,197G,199T,200T
2 Stellar eps-matches 187 386 94.0594 + . 1;seq2Range=662,863;eValue=5.91081e-81;cigar=193M1I4M1I3M;mutations=2T,21C,73G,81C,95C,113C,121T,189A,194A,197G,199T,200T
2 Stellar eps-matches 68 258 94.3005 + . 1;seq2Range=446,635;eValue=7.45606e-78;cigar=3M1I171M1I1M1D9M1D2M1D2M;mutations=4A,46C,63G,96C,105T,135G,168C,176C
2 Stellar eps-matches 148 202 94.7368 + . 1;seq2Range=912,968;eValue=5.69217e-20;cigar=53M1I1M1I1M;mutations=26A,54T,56T
2 Stellar eps-matches 187 386 94.0594 + . 1;seq2Range=662,863;eValue=5.91081e-81;cigar=193M1I4M1I3M;mutations=2T,21C,73G,81C,95C,113C,121T,189A,194A,197G,199T,200T
2 Stellar eps-matches 68 258 94.3005 + . 1;seq2Range=446,635;eValue=7.45606e-78;cigar=3M1I171M1I1M1D9M1D2M1D2M;mutations=4A,46C,63G,96C,105T,135G,168C,176C
2 Stellar eps-matches 18 147 94.6153 + . 1;seq2Range=1054,1183;eValue=1.69762e-51;cigar=130M;mutations=2C,14A,24A,35T,41T,54A,65G
2 Stellar eps-matches 148 202 94.7368 + . 1;seq2Range=912,968;eValue=5.69217e-20;cigar=53M1I1M1I1M;mutations=26A,54T,56T
2 Stellar eps-matches 68 258 94.3005 + . 1;seq2Range=446,635;eValue=7.45606e-78;cigar=2M1I172M1I1M1D9M1D2M1D2M;mutations=3A,46C,63G,96C,105T,135G,168C,176C
2 Stellar eps-matches 18 147 94.6153 + . 1;seq2Range=1054,1183;eValue=1.69762e-51;cigar=130M;mutations=2C,14A,24A,35T,41T,54A,65G
1 Stellar eps-matches 469 560 94.5652 + . 1;seq2Range=60,151;eValue=7.11652e-35;cigar=92M;mutations=15G,58C,60A,87A,90G
1 Stellar eps-matches 272 426 94.1935 + . 1;seq2Range=2107,2261;eValue=3.12561e-61;cigar=155M;mutations=3A,4G,8A,13A,23C,44C,52C,101C,138G
1 Stellar eps-matches 469 560 94.5652 + . 1;seq2Range=60,151;eValue=7.11652e-35;cigar=92M;mutations=15G,58C,60A,87A,90G
1 Stellar eps-matches 177 359 94.0217 + . 1;seq2Range=1807,1987;eValue=4.05784e-73;cigar=92M1D1M1I86M2D1M;mutations=54C,70A,84T,94G,109A,139C,150G,163C
1 Stellar eps-matches 272 426 94.1935 + . 1;seq2Range=2107,2261;eValue=3.12561e-61;cigar=155M;mutations=3A,4G,8A,13A,23C,44C,52C,101C,138G
1 Stellar eps-matches 26 205 94.4444 + . 1;seq2Range=1199,1377;eValue=1.33385e-72;cigar=177M1D2M;mutations=2G,42T,56G,61T,107C,120A,137C,169T,172A
1 Stellar eps-matches 72 125 94.4444 + . 1;seq2Range=1640,1693;eValue=2.45585e-18;cigar=54M;mutations=3T,11G,27T
1 Stellar eps-matches 177 359 94.0217 + . 1;seq2Range=1807,1987;eValue=4.05784e-73;cigar=92M1D1M1I83M2D4M;mutations=54C,70A,84T,94G,109A,139C,150G,163C
1 Stellar eps-matches 126 307 94.0217 + . 1;seq2Range=204,384;eValue=4.05784e-73;cigar=2M1D2M1D171M2I1M1D3M;mutations=19A,24T,96G,159C,166A,170A,176A,177T
1 Stellar eps-matches 272 426 94.1935 + . 1;seq2Range=2107,2261;eValue=3.12561e-61;cigar=155M;mutations=3A,4G,8A,13A,23C,44C,52C,101C,138G
1 Stellar eps-matches 26 205 94.4444 + . 1;seq2Range=1199,1377;eValue=1.33385e-72;cigar=177M1D2M;mutations=2G,42T,56G,61T,107C,120A,137C,169T,172A
1 Stellar eps-matches 177 359 94.0217 + . 1;seq2Range=1807,1987;eValue=4.05784e-73;cigar=92M1D1M1I83M2D4M;mutations=54C,70A,84T,94G,109A,139C,150G,163C
1 Stellar eps-matches 126 307 94.0217 + . 1;seq2Range=204,384;eValue=4.05784e-73;cigar=2M1D2M1D171M2I1M1D3M;mutations=19A,24T,96G,159C,166A,170A,176A,177T
1 Stellar eps-matches 26 205 94.4444 + . 1;seq2Range=1199,1377;eValue=1.33385e-72;cigar=177M1D2M;mutations=2G,42T,56G,61T,107C,120A,137C,169T,172A
1 Stellar eps-matches 272 426 94.1935 + . 1;seq2Range=2107,2261;eValue=3.12561e-61;cigar=155M;mutations=3A,4G,8A,13A,23C,44C,52C,101C,138G
1 Stellar eps-matches 177 359 94.0217 + . 1;seq2Range=1807,1987;eValue=4.05784e-73;cigar=92M1D1M1I86M2D1M;mutations=54C,70A,84T,94G,109A,139C,150G,163C
1 Stellar eps-matches 272 426 94.1935 + . 1;seq2Range=2107,2261;eValue=3.12561e-61;cigar=155M;mutations=3A,4G,8A,13A,23C,44C,52C,101C,138G
1 Stellar eps-matches 272 426 94.1935 + . 1;seq2Range=2107,2261;eValue=3.12561e-61;cigar=155M;mutations=3A,4G,8A,13A,23C,44C,52C,101C,138G
1 Stellar eps-matches 469 560 94.5652 + . 1;seq2Range=60,151;eValue=7.11652e-35;cigar=92M;mutations=15G,58C,60A,87A,90G
1 Stellar eps-matches 469 560 94.5652 + . 1;seq2Range=60,151;eValue=7.11652e-35;cigar=92M;mutations=15G,58C,60A,87A,90G
1 Stellar eps-matches 177 359 94.0217 + . 1;seq2Range=1807,1987;eValue=4.05784e-73;cigar=92M1D1M1I83M2D4M;mutations=54C,70A,84T,94G,109A,139C,150G,163C
1 Stellar eps-matches 126 307 94.0217 + . 1;seq2Range=204,384;eValue=4.05784e-73;cigar=2M1D2M1D171M2I1M1D3M;mutations=19A,24T,96G,159C,166A,170A,176A,177T
1 Stellar eps-matches 26 205 94.4444 + . 1;seq2Range=1199,1377;eValue=1.33385e-72;cigar=177M1D2M;mutations=2G,42T,56G,61T,107C,120A,137C,169T,172A
1 Stellar eps-matches 72 125 94.4444 + . 1;seq2Range=1640,1693;eValue=2.45585e-18;cigar=54M;mutations=3T,11G,27T
1 Stellar eps-matches 26 205 94.4444 + . 1;seq2Range=1199,1377;eValue=1.33385e-72;cigar=177M1D2M;mutations=2G,42T,56G,61T,107C,120A,137C,169T,172A
1 Stellar eps-matches 72 125 94.4444 + . 1;seq2Range=1640,1693;eValue=2.45585e-18;cigar=54M;mutations=3T,11G,27T
2 Stellar eps-matches 68 258 94.3005 + . 1;seq2Range=446,635;eValue=7.45606e-78;cigar=2M1I172M1I1M1D9M1D2M1D2M;mutations=3A,46C,63G,96C,105T,135G,168C,176C
2 Stellar eps-matches 18 147 94.6153 + . 1;seq2Range=1054,1183;eValue=1.69762e-51;cigar=130M;mutations=2C,14A,24A,35T,41T,54A,65G
2 Stellar eps-matches 187 386 94.0594 + . 1;seq2Range=662,863;eValue=5.91081e-81;cigar=193M1I4M1I3M;mutations=2T,21C,73G,81C,95C,113C,121T,189A,194A,197G,199T,200T
2 Stellar eps-matches 68 258 94.3005 + . 1;seq2Range=446,635;eValue=7.45606e-78;cigar=3M1I171M1I1M1D9M1D2M1D2M;mutations=4A,46C,63G,96C,105T,135G,168C,176C
2 Stellar eps-matches 148 202 94.7368 + . 1;seq2Range=912,968;eValue=5.69217e-20;cigar=53M1I1M1I1M;mutations=26A,54T,56T
2 Stellar eps-matches 187 386 94.0594 + . 1;seq2Range=662,863;eValue=5.91081e-81;cigar=193M1I4M1I3M;mutations=2T,21C,73G,81C,95C,113C,121T,189A,194A,197G,199T,200T
2 Stellar eps-matches 187 386 94.0594 + . 1;seq2Range=662,863;eValue=5.91081e-81;cigar=193M1I4M1I3M;mutations=2T,21C,73G,81C,95C,113C,121T,189A,194A,197G,199T,200T
2 Stellar eps-matches 187 386 94.0594 + . 1;seq2Range=662,863;eValue=5.91081e-81;cigar=193M1I4M1I3M;mutations=2T,21C,73G,81C,95C,113C,121T,189A,194A,197G,199T,200T
2 Stellar eps-matches 68 258 94.3005 + . 1;seq2Range=446,635;eValue=7.45606e-78;cigar=3M1I171M1I1M1D9M1D2M1D2M;mutations=4A,46C,63G,96C,105T,135G,168C,176C
2 Stellar eps-matches 18 147 94.6153 + . 1;seq2Range=1054,1183;eValue=1.69762e-51;cigar=130M;mutations=2C,14A,24A,35T,41T,54A,65G
2 Stellar eps-matches 148 202 94.7368 + . 1;seq2Range=912,968;eValue=5.69217e-20;cigar=53M1I1M1I1M;mutations=26A,54T,56T
3 Stellar eps-matches 1 176 94.382 + . 1;seq2Range=686,863;eValue=5.12253e-72;cigar=169M1I4M1I3M;mutations=49G,57C,71C,89C,97T,165A,170A,173G,175T,176T
3 Stellar eps-matches 1 176 94.382 + . 1;seq2Range=686,863;eValue=5.12253e-72;cigar=169M1I4M1I3M;mutations=49G,57C,71C,89C,97T,165A,170A,173G,175T,176T
3 Stellar eps-matches 1 176 94.382 + . 1;seq2Range=686,863;eValue=5.12253e-72;cigar=169M1I4M1I3M;mutations=49G,57C,71C,89C,97T,165A,170A,173G,175T,176T
11 changes: 0 additions & 11 deletions test/data/consolidate/16bins50overlap_dream_consolidated.gff

This file was deleted.

28 changes: 14 additions & 14 deletions test/data/consolidate/8bins50overlap_dream_all.gff
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
3 Stellar eps-matches 1 176 94.382 + . 1;seq2Range=686,863;eValue=5.12253e-72;cigar=169M1I4M1I3M;mutations=49G,57C,71C,89C,97T,165A,170A,173G,175T,176T
2 Stellar eps-matches 187 386 94.0594 + . 1;seq2Range=662,863;eValue=5.91081e-81;cigar=193M1I4M1I3M;mutations=2T,21C,73G,81C,95C,113C,121T,189A,194A,197G,199T,200T
2 Stellar eps-matches 187 386 94.0594 + . 1;seq2Range=662,863;eValue=5.91081e-81;cigar=193M1I4M1I3M;mutations=2T,21C,73G,81C,95C,113C,121T,189A,194A,197G,199T,200T
2 Stellar eps-matches 68 258 94.3005 + . 1;seq2Range=446,635;eValue=7.45606e-78;cigar=3M1I171M1I1M1D9M1D2M1D2M;mutations=4A,46C,63G,96C,105T,135G,168C,176C
2 Stellar eps-matches 148 202 94.7368 + . 1;seq2Range=912,968;eValue=5.69217e-20;cigar=53M1I1M1I1M;mutations=26A,54T,56T
2 Stellar eps-matches 187 386 94.0594 + . 1;seq2Range=662,863;eValue=5.91081e-81;cigar=193M1I4M1I3M;mutations=2T,21C,73G,81C,95C,113C,121T,189A,194A,197G,199T,200T
2 Stellar eps-matches 68 258 94.3005 + . 1;seq2Range=446,635;eValue=7.45606e-78;cigar=2M1I172M1I1M1D9M1D2M1D2M;mutations=3A,46C,63G,96C,105T,135G,168C,176C
2 Stellar eps-matches 18 147 94.6153 + . 1;seq2Range=1054,1183;eValue=1.69762e-51;cigar=130M;mutations=2C,14A,24A,35T,41T,54A,65G
2 Stellar eps-matches 148 202 94.7368 + . 1;seq2Range=912,968;eValue=5.69217e-20;cigar=53M1I1M1I1M;mutations=26A,54T,56T
1 Stellar eps-matches 469 560 94.5652 + . 1;seq2Range=60,151;eValue=7.11652e-35;cigar=92M;mutations=15G,58C,60A,87A,90G
1 Stellar eps-matches 177 359 94.0217 + . 1;seq2Range=1807,1987;eValue=4.05784e-73;cigar=92M1D1M1I83M2D4M;mutations=54C,70A,84T,94G,109A,139C,150G,163C
1 Stellar eps-matches 272 426 94.1935 + . 1;seq2Range=2107,2261;eValue=3.12561e-61;cigar=155M;mutations=3A,4G,8A,13A,23C,44C,52C,101C,138G
1 Stellar eps-matches 177 359 94.0217 + . 1;seq2Range=1807,1987;eValue=4.05784e-73;cigar=92M1D1M1I83M2D4M;mutations=54C,70A,84T,94G,109A,139C,150G,163C
1 Stellar eps-matches 126 307 94.0217 + . 1;seq2Range=204,384;eValue=4.05784e-73;cigar=2M1D2M1D171M2I1M1D3M;mutations=19A,24T,96G,159C,166A,170A,176A,177T
1 Stellar eps-matches 26 205 94.4444 + . 1;seq2Range=1199,1377;eValue=1.33385e-72;cigar=177M1D2M;mutations=2G,42T,56G,61T,107C,120A,137C,169T,172A
1 Stellar eps-matches 272 426 94.1935 + . 1;seq2Range=2107,2261;eValue=3.12561e-61;cigar=155M;mutations=3A,4G,8A,13A,23C,44C,52C,101C,138G
1 Stellar eps-matches 72 125 94.4444 + . 1;seq2Range=1640,1693;eValue=2.45585e-18;cigar=54M;mutations=3T,11G,27T
1 Stellar eps-matches 177 359 94.0217 + . 1;seq2Range=1807,1987;eValue=4.05784e-73;cigar=92M1D1M1I83M2D4M;mutations=54C,70A,84T,94G,109A,139C,150G,163C
1 Stellar eps-matches 126 307 94.0217 + . 1;seq2Range=204,384;eValue=4.05784e-73;cigar=2M1D2M1D171M2I1M1D3M;mutations=19A,24T,96G,159C,166A,170A,176A,177T
1 Stellar eps-matches 26 205 94.4444 + . 1;seq2Range=1199,1377;eValue=1.33385e-72;cigar=177M1D2M;mutations=2G,42T,56G,61T,107C,120A,137C,169T,172A
1 Stellar eps-matches 72 125 94.4444 + . 1;seq2Range=1640,1693;eValue=2.45585e-18;cigar=54M;mutations=3T,11G,27T
1 Stellar eps-matches 272 426 94.1935 + . 1;seq2Range=2107,2261;eValue=3.12561e-61;cigar=155M;mutations=3A,4G,8A,13A,23C,44C,52C,101C,138G
1 Stellar eps-matches 177 359 94.0217 + . 1;seq2Range=1807,1987;eValue=4.05784e-73;cigar=92M1D1M1I83M2D4M;mutations=54C,70A,84T,94G,109A,139C,150G,163C
1 Stellar eps-matches 272 426 94.1935 + . 1;seq2Range=2107,2261;eValue=3.12561e-61;cigar=155M;mutations=3A,4G,8A,13A,23C,44C,52C,101C,138G
1 Stellar eps-matches 469 560 94.5652 + . 1;seq2Range=60,151;eValue=7.11652e-35;cigar=92M;mutations=15G,58C,60A,87A,90G
2 Stellar eps-matches 187 386 94.0594 + . 1;seq2Range=662,863;eValue=5.91081e-81;cigar=193M1I4M1I3M;mutations=2T,21C,73G,81C,95C,113C,121T,189A,194A,197G,199T,200T
2 Stellar eps-matches 68 258 94.3005 + . 1;seq2Range=446,635;eValue=7.45606e-78;cigar=2M1I172M1I1M1D9M1D2M1D2M;mutations=3A,46C,63G,96C,105T,135G,168C,176C
2 Stellar eps-matches 18 147 94.6153 + . 1;seq2Range=1054,1183;eValue=1.69762e-51;cigar=130M;mutations=2C,14A,24A,35T,41T,54A,65G
2 Stellar eps-matches 148 202 94.7368 + . 1;seq2Range=912,968;eValue=5.69217e-20;cigar=53M1I1M1I1M;mutations=26A,54T,56T
2 Stellar eps-matches 187 386 94.0594 + . 1;seq2Range=662,863;eValue=5.91081e-81;cigar=193M1I4M1I3M;mutations=2T,21C,73G,81C,95C,113C,121T,189A,194A,197G,199T,200T
2 Stellar eps-matches 68 258 94.3005 + . 1;seq2Range=446,635;eValue=7.45606e-78;cigar=3M1I171M1I1M1D9M1D2M1D2M;mutations=4A,46C,63G,96C,105T,135G,168C,176C
2 Stellar eps-matches 148 202 94.7368 + . 1;seq2Range=912,968;eValue=5.69217e-20;cigar=53M1I1M1I1M;mutations=26A,54T,56T
2 Stellar eps-matches 187 386 94.0594 + . 1;seq2Range=662,863;eValue=5.91081e-81;cigar=193M1I4M1I3M;mutations=2T,21C,73G,81C,95C,113C,121T,189A,194A,197G,199T,200T
3 Stellar eps-matches 1 176 94.382 + . 1;seq2Range=686,863;eValue=5.12253e-72;cigar=169M1I4M1I3M;mutations=49G,57C,71C,89C,97T,165A,170A,173G,175T,176T
11 changes: 0 additions & 11 deletions test/data/consolidate/8bins50overlap_dream_consolidated.gff

This file was deleted.

35 changes: 35 additions & 0 deletions test/data/consolidate/api_test_input.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
cd consolidate
set -Eeuo pipefail

rm -f *_full.gff
rm -f *bins*overlap_segment_metadata.tsv
rm -f *bins*overlap_reference_metadata.tsv

errRate=0.06
ref_file=multi_seq_ref.fasta
query_file=query_e${errRate}.fasta
minLen=50

stellar -e $errRate -l $minLen -o stellar_truth.gff $ref_file $query_file > /dev/null

for bin in 8 16
do
valik split $ref_file --db-meta ${bin}bins${minLen}overlap_reference_metadata.tsv \
--seg-meta ${bin}bins${minLen}overlap_segment_metadata.tsv \
--seg-count $bin --overlap $minLen

while read -r bin_id id start len;
do
end=$(echo $start + $len | bc)
stellar -e $errRate -l $minLen -o multi_seq_ref_${id}_${start}_${len}.gff \
--sequenceOfInterest $id --segmentBegin $start \
--segmentEnd $end $ref_file $query_file > /dev/null

done < ${bin}bins${minLen}overlap_segment_metadata.tsv

rm ${bin}bins${minLen}overlap_segment_metadata.tsv

cat multi_seq_ref_*.gff > ${bin}bins${minLen}overlap_dream_all.gff
rm multi_seq_ref_*
done
39 changes: 0 additions & 39 deletions test/data/consolidate/cli_test_input.sh

This file was deleted.

Loading

0 comments on commit 0d6303c

Please sign in to comment.