bcgsc / tigmint

⛓ Correct misassemblies using linked AND long reads
https://bcgsc.github.io/tigmint/
GNU General Public License v3.0
54 stars 13 forks source link

tigmint-make ignores $PATH and is supposed to be run from unpacked source tree instead #63

Closed mmokrejs closed 2 years ago

mmokrejs commented 2 years ago

Hi, surprisingly it appears one cannot properly install tigmint into system-wide location. Some paths are hardcoded. Why cannot we just rely on $PATH?

sh -c 'gunzip -c foo_PacBio_and_Nanopore.fq.gz | \
/usr/bin/tigmint_estimate_dist.py - -n 1000000 -o foo_PacBio_and_Nanopore.tigmint-long.params.tsv'
samtools faidx foo__abyss_106-long-scaffs.fa

gzip: stdout: Broken pipe
/usr/bin/../src/long-to-linked-pe -l 500 -m2000 -g6.8e9 -s -b foo_PacBio_and_Nanopore.barcode-multiplicity.tsv --bx -t16 --fasta -f foo_PacBio_and_Nanopore.tigmint-long.params.tsv foo_PacBio_and_Nanopore.fq.gz | \
minimap2 -y -t16 -x map-ont --secondary=no foo__abyss_106-long-scaffs.fa - | \
/usr/bin/tigmint_molecule_paf.py -q0 -s2000 -p foo_PacBio_and_Nanopore.tigmint-long.params.tsv - | sort -k1,1 -k2,2n -k3,3n > foo__abyss_106-long-scaffs.foo_PacBio_and_Nanopore.cut500.molecule.size2000.bed
zsh:1: no such file or directory: /usr/bin/../src/long-to-linked-pe
[M::mm_idx_gen::79.608*1.56] collected minimizers
[M::mm_idx_gen::83.467*2.21] sorted minimizers
[M::main::83.468*2.21] loaded/built the index for 3530326 target sequence(s)
[M::mm_mapopt_update::85.100*2.19] mid_occ = 1442
[M::mm_idx_stat] kmer size: 15; skip: 10; is_hpc: 0; #seq: 3530326
[M::mm_idx_stat::86.092*2.17] distinct minimizers: 67761996 (20.86% are singletons); average occurrences: 10.813; average spacing: 5.460

It seems make continues despite an error, because for some reason an extra sh -c is used in the recipe.

mmokrejs commented 2 years ago

The parent script calling tigmint could just export for example:

SCRATCH=/scratch/mmokrejs/job_3024668.foo
TMPDIR=/scratch/mmokrejs/job_3024668.foo
SORT_OPTS='-S 2G'

Please note that sort uses /tmp by default.

lcoombe commented 2 years ago

Hi @mmokrejs,

Yes, the current organization of the Tigmint code uses paths relative to the installation location. If you don't wish to use the path to the github repo for running Tigmint, I recommend using bioconda or brew - we maintain Tigmint in both of those package managers. While I do appreciate the feedback and suggestions in changing the installation of Tigmint, this isn't a priority for our developers. Changing the installation would also require updates to the package manager formulae, and we have a lot of other projects with more pressing work.

For your second comment, that seems more related to your issue https://github.com/bcgsc/tigmint/issues/60 and PR https://github.com/bcgsc/tigmint/pull/64 so perhaps we can discuss there.

Thanks, Lauren

mmokrejs commented 2 years ago

Hi @lcoombe , although I am trying to understand what you say, practically. The first three installation procesdures I not relevant to meant as I want the binaries self-compile and tuned. The section Install Tigmint from the source code in the README simply lacks the installation step. I thought it was by mistake but it is as I see it now not. So we can conclude one cannot install tigmint and one is supposed to run it directly from the compiled source tree dirrectly. I imagine how many package maintainers had to come over thsi repeatedly to only later realzie the hardcoded paths in the files and to be edited by sed as well. I find it frustrating work. Please contact some package maintainers at e.g. Debian and Scientific Linux and some maintainers of you cluster environment. And the setup.py is I think also incomplete.

So the whole report can be solved by documenting that one cannot install tigmint with make install which would also call python's setup.py. Just a simple change to the README.md.