Skip to content

Commit

Permalink
proper testing: comparing using pandas
Browse files Browse the repository at this point in the history
  • Loading branch information
pesho-ivanov committed Jan 27, 2020
1 parent 0c711b5 commit b355473
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ FROM ubuntu:18.04
# install prerequisites
# - build-essential: for make
# - libc-dev: contains argp
# - zlib1g: zlib package
# - python3, python3-pip, pandas: for testing
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
libc-dev \
#zlib1g-dev \
python3 \
python3-pip \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# copy
Expand All @@ -21,6 +22,9 @@ COPY . /astarix
# set working directory
WORKDIR /astarix

RUN pip3 install pandas

# compile and test
RUN make && \
make test

7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,13 @@ test: $(ASTARIXBIN)
# small
$(ASTARIXBIN) align-optimal -t 8 -v 2 -g $(DATADIR)/ecoli_head10000_linear/graph.gfa -q $(DATADIR)/ecoli_head10000_linear/illumina.fq -o $(TMPDIR)/ecoli_head10000_linear/astar-default
$(ASTARIXBIN) align-optimal -a dijkstra -g $(DATADIR)/ecoli_head10000_linear/graph.gfa -q $(DATADIR)/ecoli_head10000_linear/illumina.fq -o $(TMPDIR)/ecoli_head10000_linear/dijkstra-default
#python3 $(TESTSDIR)/compare_profilings.py $(TMPDIR)/ecoli_head10000_linear/astar-default/alignments.tsv $(TMPDIR)/ecoli_head10000_linear/dijkstra-default/alignments.tsv

#$(ASTARIXBIN) align-optimal -g $(DATADIR)/ecoli_head10000_linear/graph.gfa -q $(DATADIR)/illumina.fq -o $(TMPDIR)/ecoli_head10000_linear/astar-default
#$(ASTARIXBIN) align-optimal -a astar-prefix -g $(DATADIR)/ecoli_head10000_linear/graph.gfa -q $(DATADIR)/ecoli_head10000_linear/illumina.fq -D 5 -f 0 -d 10 -c 3 -M 0 -e 0 -S 1 -G 1 -o $(TMPDIR)/ecoli_head10000_linear/astar-custom
python3 $(TESTSDIR)/compare_profilings.py $(TMPDIR)/ecoli_head10000_linear/astar-default/alignments.tsv $(TMPDIR)/ecoli_head10000_linear/dijkstra-default/alignments.tsv

bigtest:
# 10000 reads
$(ASTARIXBIN) align-optimal -t 8 -g $(DATADIR)/ecoli_head1000000_linear/graph.gfa -q $(DATADIR)/ecoli_head1000000_linear/illumina.fq -o $(TMPDIR)/ecoli_head1000000_linear/astar-default
$(ASTARIXBIN) align-optimal -a dijkstra -g $(DATADIR)/ecoli_head1000000_linear/graph.gfa -q $(DATADIR)/ecoli_head1000000_linear/illumina.fq -o $(TMPDIR)/ecoli_head1000000_linear/dijkstra-default
#python3 $(TESTSDIR)/compare_profilings.py $(TMPDIR)/ecoli_head1000000_linear/astar-default/alignments.tsv $(TMPDIR)/ecoli_head1000000_linear/dijkstra-default/alignments.tsv
python3 $(TESTSDIR)/compare_profilings.py $(TMPDIR)/ecoli_head1000000_linear/astar-default/alignments.tsv $(TMPDIR)/ecoli_head1000000_linear/dijkstra-default/alignments.tsv

eval: $(ASTARIXBIN)
$(shell mkdir -p $(TMPDIR))
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ In order to compile AStarix, you will need to first install:

* [argp](https://www.gnu.org/software/libc/manual/html_node/Argp.html) –
argument parsing library
* (optional) [pandas](https://pandas.pydata.org/) – dataframe library used for testing and evalutaions

We show how to install them in the [Dockerfile](./Dockerfile).
Other third-party libraries are located in the `/ext` directory and their own licenses apply.
Expand Down

0 comments on commit b355473

Please sign in to comment.