simoncchu / REPdenovo

A tool to construct repeats directly from raw reads
MIT License
16 stars 3 forks source link

"_PATHs" on the configuration file #13

Open machadodj opened 5 years ago

machadodj commented 5 years ago

This is a report of issues with the variable ending in "_PATH" on the configuration file (with a fix).

The configuration file for REPdenovo's main.py take several paths to different applications and directories (BWA_PATH, SAMTOOLS_PATH, JELLYFISH_PATH, VELVET_PATH, REFINER_PATH, CONTIGS_MERGER_PATH, and OUTPUT_FOLDER). I had multiple issues setting incomplete paths or using the GLOBAL option for some of them. The best approach seems to be giving complete paths to each of those variables. However, the fact that some have to point to specific files (BWA_PATH, SAMTOOLS_PATH, REFINER_PATH, and CONTIGS_MERGER_PATH) while the others have to point towards directories is confusing.

I am reporting this as an issue because it's not well described on the program's documentation and I hope it might help other users. The fix is simple, simply add the file when setting BWA_PATH, SAMTOOLS_PATH, REFINER_PATH, and CONTIGS_MERGER_PATH but leave other paths pointing just to the directories that contain the files of interest. I suggest adding a comment on the program's documentation and perhaps make these variables follow the same pattern (pointing towards directories, not files) on future versions.

Here is a template for the configuration file when no variables are set to GLOBAL:

MIN_REPEAT_FREQ 10
RANGE_ASM_FREQ_DEC 2
RANGE_ASM_FREQ_GAP 0.8
K_MIN 30
K_MAX 50
K_INC 10
K_DFT 30
READ_LENGTH 250
GENOME_LENGTH 1956000000
MIN_CONTIG_LENGTH 249
ASM_NODE_LENGTH_OFFSET -1
IS_DUPLICATE_REPEATS 0.85
COV_DIFF_CUTOFF 0.5
MIN_SUPPORT_PAIRS 20
MIN_FULLY_MAP_RATIO 0.2
TR_SIMILARITY 0.85
TREADS 8
BWA_PATH /my/home/bwa-0.7.17/gnu/bwa
SAMTOOLS_PATH /my/home/samtools/1.3.1/bin/samtools
JELLYFISH_PATH /my/home/jellyfish-2.2.6/bin/
VELVET_PATH /my/home/velvet-1.2.10/bin/
REFINER_PATH /my/home/repdenovo-0.0/TERefiner_1
CONTIGS_MERGER_PATH /my/home/repdenovo-0.0/ContigsMerger
OUTPUT_FOLDER /my/home/output_dir
VERBOSE 1
jorisbertrand commented 5 years ago

I may have something similar. In my configuration file I set 'VELVET_PATH' to 'GLOBAL', checked that the program is installed by typing 'velveth -h' in the terminal but while running REPdenovo, I got the following error message: 'AssertionError: velveth is not installed, or given the wrong path in configuration file!!!'

simoncchu commented 5 years ago

Thank you a lot @machadodj and @jorisbertrand for the suggestions. I am trying to release a new version with improvements in installation and project description. I will keep this issue open for now.