precisely / bioinformatics

0 stars 0 forks source link

Add code test of real-world Ancestry file #36

Closed taltman closed 6 years ago

taltman commented 6 years ago
  1. Find publicly-available Ancestry file, perhaps looking at the Personal Genomes Project
  2. Add makefile target for downloading the file using wget
  3. Add makefile target called 'test'

The makefile target called 'test' will depend on the makefile target for the Ancestry file. You should download the Ancestry file to a directory called 'test'. You will need to exclude the 'test' directory using '.gitignore'. The recipe for the 'test' makefile target should execute the MAMBA tests.

More on being productive with Make:

Short tutorial on creating reproducible bioinformatic pipelines using Make: https://bsmith89.github.io/make-bml/

Human-readable intro book on Make: https://www.oreilly.com/openbook/make3/book/index.csp

GNU Make Manual (i.e., the kitchen sink): https://www.gnu.org/software/make/manual/

mxscott commented 6 years ago

Makefile is exiting early with error:

Makefile:4: recipe for target 'build-human-genome-ref-db' failed

No such file ‘human_g1k_v37.fasta.gzi’.

make: *** [build-human-genome-ref-db] Error 8'

mxscott commented 6 years ago

If I comment out the targets: build-human-genome-ref-db, install, build-docker-image, my targets will run smoothly.

taltman commented 6 years ago

Then something is wrong. How are you calling make from the command line to run your targets? Please copy it here.

mxscott commented 6 years ago

make install or make test or make

taltman commented 6 years ago

Please commit to a feature branch, and I'll take a look.

mxscott commented 6 years ago

committed to convertAncestry.

taltman commented 6 years ago

Hi Max,

I checked out your feature branch, and I reinstalled the Python package in order to get your latest dependencies on the mamba package. I then ran make test from the top level, with the following output:

cd convert_ancestry && \
mamba convert_ancestryTest.py \
python convert_ancestry.py test/AncestryDNA.txt
/bin/sh: 2: mamba: not found
Makefile:27: recipe for target 'test' failed

First of all, the file convert_ancestryTest.py doesn't exist. It is also unlikely that this recipe could work, as you need to put an additional && at the end of the line starting with mamba before the backslash escape. Then there's the issue of the mamba executable. Can you please try testing this again, fixing any issues, and then commit back to the feature branch? Make special note of any changes you made to the OS or Python environment that is necessary for this code to work. Thanks!

mxscott commented 6 years ago

Hey Tomer, sorry about that. Aneil told me I should rename my files and I missed that line. How should I make note of the OS/Python changes I made? I only added unzip to the Dockerfile in the apt-get section, and I added 'mamba' 'expects', and 'wget' to setup.py

I pushed an updated version just now. It worked when I built a new image from the Dockerfile and ran it in a container of that image. I added instructions to the README that specify exactly how I created the image.

I was able to get "make test" to run correctly, but I haven't set anything up to test the sample output that I generated from the Ancestry.com file I downloaded online so right now it just sits there in /convert_ancestry/test/out-23andme.txt. Unit tests are working though.

Running the test-convert23andme target gives an error so I commented it out to test my targets. I can look into that if you'd like.