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

Blobtools add --cov error. #180

Open
COCOJJLEE opened this issue Jul 25, 2023 · 1 comment
Open

Blobtools add --cov error. #180

COCOJJLEE opened this issue Jul 25, 2023 · 1 comment

Comments

@COCOJJLEE
Copy link

COCOJJLEE commented Jul 25, 2023

Environment:
Centos7
Python = 3.9.13
blobtoolkit = 4.1.4

Input data processing:
pacbio hifi read
minimap2 -ax asm20 ${organism}.asm.p_ctg.fa ${organism}.cutadapt.output.fastq > ${organism}.sam
samtools view -Sb ${organism}.sam > ${organism}.bam
samtools sort ${organism}.bam > ${organism}.sort.bam
samtools index ${organism}.sort.bam

Error command:
blobtools add --cov ${organism}.sort.bam BlobDir/

Error message:
Traceback (most recent call last):
File "/home/.conda/envs/blobtools/bin/blobtools", line 8, in
sys.exit(cli())
File "/home/.conda/envs/blobtools/lib/python3.9/site-packages/blobtools/blobtools.py", line 105, in cli
sys.exit(subcommand())
File "/home/.conda/envs/blobtools/lib/python3.9/site-packages/blobtools/lib/add.py", line 203, in cli
main(args)
File "/home/.conda/envs/blobtools/lib/python3.9/site-packages/blobtools/lib/add.py", line 149, in main
parsed = field["module"].parse(
File "/home/.conda/envs/blobtools/lib/python3.9/site-packages/blobtools/lib/cov.py", line 182, in parse
fields = parse_bam(
File "/home/.conda/envs/blobtools/lib/python3.9/site-packages/blobtools/lib/cov.py", line 43, in parse_bam
os.remove(index_file)
FileNotFoundError: [Errno 2] No such file or directory: 'Elophila_nymphaeata.sort.bam.csi'

When I ran that task 3 months ago, it worked fine, but I recently encountered the issue.
Is there any way to fix this?
blobtools add --busco and blobtools create --fasta work well

Sincerely

@tanpham15
Copy link

Hi, I got the similar error, and it looks like no index file, .csi in your directory

I think you might need to index the bam file again (samtools index -c name.sort.bam). Note: also you should remove the bam.bai before blobtools add --busco. When I have both .bai and .csi, the error occurred.

Good luck.

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

2 participants