khyox / recentrifuge

Recentrifuge: robust comparative analysis and contamination removal for metagenomics
http://www.recentrifuge.org
Other
86 stars 7 forks source link

Test files? #7

Closed sminot closed 6 years ago

sminot commented 6 years ago

Are there any test files that I can use to check if my installation is working? I tried using the files in the test/ folder, but I got an error.

Command:

./recentrifuge.py -f test/ctrl1.mck -f test/ctrl2.mck -f test/ctrl3.mck -f test/smpl1.mck -f test/smpl2.mck -f test/smpl3.mck 

Output:


=-= ./recentrifuge.py =-= v0.21.1 - Sep 2018 =-= by Jose Manuel Martí =-=

Loading NCBI nodes... OK! 
Loading NCBI names... OK! 
Building dict of parent to children taxa... OK! 

Please, wait, processing files in parallel...

Error parsing line: (# Homo sapiens
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (9606   600
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (# Cutibacterium acnes
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (1747   250
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (# E. coli
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (562    50
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (# Zea mays
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (4577   25
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (# Triticum aestivum
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (4565   3
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (# Malassezia globosa CBS 7966
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (425265 25
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (# Pan troglodytes (chimpanzee) 
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (9598   25
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (# Propionibacterium phage SKKY
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (1655020    15
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (# Methanosarcina mazei
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (2209   5
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (# Lactobacillus (genus)
) in test/ctrl1.mck. Ignoring line!
Error parsing line: (1578   2
) in test/ctrl1.mck. Ignoring line!
Warning! test/ctrl1.mck seems truncated!
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/Users/sminot/Documents/GitHub/recentrifuge/recentrifuge/taxclass.py", line 74, in process_output
    log, stat, counts, scores = read_method(target_file, scoring, minscore)
  File "/Users/sminot/Documents/GitHub/recentrifuge/recentrifuge/centrifuge.py", line 127, in read_output
    + f'Cannot read any sequence from"{output_file}"')
Exception: 
ERROR! Cannot read any sequence from"test/ctrl1.mck"
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "./recentrifuge.py", line 671, in <module>
    main()
  File "./recentrifuge.py", line 644, in main
    read_samples()
  File "./recentrifuge.py", line 373, in read_samples
    input_files, [r.get() for r in async_results]):
  File "./recentrifuge.py", line 373, in <listcomp>
    input_files, [r.get() for r in async_results]):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 608, in get
    raise self._value
Exception: 
ERROR! Cannot read any sequence from"test/ctrl1.mck"

These are probably just the wrong files to use. Can you provide an example command to process the test files in your installation documentation? Thanks!

khyox commented 6 years ago

Hi Sam. Yes, you guessed absolutely right, those '*.mck' files need an extra step (parsing by 'remock'). There are detailed test instructions in the testing page of the wiki. Anyway, I have just added a link to the test instructions on the installation page.

In short, you can do something like:

~/recentrifuge/remock.py -x ~/recentrifuge/test/mock.xlsx -r 35 -g
cd ~/recentrifuge/test
~/recentrifuge/recentrifuge.py -f . -o myTEST.rcf.html -c 3 -y 35 -m 5 -g

To validate the test, please, check the validation section in the testing page.

Please feel free to comment on any other issue or concern. Thanks!

sminot commented 6 years ago

Thanks!