tseemann / nullarbor

:floppy_disk: :page_with_curl: "Reads to report" for public health and clinical microbiology
GNU General Public License v2.0
134 stars 37 forks source link

make: *** No rule to make target 'report'. Stop. #226

Closed cmkobel closed 5 years ago

cmkobel commented 5 years ago

Hello.

I have installed nullarbor2 (version 2.0.20181010) with the conda package (bioconda). When I initialize my pipeline, with nullarbor.pl, and enter my --outdir directory and type make report, I get the following error:

make: *** No rule to make target 'report'. Stop.

When I start the pipeline with the suggested command (nice make -j 4 -l 12 -C test_g_sbatch 2>&1 | tee -a test_g_sbatch/nullarbor.log), it runs OK, but it doesn't produce a report.

I have limited experience with make, and I don't know how to debug this problem. Does anybody have a suggestion of how I should proceed?

Thanks, Carl.

tseemann commented 5 years ago

I don't think make report works anymore (it was nullarbor v1) - just make is enough for v2. I will make a new issue: https://github.com/tseemann/nullarbor/issues/227

In terms of the correct command you ran: What is at the end of nullarbor.log file?

cmkobel commented 5 years ago

The last 50 lines (5620 - 5669) of the nullarbor.log file produces the following:

[22:56:33] Running: /home/cmkobel/miniconda3/envs/nullarbor2/bin/snippy-vcf_extract_subs snps.filt.vcf > snps.subs.vcf 2>> snps.log
[22:56:33] Running: bcftools convert -Oz -o snps.vcf.gz snps.vcf 2>> snps.log
[22:56:33] Running: bcftools index -f snps.vcf.gz 2>> snps.log
[22:56:33] Running: bcftools consensus -f reference/ref.fa -o snps.consensus.fa snps.vcf.gz 2>> snps.log
[22:56:33] Running: bcftools convert -Oz -o snps.subs.vcf.gz snps.subs.vcf 2>> snps.log
[22:56:33] Running: bcftools index -f snps.subs.vcf.gz 2>> snps.log
[22:56:33] Running: bcftools consensus -f reference/ref.fa -o snps.consensus.subs.fa snps.subs.vcf.gz 2>> snps.log
‘190621_HK_1819/snippy/snps.tab’ -> ‘190621_HK_1819/snps.tab’
‘190621_HK_1819/snippy/snps.aligned.fa’ -> ‘190621_HK_1819/snps.aligned.fa’
‘190621_HK_1819/snippy/snps.raw.vcf’ -> ‘190621_HK_1819/snps.raw.vcf’
‘190621_HK_1819/snippy/snps.vcf’ -> ‘190621_HK_1819/snps.vcf’
‘190621_HK_1819/snippy/snps.bam’ -> ‘190621_HK_1819/snps.bam’
‘190621_HK_1819/snippy/snps.bam.bai’ -> ‘190621_HK_1819/snps.bam.bai’
‘190621_HK_1819/snippy/snps.log’ -> ‘190621_HK_1819/snps.log’
[22:56:33] Running: rm -f snps.subs.vcf.gz snps.subs.vcf.gz.csi snps.subs.vcf.gz.tbi 2>> snps.log
[22:56:33] Generating reference aligned/masked FASTA relative to reference: snps.aligned.fa
[22:56:38] Marked 140 heterozygous sites with 'n'
[22:56:38] Creating extra output files: BED GFF CSV TXT HTML
[22:56:38] Identified 2232 variants.
[22:56:38] Result folder: 190621_HK_1932/snippy
[22:56:38] Result files:
[22:56:38] * 190621_HK_1932/snippy/snps.aligned.fa
[22:56:38] * 190621_HK_1932/snippy/snps.bam
[22:56:38] * 190621_HK_1932/snippy/snps.bam.bai
[22:56:38] * 190621_HK_1932/snippy/snps.bed
[22:56:38] * 190621_HK_1932/snippy/snps.consensus.fa
[22:56:38] * 190621_HK_1932/snippy/snps.consensus.subs.fa
[22:56:38] * 190621_HK_1932/snippy/snps.csv
[22:56:38] * 190621_HK_1932/snippy/snps.filt.vcf
[22:56:38] * 190621_HK_1932/snippy/snps.gff
[22:56:38] * 190621_HK_1932/snippy/snps.html
[22:56:38] * 190621_HK_1932/snippy/snps.log
[22:56:38] * 190621_HK_1932/snippy/snps.raw.vcf
[22:56:38] * 190621_HK_1932/snippy/snps.subs.vcf
[22:56:38] * 190621_HK_1932/snippy/snps.tab
[22:56:38] * 190621_HK_1932/snippy/snps.txt
[22:56:38] * 190621_HK_1932/snippy/snps.vcf
[22:56:38] * 190621_HK_1932/snippy/snps.vcf.gz
[22:56:38] * 190621_HK_1932/snippy/snps.vcf.gz.csi
[22:56:38] Walltime used: 2 minutes, 13 seconds
[22:56:38] Have a suggestion? Tell me at https://github.com/tseemann/snippy/issues
[22:56:38] Done.
‘190621_HK_1932/snippy/snps.tab’ -> ‘190621_HK_1932/snps.tab’
‘190621_HK_1932/snippy/snps.aligned.fa’ -> ‘190621_HK_1932/snps.aligned.fa’
‘190621_HK_1932/snippy/snps.raw.vcf’ -> ‘190621_HK_1932/snps.raw.vcf’
‘190621_HK_1932/snippy/snps.vcf’ -> ‘190621_HK_1932/snps.vcf’
‘190621_HK_1932/snippy/snps.bam’ -> ‘190621_HK_1932/snps.bam’
‘190621_HK_1932/snippy/snps.bam.bai’ -> ‘190621_HK_1932/snps.bam.bai’
‘190621_HK_1932/snippy/snps.log’ -> ‘190621_HK_1932/snps.log’
make: Leaving directory '/faststorage/project/ClinicalMicrobio/nullarbor2/test_h_jdk'

