Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

circlator test fails at merge step #169

Open
davidjstudholme opened this issue Sep 1, 2020 · 3 comments
Open

circlator test fails at merge step #169

davidjstudholme opened this issue Sep 1, 2020 · 3 comments

Comments

@davidjstudholme
Copy link

When I run circlator circlator test_output, I get error messages at the merge step. It seems to be a problem with running nucmer:

Made output directory. Copying test data files into it:
    copied test_contigs.fa
    copied test_reads.fq.gz

Running Circlator with:
/usr/bin/circlator all --threads 1 --verbose --assemble_spades_use_first test_contigs.fa test_reads.fq.gz OUT

_________________________ Checking external programs __________________________
Circlator version: 1.5.5

External dependencies:
bwa	0.7.17	/usr/bin/bwa
canu	1.6	/usr/bin/canu
nucmer	3.1	/usr/bin/nucmer
prodigal	2.6.3	/usr/bin/prodigal
samtools	1.7	/usr/bin/samtools
WARNING: SPAdes version 3.11.1 is being used. It will work, but better results are usually obtained from Circlator using SPAdes version 3.7.1. Although 3.7.1 is not the latest version, we recommend it for Circlator.
spades	3.11.1	/usr/bin/spades.py

Python version:
3.6.9 (default, Jul 17 2020, 12:50:27) 
[GCC 8.4.0]

Python dependencies:
openpyxl	3.0.5	/home/djs217/.local/lib/python3.6/site-packages/openpyxl/__init__.py
pyfastaq	3.17.0	/home/djs217/.local/lib/python3.6/site-packages/pyfastaq/__init__.py
pymummer	0.11.0	/home/djs217/.local/lib/python3.6/site-packages/pymummer/__init__.py
pysam	0.16.0.1	/home/djs217/.local/lib/python3.6/site-packages/pysam/__init__.py
WARNING: SPAdes version 3.11.1 is being used. It will work, but better results are usually obtained from Circlator using SPAdes version 3.7.1. Although 3.7.1 is not the latest version, we recommend it for Circlator.
______________________________ Running mapreads _______________________________
samtools	1.7	/usr/bin/samtools
bwa	0.7.17	/usr/bin/bwa
syscall: bwa index -p 01.mapreads.bam.tmp.bwa_index 00.input_assembly.fasta
syscall: bwa mem -x pacbio -t 1 01.mapreads.bam.tmp.bwa_index /mnt/bio-surimi-data/projects-djs217/milan_kojic_inversion/circlator/test_out/test_reads.fq.gz | samtools view -F 0x0800 -T 00.input_assembly.fasta -b -o 01.mapreads.bam.tmp.unsorted.bam -
syscall: samtools sort -@ 1 -m 500M 01.mapreads.bam.tmp.unsorted.bam -o 01.mapreads.bam
syscall: samtools index 01.mapreads.bam
______________________________ Running bam2reads ______________________________
Getting reads from BAM file /mnt/bio-surimi-data/projects-djs217/milan_kojic_inversion/circlator/test_out/OUT/01.mapreads.bam
Getting all reads that map to ends of contig 1:150000-299500. Coords: 1-50000;99502-149501
Getting all reads that map to ends of contig 1:500-148000. Coords: 1-50000;97502-147501
Getting all unmapped reads
Finished getting reads.
Log file: /mnt/bio-surimi-data/projects-djs217/milan_kojic_inversion/circlator/test_out/OUT/02.bam2reads.log
Reads file: /mnt/bio-surimi-data/projects-djs217/milan_kojic_inversion/circlator/test_out/OUT/02.bam2reads.fasta
______________________________ Running assemble _______________________________
samtools	1.7	/usr/bin/samtools
WARNING: SPAdes version 3.11.1 is being used. It will work, but better results are usually obtained from Circlator using SPAdes version 3.7.1. Although 3.7.1 is not the latest version, we recommend it for Circlator.
spades	3.11.1	/usr/bin/spades.py
syscall: spades.py -s /mnt/bio-surimi-data/projects-djs217/milan_kojic_inversion/circlator/test_out/OUT/02.bam2reads.fasta -o /mnt/bio-surimi-data/projects-djs217/milan_kojic_inversion/circlator/test_out/OUT/03.assemble.tmp.spades.127.yfq6lkuh -t 1 -k 127 --careful --only-assembler
syscall: samtools faidx /mnt/bio-surimi-data/projects-djs217/milan_kojic_inversion/circlator/test_out/OUT/03.assemble.tmp.spades.127.yfq6lkuh/contigs.fasta
[assemble]	kmer	N50
[assemble]	127	101998
[assemble] using assembly with kmer 127
________________________________ Running merge ________________________________
Running command: bash run_nucmer.sh
The following command failed with exit code 255
bash run_nucmer.sh

The output was:

ERROR: The following critical files could not be used
p.delta
p.mgaps
p.ntref
Check your paths and file permissions and try again
ERROR: Could not parse delta file, p.delta
error no: 400
ERROR: Could not parse delta file, p.delta.filter
error no: 402

Traceback (most recent call last):
  File "/home/djs217/.local/lib/python3.6/site-packages/pymummer/syscall.py", line 20, in run
    output = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
  File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'bash run_nucmer.sh' returned non-zero exit status 255.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/circlator", line 58, in <module>
    exec('circlator.tasks.' + task + '.run()')
  File "<string>", line 1, in <module>
  File "/home/djs217/.local/lib/python3.6/site-packages/circlator/tasks/all.py", line 212, in run
    m.run()
  File "/home/djs217/.local/lib/python3.6/site-packages/circlator/merge.py", line 813, in run
    self.original_fasta, nucmer_coords_file, act_script = self._iterative_bridged_contig_pair_merge(self.outprefix + '.merge')
  File "/home/djs217/.local/lib/python3.6/site-packages/circlator/merge.py", line 681, in _iterative_bridged_contig_pair_merge
    self._run_nucmer(genome_fasta, self.reassembly.contigs_fasta, nucmer_coords)
  File "/home/djs217/.local/lib/python3.6/site-packages/circlator/merge.py", line 85, in _run_nucmer
    n.run()
  File "/home/djs217/.local/lib/python3.6/site-packages/pymummer/nucmer.py", line 144, in run
    syscall.run('bash ' + script, verbose=self.verbose)
  File "/home/djs217/.local/lib/python3.6/site-packages/pymummer/syscall.py", line 26, in run
    raise Error('Error running command:', cmd)
pymummer.syscall.Error: ('Error running command:', 'bash run_nucmer.sh')

Something went wrong. See above for error message(s). Return code was 1```


Any ideas what went wrong and how to remedy it?
@Nifaste
Copy link

Nifaste commented Sep 6, 2021

@davidjstudholme I have the same issue, did you managed to solved it ?

@davidjstudholme
Copy link
Author

No, I don't recall seeing anything about this since I reported the issue.

@AndrewCBarnes
Copy link

I fixed this by downgrading mummer. Build 12 introduces a bug that directs to an incorrect location for perl. You need to install build mummer=3.23=h6de7cb9_11. Hope this works for you. If you are running circlator in conda, just activate the conda environment containing circlator and
conda install mummer=3.23=h6de7cb9_11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants