Missing ragtag.correct.reads.s.bam file
Hello, I am getting the following error after mapping the query genome to the reference and mapping reads to the query genome:
#Command:
ragtag.py correct $REF $QUERY \
-t 12 \
-e ignore_scafs_V2.txt -j ignore_scafs_Acoer.txt \
-R $READS \
-T corr \
-o ./ragtag_output_hifireads
#Error
[E::hts_open] fail to open file '/gpfs/fs2/scratch/nchen11_lab/Faye/ragtag/ragtag_output_hifireads/ragtag.correct.reads.s.bam'
Traceback (most recent call last):
File "/home/fromero3/.conda/envs/ragtag/bin/ragtag_correct.py", line 666, in <module>
main()
File "/home/fromero3/.conda/envs/ragtag/bin/ragtag_correct.py", line 616, in main
run_samtools(output_path, num_threads, overwrite_files)
File "/home/fromero3/.conda/envs/ragtag/bin/ragtag_correct.py", line 139, in run_samtools
pysam.sort("-@", str(num_threads), "-o", output_path + "ragtag.correct.reads.s.bam", output_path + "ragtag.correct.reads.bam", catch_stdout=False)
File "/home/fromero3/.conda/envs/ragtag/lib/python3.6/site-packages/pysam/__init__.py", line 71, in __call__
(retval, "\n".join(stderr)))
pysam.SamtoolsError: 'csamtools returned with error 1: '
It seems like ragtag_correct.py can't find a file named ragtag.correct.reads.s.bam. This file was never created during the previous steps, so I'm not sure if/why I'm missing it. These are the only files existing in my output directory before the job was terminated via error:
ragtag.correct.reads.bam
ragtag.correct.reads.sam.log
ragtag.correct.sam
ragtag.correct.asm.paf.log
ragtag.correct.asm.paf
ragtag.correct.err
So when was ragtag.correct.reads.s.bam supposed to be created, and why am I missing it? I installed RagTag via conda. Any help would be much appreciated.
Hi,
I had the same error: File "/home/juaguila/miniconda3/envs/ragtag/lib/python3.6/site-packages/pysam/init.py", line 71, in call (retval, "\n".join(stderr))) pysam.SamtoolsError: 'csamtools returned with error 1: '
Everything worked fine until it tried reading a file that doesn't exist:
ragtag.py correct myse_female.fasta myse-hapog.fasta -t 12 -o MYSE_corr -T sr -R MYSE_mrg.fasta Tue Jul 16 16:57:54 2024 --- VERSION: RagTag v2.1.0 Tue Jul 16 16:57:54 2024 --- CMD: ragtag.py correct myse_female.fasta myse-hapog.fasta -t 12 -o MYSE_corr -T sr -R MYSE_mrg.fasta Tue Jul 16 16:57:54 2024 --- WARNING: Without '-u' invoked, some component/object AGP pairs might share the same ID. Some external programs/databases don't like this. To ensure valid AGP format, use '-u'. Tue Jul 16 16:57:54 2024 --- INFO: Mapping the query genome to the reference genome Tue Jul 16 16:57:54 2024 --- INFO: Running: minimap2 -x asm5 -t 12 /DataDrive/juaguila/MYSE-PESU/myse_female.fasta /DataDrive/juaguila/MYSE-PESU/myse-hapog.fasta > /DataDrive/juaguila/MYSE-PESU/MYSE_corr/ragtag.correct.asm.paf 2> /DataDrive/juaguila/MYSE-PESU/MYSE_corr/ragtag.correct.asm.paf.log Tue Jul 16 17:12:33 2024 --- INFO: Finished running : minimap2 -x asm5 -t 12 /DataDrive/juaguila/MYSE-PESU/myse_female.fasta /DataDrive/juaguila/MYSE-PESU/myse-hapog.fasta > /DataDrive/juaguila/MYSE-PESU/MYSE_corr/ragtag.correct.asm.paf 2> /DataDrive/juaguila/MYSE-PESU/MYSE_corr/ragtag.correct.asm.paf.log Tue Jul 16 17:12:33 2024 --- INFO: Reading whole genome alignments Tue Jul 16 17:12:35 2024 --- INFO: Filtering and merging alignments Tue Jul 16 17:12:51 2024 --- INFO: Validating putative query breakpoints via read alignment Tue Jul 16 17:12:51 2024 --- INFO: Aligning reads to query sequences Tue Jul 16 17:12:51 2024 --- INFO: Running: minimap2 -ax sr -t 12 /DataDrive/juaguila/MYSE-PESU/myse-hapog.fasta /DataDrive/juaguila/MYSE-PESU/MYSE_mrg.fasta > /DataDrive/juaguila/MYSE-PESU/MYSE_corr/ragtag.correct.reads.sam 2> /DataDrive/juaguila/MYSE-PESU/MYSE_corr/ragtag.correct.reads.sam.log Tue Jul 16 18:06:55 2024 --- INFO: Finished running : minimap2 -ax sr -t 12 /DataDrive/juaguila/MYSE-PESU/myse-hapog.fasta /DataDrive/juaguila/MYSE-PESU/MYSE_mrg.fasta > /DataDrive/juaguila/MYSE-PESU/MYSE_corr/ragtag.correct.reads.sam 2> /DataDrive/juaguila/MYSE-PESU/MYSE_corr/ragtag.correct.reads.sam.log Tue Jul 16 18:06:55 2024 --- INFO: Compressing, sorting, and indexing read alignments
[E::hts_open] fail to open file '/DataDrive/juaguila/MYSE-PESU/MYSE_corr/ragtag.correct.reads.s.bam'
Traceback (most recent call last):
File "/home/juaguila/miniconda3/envs/ragtag/bin/ragtag_correct.py", line 666, in
Thank you;