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 only works when files are in working directory #17

Closed lculibrk closed 3 years ago

lculibrk commented 6 years ago

Tigmint was giving some issues with file names before (CentOS 7):

tigmint tigmint draft=supernova_draft/fasta/supernovadraft.1 reads=chromium_data/marmot_nochrombars t=32 bwa mem -t32 -pC supernova_draft/fasta/supernovadraft.1.fa chromium_data/marmot_nochrombars.fq.gz | samtools view -u -F4 | samtools sort -@32 -tBX -T$(mktemp -u -t supernova_draft/fasta/supernovadraft.1.chromium_data/marmot_nochrombars.sortbx.bam.XXXXXX) -o supernova_draft/fasta/supernovadraft.1.chromium_data/marmot_nochrombars.sortbx.bam mktemp: invalid template, ‘supernova_draft/fasta/supernovadraft.1.chromium_data/marmot_nochrombars.sortbx.bam.XXXXXX’, contains directory separator [bwt_restore_bwt] Failed to allocate 18446744073709551576 bytes at bwt.c line 452: Cannot allocate memory [E::hts_open_format] Failed to open file supernova_draft/fasta/supernovadraft.1.chromium_data/marmot_nochrombars.sortbx.bam samtools sort: can't open "supernova_draft/fasta/supernovadraft.1.chromium_data/marmot_nochrombars.sortbx.bam": No such file or directory make: *** [supernova_draft/fasta/supernovadraft.1.chromium_data/marmot_nochrombars.sortbx.bam] Error 1

This was resolved by making a separate directory, symlinking the reads and draft files into the directory and running tigmint from there:

mkdir tigmint_stuff cd tigmint_stuff ln -s ../chromium_data/marmot_nochrombars.fq.gz marmot_basic.fq.gz ln -s ../supernova_draft/fasta/supernovadraft.1.fa supernova1.fa tigmint tigmint draft=supernova1 reads=marmot_basic

Is it possible to support running tigmint where the files are not located within the working directory?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your interest in Tigmint!

mmokrejs commented 2 years ago

Seems lots of users hit this problem (https://github.com/bcgsc/tigmint/issues/35 https://github.com/bcgsc/tigmint/issues/44 https://github.com/bcgsc/tigmint/issues/52 ). The make somehow constructs a Makefile target based on the input filename and if the there directory separators in there, it chokes. Likewise, it chokes when I use shell pipe to feed in a FASTA stream from multiple files:

tigmint-make ... reads=<(cat *.fmlrc2.fa)
make: *** No rule to make target `mygenome-long-scaffs.fa./dev/fd/63.cut500.as0.65.nm500.molecule.size2000.trim0.window1000.spanauto.breaktigs.fa', needed by `tigmint-long'.  Stop.

Maybe a sed call in a proper place could fix that.