TALON icon indicating copy to clipboard operation
TALON copied to clipboard

ERROR : [process_sams.py:108:preprocess_sam] when running talon

Open Dongxu-Zheng opened this issue 8 months ago • 5 comments

Hi, thanks for developing TALON for long-read RNA-seq analysis. I was working on the ONT direct RNA-sequencing data. Following the tutorial, I ran talon but there was an ERROR about sam files.

Here is the ERROR I got: [ 2024-06-07 19:45:43 ] : INFO : [talon.py:3146:main] : Started TALON run [ 2024-06-07 19:45:43 ] : WARNING : [talon.py:1902:check_inputs] : Ignoring dataset with name 'cl7dox0h' because it is already in the database. [ 2024-06-07 19:45:44 ] : ERROR : [process_sams.py:108:preprocess_sam] : Problem merging and indexing SAM/BAM files. Check your file paths and make sure that all files have headers. Traceback (most recent call last): File "/software/anaconda3/envs/talon/lib/python3.7/site-packages/talon/process_sams.py", line 92, in preprocess_sam pysam.merge(*merge_args) File "/software/anaconda3/envs/talon/lib/python3.7/site-packages/pysam/utils.py", line 75, in call stderr)) pysam.utils.SamtoolsError: 'samtools returned with error 1: stdout=, stderr=You must specify at least one (and usually two or more) input files.\nUsage: samtools merge [-nurlf] [-h inh.sam] [-b <bamlist.fofn>] <out.bam> <in1.bam> [<in2.bam> ... <inN.bam>]\n\nOptions:\n -n Input files are sorted by read name\n -r Attach RG tag (inferred from file names)\n -u Uncompressed BAM output\n -f Overwrite the output BAM if exist\n -1 Compress level 1\n -l INT Compression level, from 0 to 9 [-1]\n -R STR Merge file in the specified region STR [all]\n -h FILE Copy the header in FILE to <out.bam> [in1.bam]\n -c Combine @RG headers with colliding IDs [alter IDs to be distinct]\n -p Combine @PG headers with colliding IDs [alter IDs to be distinct]\n -s VALUE Override random seed\n -b FILE List of input BAM filenames, one per line [null]\n -@, --threads INT\n Number of BAM/CRAM compression threads [0]\n --input-fmt-option OPT[=VAL]\n Specify a single input file format option in the form\n of OPTION or OPTION=VALUE\n -O, --output-fmt FORMAT[,OPT[=VAL]]...\n Specify output format (SAM, BAM, CRAM)\n --output-fmt-option OPT[=VAL]\n Specify a single output file format option in the form\n of OPTION or OPTION=VALUE\n --reference FILE\n Reference sequence FASTA FILE [null]\n'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/software/anaconda3/envs/talon/bin/talon", line 8, in sys.exit(main()) File "/software/anaconda3/envs/talon/lib/python3.7/site-packages/talon/talon.py", line 3191, in main sam_files, datasets, use_cb_tag, tmp_dir=tmp_dir, n_threads=threads File "/software/anaconda3/envs/talon/lib/python3.7/site-packages/talon/process_sams.py", line 123, in partition_reads merged_bam = preprocess_sam(sam_files, datasets, use_cb_tag, tmp_dir=tmp_dir, n_threads=n_threads) File "/software/anaconda3/envs/talon/lib/python3.7/site-packages/talon/process_sams.py", line 109, in preprocess_sam raise RuntimeError(msg) RuntimeError: Problem merging and indexing SAM/BAM files. Check your file paths and make sure that all files have headers.

The version of TALON I installed is v6.0. The version of samtools is 1.3.1. I also checked the header of my TALON labeled sam file where I can find the headers. Do you know what is the problem I got? Many thanks for any help!

Best, Dongxu

Dongxu-Zheng avatar Jun 07 '24 17:06 Dongxu-Zheng