OLC-Bioinformatics / ConFindr

Intra-species bacterial contamination detection
https://olc-bioinformatics.github.io/ConFindr/
MIT License
22 stars 8 forks source link

Keep running when rmlst.fasta is empty #17

Closed duceppemo closed 1 year ago

duceppemo commented 4 years ago

2019-10-15 11:55:36 Beginning analysis of sample SRR1371311... 2019-10-15 11:55:36 Checking for cross-species contamination... 2019-10-15 11:55:57 Extracting conserved core genes... 2019-10-15 11:56:04 Quality trimming... 2019-10-15 11:56:06 Detecting contamination... Traceback (most recent call last): File "/home/bioinfo/miniconda3/envs/confindr/bin/confindr.py", line 11, in <module> load_entry_point('confindr==0.7.0', 'console_scripts', 'confindr.py')() File "/home/bioinfo/miniconda3/envs/confindr/lib/python3.6/site-packages/confindr_src/confindr.py", line 1150, in main confindr(args) File "/home/bioinfo/miniconda3/envs/confindr/lib/python3.6/site-packages/confindr_src/confindr.py", line 975, in confindr use_rmlst=args.rmlst) File "/home/bioinfo/miniconda3/envs/confindr/lib/python3.6/site-packages/confindr_src/confindr.py", line 699, in find_contamination pysam.faidx(os.path.join(sample_tmp_dir, 'rmlst.fasta')) File "/home/bioinfo/miniconda3/envs/confindr/lib/python3.6/site-packages/pysam/utils.py", line 75, in __call__ stderr)) pysam.utils.SamtoolsError: 'samtools returned with error 1: stdout=, stderr=[faidx] Could not build fai index /media/30tb_raid10/data/brucella/raw_reads/sra_2019-09-20_confindr/SRR1371311/rmlst.fasta.fai\n' Is it possible to change the program so it continues to the next sample when the rmlst.fasta file is empty? Also maybe add something about it in the report? Love the tool btw!

adamkoziol commented 3 years ago

I've updated ConFindr to 0.7.3 on bioconda, and I think the new version addresses your issue.