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

TypeError: 'NoneType' object is not subscriptable #9

Open
Tianran1 opened this issue Mar 21, 2023 · 4 comments
Open

TypeError: 'NoneType' object is not subscriptable #9

Tianran1 opened this issue Mar 21, 2023 · 4 comments

Comments

@Tianran1
Copy link

Error message:

Traceback (most recent call last):
File "/opt/conda/bin/scAllele", line 8, in
sys.exit(main())
File "/opt/conda/lib/python3.9/site-packages/scAllele/scAllele.py", line 388, in main
RCs = gqv_bam_utils.find_read_clusters(bam_file, options, chrom, fetch_start, fetch_end)
File "/opt/conda/lib/python3.9/site-packages/scAllele/gqv_bam_utils.py", line 196, in find_read_clusters
new_read = remove_homopolymer_ends(read, r_blocks)
File "/opt/conda/lib/python3.9/site-packages/scAllele/gqv_bam_utils.py", line 397, in remove_homopolymer_ends
aligned_qual = read.query_alignment_qualities[prefix : sufix]
TypeError: 'NoneType' object is not subscriptable

@giovanniquinones
Copy link
Contributor

It seems some reads in your bam file don't have a base quality string.
You will need to remove such reads as scAllele needs the base quality information to score variants.

@Tianran1
Copy link
Author

Thanks. But I think all of my reads are without the quality score since they are converted from the bam file. Are there any solutions?

@giovanniquinones
Copy link
Contributor

You can try adding a dummy string i.e. "JJJJJJ..." using pysam

@Tianran1
Copy link
Author

Thanks. I also noticed that there are some without sequence in the bam file, do I need to remove them?

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