I still don't see a report in the output directory.

I tried typing make publish, and looked in the PUBLISH_DIR, but to no avail. make publish ends on the following lines:

...
This is snippy-core 4.4.0
Obtained from http://github.com/tseemann/snippy
Enabling bundled tools.
Found any2fasta - /home/cmkobel/miniconda3/envs/nullarbor2/binaries/noarch/any2fasta
Found samtools - /home/cmkobel/miniconda3/envs/nullarbor2/bin/samtools
Found minimap2 - /home/cmkobel/miniconda3/envs/nullarbor2/bin/minimap2
Found bedtools - /home/cmkobel/miniconda3/envs/nullarbor2/bin/bedtools
Found snp-sites - /home/cmkobel/miniconda3/envs/nullarbor2/bin/snp-sites
Saving reference FASTA: core.ref.fa
This is any2fasta 0.4.2
Opening 'ref.fa'
Detected FASTA format
Read 39467 lines from 'ref.fa'
Wrote 1 sequences from FASTA file.
Processed 1 files.
Done.
Loaded 1 sequences totalling 2367908 bp.
Will mask 0 regions totalling 0 bp ~ 0.00%
ERROR: Could not find .aligned.fa/.vcf in 190621_HK_1822
make: *** [Makefile:105: core.aln] Error 2

-Carl

tseemann commented 5 years ago

Carl (@cmkobel)

I might need to see the whole nullarbor.log to understand where it is failing. Could you email it to me?

Before you do that though, you may want to first delete any zero-length files and try running again.

find /faststorage/project/ClinicalMicrobio/nullarbor2/test_h_jdk -size 0 -delete -print
cmkobel commented 5 years ago

No zero length files are present, so I will email the log immediately.

tseemann commented 5 years ago

The problem turns out to be a bug in conda where kraken2 classify overwrites kraken classify so if you use kraken v1 it fails.

cmkobel commented 4 years ago

The problem turns out to be a bug in conda where kraken2 classify overwrites kraken classify so if you use kraken v1 it fails.

How can I disable kraken v1 ?

tseemann commented 4 years ago

The default is kraken2 anyway:

  --taxoner NAME         Species ID tool to use: centrifuge kraken kraken2 (kraken2)

Please upgrade to latest version 2019XXXX. It is in bioconda, and the kraken problem has been resolved in biocodna too.

cmkobel commented 4 years ago

That is weird - I just updated today. This then suggests that the problem is not related to kraken?

tseemann commented 4 years ago

You haven't provided any actual errors associated with your new setup. What does nullarbor.pl --version and nullarbor.pl --check say? What is in nullarbor.log? Are you in a separate conda environment? You still need to install allt he databases even if you don't use them. Did you follow all these Instructions? https://github.com/tseemann/nullarbor#installation

cmkobel commented 4 years ago

Solved: Long story short: I had nullarbor installed in the conda base environment as well as in a specific environment. By cleaning up my conda setup, everything started working just fine.

tseemann commented 4 years ago

Most conda envs are messed up :-) Nuking and starting fresh solves most problems. Thanks for updating me!

com31 commented 4 years ago

Solved: Long story short: I had nullarbor installed in the conda base environment as well as in a specific environment. By cleaning up my conda setup, everything started working just fine.

Hi Carl How did you clean up the conda envs. I have nullarbor installed in a separate environment and I am getting the same error. I have no zero length file. Please suggest a way out.

cmkobel commented 4 years ago

Hi Carl How did you clean up the conda envs. I have nullarbor installed in a separate environment and I am getting the same error. I have no zero length file. Please suggest a way out.

I had an installation in my base environment that I removed with: conda remove -n base nullarbor https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#removing-packages

I also had an installation of nullarbor in an environment called 'nullarbor' I removed it with: conda remove --name nullarbor --all https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#removing-an-environment

Good luck

tseemann commented 4 years ago

@com31 you may need to reinstall conda completely if you installed it > 1 year ago. Many things have changed. However, conda update --all may solve it. All need to ensure you channel order is correct (changed at end of 2018): https://bioconda.github.io/user/install.html

com31 commented 4 years ago

Thank you Carl. Thank you tseemann. Problem is resolved for now. Nullarbor is working.