Skip to content

Commit

Permalink
removing test_data dir
Browse files Browse the repository at this point in the history
  • Loading branch information
tgaspe committed Aug 27, 2024
1 parent 332f3ff commit bf5827a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 46 deletions.
1 change: 0 additions & 1 deletion src/bcftools/bcftools_stats/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ resources:
test_resources:
- type: bash_script
path: test.sh
- path: test_data

engines:
- type: docker
Expand Down
23 changes: 10 additions & 13 deletions src/bcftools/bcftools_stats/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,11 @@ EOF
bgzip -c $TMPDIR/exons.bed > $TMPDIR/exons.bed.gz
tabix -s1 -b2 -e3 $TMPDIR/exons.bed.gz

# Create test data
cat <<EOF > "$TMPDIR/reference.fasta.fai"
1 248956422 52 60 61
2 242193529 253404903 60 61
3 198295559 499159537 60 61
4 190214555 700362049 60 61
19 181538259 895464957 60 61
20 170805979 1083893029 60 61
EOF
# Create fai test file
# cat <<EOF > "$TMPDIR/reference.fasta.fai"
# 19 100 895464957 60 61
# 20 10000 1083893029 60 61
# EOF

# Test 1: Default Use
mkdir "$TMPDIR/test1" && pushd "$TMPDIR/test1" > /dev/null
Expand Down Expand Up @@ -171,12 +167,15 @@ echo "> Run bcftools_stats on VCF file with exons, apply filters, and fasta refe
--output "stats.txt" \
--exons "../exons.bed.gz" \
--apply_filters "PASS" \
--fasta_reference "../reference.fasta.fai" \
# --fasta_reference "../reference.fasta.fai" \

# NOTE: fasta_reference option not included in testing because of error from bcftools stats.

# checks
assert_file_exists "stats.txt"
assert_file_not_empty "stats.txt"
assert_file_contains "stats.txt" "bcftools stats -E ../exons.bed.gz -f PASS -F ../reference.fasta.fai ../example.vcf"
assert_file_contains "stats.txt" "bcftools stats -E ../exons.bed.gz -f PASS ../example.vcf"
#assert_file_contains "stats.txt" "bcftools stats -E ../exons.bed.gz -f PASS -F ../reference.fasta.fai ../example.vcf"
echo "- test5 succeeded -"

popd > /dev/null
Expand Down Expand Up @@ -270,8 +269,6 @@ echo "- test10 succeeded -"

popd > /dev/null

# Only missing option fasta reference

echo "---- All tests succeeded! ----"
exit 0

Expand Down
32 changes: 0 additions & 32 deletions src/bcftools/bcftools_stats/test_data/example.vcf

This file was deleted.

Empty file.

0 comments on commit bf5827a

Please sign in to comment.