MikeAxtell / ShortStack

ShortStack: Comprehensive annotation and quantification of small RNA genes
MIT License
88 stars 29 forks source link

ShortStack version 4.0.2: IndexError: list index out of range #140

Closed Maja-nib closed 9 months ago

Maja-nib commented 12 months ago

Hi, I am using the ShortStack version 4.0.2 and by running the command: ShortStack --genomefile genome.fasta --readfile B1_clean.fa --dn_mirna --known_miRNAs known_miRNAs.fasta It seems something is wrong with post alignment phase. Could you please help me to resolve this issue.

Output from command line: ShortStack version 4.0.2

Beginning run Options: { 'adapter': None, 'align_only': False, 'autotrim': False, 'autotrim_key': 'TCGGACCAGGCTTCATTCCCC', 'bamfile': None, 'dicermax': 24, 'dicermin': 21, 'dn_mirna': True, 'genomefile': '/DKED/scratch/majak/genome.fasta', 'known_miRNAs': None, 'locifile': None, 'locus': None, 'mincov': 1, 'mmap': 'u', 'nohp': False, 'outdir': 'ShortStack_1693208194', 'pad': 200, 'readfile': ['/DKED/scratch/majak/B1_clean.fa'], 'show_secondaries': False, 'strand_cutoff': 0.8, 'threads': 1} Required executable RNAfold : /proj/etools/conda/envs/shortstack/bin/RNAfold Required executable strucVis : /proj/etools/conda/envs/shortstack/bin/strucVis Required executable bowtie : /proj/etools/conda/envs/shortstack/bin/bowtie Required executable bowtie-build : /proj/etools/conda/envs/shortstack/bin/bowtie-build Required executable ShortTracks : /proj/etools/conda/envs/shortstack/bin/ShortTracks Required executable wigToBigWig : /proj/etools/conda/envs/shortstack/bin/wigToBigWig Required executable samtools : /proj/etools/conda/envs/shortstack/bin/samtools

Beginning alignment phase

Aligning /DKED/scratch/majak/B1_clean.fa First pass alignment with bowtie using 1 threads 391606432 bowtie output lines [38:40, 152242.06 bowtie output lines/s]# reads processed: 25912617

reads with at least one alignment: 15881290 (61.29%)

reads that failed to align: 10031327 (38.71%)

Reported 381589969 alignments 391621311 bowtie output lines [38:40, 168774.00 bowtie output lines/s] Second pass - placing multimappers using 1 threads to process 1 chunks Chunks sent: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1479.99 Chunk/s] multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/proj/etools/conda/envs/shortstack/lib/python3.10/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "/proj/etools/conda/envs/shortstack/lib/python3.10/multiprocessing/pool.py", line 51, in starmapstar return list(itertools.starmap(args[0], args[1])) File "/proj/etools/conda/envs/shortstack/bin/ShortStack", line 925, in al_pass_2 lib_counters = al_block_process2(lib_counters, File "/proj/etools/conda/envs/shortstack/bin/ShortStack", line 1160, in al_block_process2 chosen = random.choices(alignments, weights=probs)[0] File "/proj/etools/conda/envs/shortstack/lib/python3.10/random.py", line 533, in choices total = cum_weights[-1] + 0.0 # convert to float IndexError: list index out of range """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/proj/etools/conda/envs/shortstack/bin/ShortStack", line 3582, in merged_bam, read_count = align(args, fai, trimmed_files) File "/proj/etools/conda/envs/shortstack/bin/ShortStack", line 705, in align rs2_results = pool.starmap(al_pass_2, File "/proj/etools/conda/envs/shortstack/lib/python3.10/multiprocessing/pool.py", line 375, in starmap return self._map_async(func, iterable, starmapstar, chunksize).get() File "/proj/etools/conda/envs/shortstack/lib/python3.10/multiprocessing/pool.py", line 774, in get raise self._value IndexError: list index out of range

MikeAxtell commented 12 months ago

See #136 for the probably source of the issue and an easy fix.

What tool do you use to produce the input file "B1_clean.fa"?

Maja-nib commented 12 months ago

We got fasta files from the sequencing provider, probably they used cutadapt. Now I See #136 and by replacing @ in fasta header names I fixed the issue. Now pipeline works fine. Many thanks!