Closed EricDeveaud closed 1 year ago
Are you able to take a look at /opt/gensoft/exe/ConFindr/0.7.4/share/Escherichia_db.fasta to confirm that the file hasn't been corrupted (or something else is wrong with it)? BACT000001_10671 is the first entry in the file, and should be 1674 bp long.
Also, just to confirm, you do have the credentials required to download the rMLST databases as mentioned in the docs?
hummmm
rpm_maker:ConFindr/ConFindr-0.7.4 > head -n 3 /opt/gensoft/exe/ConFindr/0.7.4/share/Escherichia_db.fasta
>BACT000001_10671
b'ATGACTGAATCTTTTGCTCAACTCTTTGAAGAGTCCTTAAAAGAAATCGAAACCCGCC
CGGGTTCTATCGTTCGTGGCGTTGTTGTTGCTATCGACAAAGATGTAGTACTGGTTGACG
where does b'
come from ?
yes RMLST already downloaded and available in CONFINDR_DB
rpm_maker:ConFindr/ConFindr-0.7.4 > ls $CONFINDR_DB
Escherichia_db.fasta Listeria_db_cgderived.fasta
Escherichia_db_cgderived.fasta Salmonella_db_cgderived.fasta
Escherichia_db_cgderived.fasta.fai download_date.txt
Escherichia_db_cgderived_kma.comp.b gene_allele.txt
Escherichia_db_cgderived_kma.length.b profiles.txt
Escherichia_db_cgderived_kma.name rMLST_combined.fasta
Escherichia_db_cgderived_kma.seq.b refseq.msh
Bytes. I wonder if the encoding has changed by default in one of the downloading or formatting libraries used to create those files.
Can you check rMLST_combined.fasta to see if it is also in bytes?
yes bytes in python, but they should not appear in fasta files I'll try to check who's guilty. we can already skip downloading as original files are OK
yes rMLST_combined.fasta
is also in bytes repr
which version of Python//Biopython are you using ?
here Python/3.8.1
// biopython-1.79
trying right now with biopython-1.78
Yes.... now I know why this sounded familiar. I believe that issue #27 is related.
yes I already have patched line 209 of database_setup.py
with biopython-1.78 no trouble
head -n 3 /opt/gensoft/exe/ConFindr/0.7.4/share/rMLST_combined.fasta
>BACT000001_1
ATGGAAAATTTTGCTCAGCTGTTGGAAGAAAGCTTTACCCTGCAAGAAATGAACCCGGGT
GAGGTGATTACCGCTGAAGTAGTGGCAATCGACCAAAACTTCGTTACCGTAAACGCAGGT
waiting for Escherichia_db.fasta to be generated
Escherichia_db.fasta OK too
confindr.py -i example-data -o example-out --rmlst
also ran successfully
Hi, I'm getting a similar error message as Eric when running
db="path_to_confindr_db"
confindr.py -i confindr_test -o out_test -d $db --rmlst -t 10 -Xmx 4g
Error message:
Traceback (most recent call last):
File "/home/schlae0003/st0001/mambaforge/envs/confindr/lib/python3.7/site-packages/confindr_src/confindr.py", line 1067, in confindr
fasta=args.fasta)
File "/home/schlae0003/st0001/mambaforge/envs/confindr/lib/python3.7/site-packages/confindr_src/confindr.py", line 638, in find_contamination
returncmd=True)
File "/home/schlae0003/st0001/mambaforge/envs/confindr/lib/python3.7/site-packages/confindr_src/wrappers/bbtools.py", line 258, in bbduk_bait
out, err = run_subprocess(cmd)
File "/home/schlae0003/st0001/mambaforge/envs/confindr/lib/python3.7/site-packages/confindr_src/wrappers/bbtools.py", line 16, in run_subprocess
raise subprocess.CalledProcessError(x.returncode, cmd=command)
subprocess.CalledProcessError: Command 'bbduk.sh in=confindr_test/F207_R1.fastq.gz in2=confindr_test/F207_R2.fastq.gz outm=out_test/F207/rmlst_R1.fastq.gz outm2=out_test/F207/rmlst_R2.fastq.gz ref=/home/schlae0003/GROUP/taxanomy_databases/confindr_db/rMLST_combined.fasta threads=10 Xmx=4g' returned non-zero exit status 1.
However the confindr_log.txt
says:
Command used: mash screen /home/schlae0003/GROUP/taxanomy_databases/confindr_db/refseq.msh confindr_test/F207_R1.fastq.gz confindr_test/F207_R2.fastq.gz -p 10 -w -i 0.85 | sort -gr > out_test/F207/screen.tab
STDERR: Loading /home/schlae0003/GROUP/taxanomy_databases/confindr_db/refseq.msh...
1023303 distinct hashes.
Streaming from 2 inputs...
Estimated distinct k-mers in mixture: 59041145
Summing shared...
Reallocating to winners...
Computing coverage medians...
Writing output...
refseq.msh
seems to be a binary file in my case...
I'm using confindr 0.7.4, mash 2.3 and BBMap 38.45
My confindr_db looks like this
download_date.txt
gene_allele.txt
profiles.txt
rMLST_combined.fasta
Escherichia_db_cgderived.fasta
Listeria_db_cgderived.fasta
refseq.msh
Salmonella_db_cgderived.fasta
Thanks, Lea
I believe refseq.msh
should be a binary file.
What versions of BioPython and Python are you using?
Can you run the BBduk command separately to see if there's any useful output? bbduk.sh in=confindr_test/F207_R1.fastq.gz in2=confindr_test/F207_R2.fastq.gz outm=out_test/F207/rmlst_R1.fastq.gz outm2=out_test/F207/rmlst_R2.fastq.gz ref=/home/schlae0003/GROUP/taxanomy_databases/confindr_db/rMLST_combined.fasta threads=10 Xmx=4g
Thanks, A
I'm using Python=3.7 and BioPython=1.78
When running the BBduk command separately, I realised that there was a memory issue. Normally this would give me a core dump or "out of memory" message on the cluster, but for some reason it didn't... I was able to fix the problem by going overboard with memory:threads=2 Xmx=64g
(I'm working with bacteria, fastq.gz files around 500M). Now confindr also runs without errors.
Thanks!!!
hummmm
rpm_maker:ConFindr/ConFindr-0.7.4 > head -n 3 /opt/gensoft/exe/ConFindr/0.7.4/share/Escherichia_db.fasta >BACT000001_10671 b'ATGACTGAATCTTTTGCTCAACTCTTTGAAGAGTCCTTAAAAGAAATCGAAACCCGCC CGGGTTCTATCGTTCGTGGCGTTGTTGTTGCTATCGACAAAGATGTAGTACTGGTTGACG
where does
b'
come from ?
Fixed by 19d0d1d in v0.8.1.
Hello while running the example test set with bbtoos version 38.01 with --rmlst (dunno if this make sense or not) option on I had the follwoing error message
tested with bbtools version bbmap/37.78 bbmap/38.91
that was due to
regards
Eric