gbouras13 / gbouras13/plassembler
Plassembler stops at Processing Sam/Bam Files and extracting Fastqs
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 90
- Forks
- 12
- Avg merge
- 6d 4h
- Merged PRs (30d)
- 2
Description
Hi @gbouras13,
Many thanks for your excellent tool. I am trying to implement Plassembler (v1.6.2) within one of my in-house Nextflow pipelines on a Linux machine. Plassembler analysis ran successfully for one of two genomes of interest. For the second genome, Plassembler stopped at the processing Sam/Bam Files and extracting Fastqs step. Kindly find the error message below.
2024-05-10 17:24:08.037 | INFO | plassembler:run:793 - Mapping short reads.
2024-05-10 17:24:08.037 | INFO | plassembler.utils.external_tools:run_to_stdout:67 - Started running minimap2 -ax sr -t 1 15059/flye_renamed.fasta 15059/trimmed_R1.fastq 15059/trimmed_R2.fastq ...
2024-05-10 17:25:00.741 | INFO | plassembler.utils.external_tools:run_to_stdout:69 - Done running minimap2 -ax sr -t 1 15059/flye_renamed.fasta 15059/trimmed_R1.fastq 15059/trimmed_R2.fastq
2024-05-10 17:25:00.742 | INFO | plassembler:run:800 - Processing Sam/Bam Files and extracting Fastqs.
Traceback (most recent call last):
File "/MIGE/04_PROJECTS/DAIKOS/longread_analysis/work/conda/plassembler-2a63b87dbbb2cd95edb41776d561fd4c/bin/plassembler", line 10, in <module>
sys.exit(main())
File "/MIGE/04_PROJECTS/DAIKOS/longread_analysis/work/conda/plassembler-2a63b87dbbb2cd95edb41776d561fd4c/lib/python3.9/site-packages/plassembler/__init__.py", line 1666, in main
main_cli()
File "/MIGE/04_PROJECTS/DAIKOS/longread_analysis/work/conda/plassembler-2a63b87dbbb2cd95edb41776d561fd4c/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/MIGE/04_PROJECTS/DAIKOS/longread_analysis/work/conda/plassembler-2a63b87dbbb2cd95edb41776d561fd4c/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/MIGE/04_PROJECTS/DAIKOS/longread_analysis/work/conda/plassembler-2a63b87dbbb2cd95edb41776d561fd4c/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/MIGE/04_PROJECTS/DAIKOS/longread_analysis/work/conda/plassembler-2a63b87dbbb2cd95edb41776d561fd4c/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/MIGE/04_PROJECTS/DAIKOS/longread_analysis/work/conda/plassembler-2a63b87dbbb2cd95edb41776d561fd4c/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/MIGE/04_PROJECTS/DAIKOS/longread_analysis/work/conda/plassembler-2a63b87dbbb2cd95edb41776d561fd4c/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/MIGE/04_PROJECTS/DAIKOS/longread_analysis/work/conda/plassembler-2a63b87dbbb2cd95edb41776d561fd4c/lib/python3.9/site-packages/plassembler/__init__.py", line 804, in run
extract_long_fastqs_slow_keep_fastqs(outdir, samfile, plasmidfastqs)
File "/MIGE/04_PROJECTS/DAIKOS/longread_analysis/work/conda/plassembler-2a63b87dbbb2cd95edb41776d561fd4c/lib/python3.9/site-packages/plassembler/utils/sam_to_fastq.py", line 92, in extract_long_fastqs_slow_keep_fastqs
"".join(chr(q + 33) for q in quality) + "\n"
TypeError: 'NoneType' object is not iterable
The bash command;
#!/bin/bash -ue
plassembler run \
\
-d plassembler_db \
-l 15059.fastq.gz \
-1 15059_1.fastq.gz \
-2 15059_2.fastq.gz \
-m 1 \
-p 15059 \
-o 15059 \
--keep_fastqs \
--keep_chromosome \
-r \
My guess is that there are no fastqs to be extracted by Plassembler (using the --keep_fastqs argument). Is this correct? If so, does this mean that no plasmids are present in this genome? If truly there are no plasmids, is it then possible that an empty fastq file (e.g., within the plasmid_fastqs directory) is produced and the run continues with a warning message in the logs rather than stopping altogether (thinking Nextflow/Snakemake application)?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with plassembler/utils/sam_to_fastq.py, especially extract_long_fastqs_slow_keep_fastqs, using the traceback and the --keep_fastqs invocation as the reproduction path. Check how records without iterable quality data are handled and verify the run no longer raises TypeError when no fastqs can be extracted, while producing the requested warning or empty output behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- bioinformatics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100