metaDMG-dev/metaDMG-core

--metaDMG-cpp location?

Opened this issue · 2 comments

Hi all,

I installed metaDMG with the recommended conda installation remotely on linux (and some suggested tweaks from past issues on the page), environment file:

name: metaDMG
channels:
 - conda-forge
 - bioconda
 - defaults
dependencies:
 - python==3.9
 - pip
 - pip:
   - metaDMG[all]
   - logger-tt==1.7.0
 - htslib==1.15
 - cxx-compiler
 - c-compiler
 - eigen
 - gcc_linux-64
 - samtools

It initially seemed to work. However, when running metaDMG config, I need to specify a --metaDMG-cpp to point to the location of this file. It doesn't seem to exist in the conda environment (find /my/conda/env/location -maxdepth 6 -type f -name "*ccp" returns no hits).

Do I need to separately install and build metaDMG-cpp from the sister github page? This feels counterintuitive, given the metaDMG cli is working on my end already.

Here's the command I ran:

 metaDMG config ../S30455.Y1.E1.L1.nohuman.fastq.subgenomesaa.fna.e2e.bam \
>     --names ../ncbi_taxonomy/names.dmp \
>     --nodes ../ncbi_taxonomy/nodes.dmp \
>     --acc2tax ../ncbi_taxonomy/nucl_wgs.accession2taxid.gz \
>     --custom-database \
>     --bayesian 

And the error:

Usage: metaDMG config [OPTIONS] SAMPLES...
Try 'metaDMG config --help' for help.
╭─ Error 
│ Invalid value for '--metaDMG-cpp' / '-m': The file metaDMG-cpp does not exists.                                                                 │

Thanks in advance,
Carly

I have the same issue - can the authors please advice?!

Hi everyone,
I have faced the same issue and it seems that part of it can be solved by compiling metaDMG-cpp, which can be found here:
Now, I say "part of it" because metaDMG version 0.38.0 (installed using pip install "metaDMG[fit]") calls metaDMG-cpp as so:

</path/to>/metaDMG-cpp getdamage --minlength 10 --printlength 15 --threads 8 --runmode 1 --outname <somename> <BAM_file>

but, then the error is that:

[2024-08-28 16:41:40] | metaDMG.fit.serial:273 | DEBUG | <sample_prefix>alignment | getdamage: unrecognized option '--minlength'
[2024-08-28 16:41:40] | metaDMG.fit.serial:273 | DEBUG | <sample_prefix>alignment | Never here: (null)
[2024-08-28 16:41:40] | metaDMG.fit.serial:273 | DEBUG | <sample_prefix>alignment | getdamage: unrecognized option '--printlength'
[2024-08-28 16:41:40] | metaDMG.fit.serial:273 | DEBUG | <sample_prefix>alignment | Never here: (null)
[2024-08-28 16:41:40] | metaDMG.fit.serial:273 | DEBUG | <sample_prefix>alignment | getdamage: unrecognized option '--runmode'
[2024-08-28 16:41:40] | metaDMG.fit.serial:273 | DEBUG | <sample_prefix>alignment | Never here: (null)
[2024-08-28 16:41:40] | metaDMG.fit.serial:273 | DEBUG | <sample_prefix>alignment | getdamage: unrecognized option '--outname'

Indeed, in the latest version of metaDMG-cpp, the help for the getdamage module invites for different arguments, which seem to include undescores:

$ ./metaDMG-cpp getdamage --help
	-> metaDMG version: v0.4-94-gc110946 (htslib: 1.17-28-ge13611a9) build(Aug 27 2024 11:30:14)
	-> ./metaDMG-cpp getdamage --help 

Usage: metadamage getdamage [options] <in.bam>|<in.sam>|<in.cram>

Example: ./metaDMG-cpp getdamage -l 10 -p 5 --threads 8 ../data/subs.sam
Options:
  -n/--threads		 number of threads used for reading/writing (default: 4)
  -f/--fasta		 reference genome (required with CRAM)
  -l/--min_length	 minimum read length (default: 35)
  -p/--print_length	 number of base pairs from read termini to estimate damage (default: 5)
  -r/--run_mode		 0: global estimate (default)
			 1: damage patterns will be calculated for each chr/scaffold contig
  -i/--ignore_errors	 continue analyses even if there are errors.
  -o/--out_prefix	 output prefix (default: meta)

I'll check whether the latest version of metaDMG would in fact fit an earlier version of metaDMG-cpp, or vice-versa, and maybe attempt editing the C code to recognize the arguments, but I would prefer not to hack my way towards an erratic behaviour of the tool.

If the developers could advise, that'd be helpful :)
Thanks!