Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding tests for xcounts and unxcounts #223

Merged
merged 2 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ EXTRA_DIST = \
test_scripts/test_amrfinder.test \
test_scripts/test_hypermr.test \
test_scripts/test_diff.test \
test_scripts/test_xcounts.test \
test_scripts/test_unxcounts.test \
test_scripts/test_mlml.test

### ADS: Testing with `make check` can be a long process. Testing with
Expand Down Expand Up @@ -126,6 +128,8 @@ TESTS = test_scripts/test_abismalidx.test \
test_scripts/test_amrfinder.test \
test_scripts/test_hypermr.test \
test_scripts/test_diff.test \
test_scripts/test_xcounts.test \
test_scripts/test_unxcounts.test \
test_scripts/test_mlml.test

TEST_EXTENSIONS = .test
Expand All @@ -141,6 +145,8 @@ test_scripts/test_selectsites.log: test_scripts/test_counts.log
test_scripts/test_sym.log: test_scripts/test_counts.log
test_scripts/test_hmr.log: test_scripts/test_sym.log
test_scripts/test_roi.log: test_scripts/test_sym.log
test_scripts/test_xcounts.log: test_scripts/test_counts.log
test_scripts/test_unxcounts.log: test_scripts/test_xcounts.log

noinst_LIBRARIES = libdnmtools.a
libdnmtools_a_SOURCES = \
Expand Down Expand Up @@ -262,4 +268,6 @@ CLEANFILES = \
tests/araTha1_simulated.hypermr \
tests/methylome_ab.diff \
tests/methylome.pmd \
tests/reads.xcounts \
tests/reads.unxcounts \
tests/mlml.out
2 changes: 2 additions & 0 deletions data/md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ d41d8cd98f00b204e9800998ecf8427e tests/two_epialleles.amr
6bbf66748e2a11d5c2736a81efeac270 tests/reads.fmt.sam
f963e689859dcf38a26acda9a65a6431 tests/reads.sam
a751b849e0895b2403f8ddd01b647ae1 tests/reads.fmt.srt.uniq.sam
abb472bdea230af31e0d2b00abb95b02 tests/reads.xcounts
12e0afdca1387b2805cfee0ea2ddcfea tests/reads.unxcounts
15 changes: 15 additions & 0 deletions test_scripts/test_unxcounts.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

infile1=tests/reads.xcounts
infile2=tests/tRex1.fa
outfile=tests/reads.unxcounts
if [[ -e "${infile1}" && -e "${infile2}" ]]; then
./dnmtools unxcounts -c ${infile2} -o ${outfile} ${infile1}
x=$(md5sum -c tests/md5sum.txt | grep "${outfile}:" | cut -d ' ' -f 2)
if [[ "${x}" != "OK" ]]; then
exit 1;
fi
else
echo "unxcounts input file not found; skipping remaining tests";
exit 77;
fi
15 changes: 15 additions & 0 deletions test_scripts/test_xcounts.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

infile1=tests/reads.counts
infile2=tests/tRex1.fa
outfile=tests/reads.xcounts
if [[ -e "${infile1}" && -e "${infile2}" ]]; then
./dnmtools xcounts -c ${infile2} -o ${outfile} ${infile1}
x=$(md5sum -c tests/md5sum.txt | grep "${outfile}:" | cut -d ' ' -f 2)
if [[ "${x}" != "OK" ]]; then
exit 1;
fi
else
echo "xcounts input file(s) not found; skipping test";
exit 77;
fi
Loading