You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def count_kmers_in_region(bam_file, region, kmer_size):
kmers = {}
chrom, coords = region.split(":")
start, end = coords.split("-")
start, end = int(start), int(end)
x = 0
dc = get_seq(bam_file, chrom, start, end)
for qname, seq in dc.items():
for i in range(len(seq) - kmer_size + 1):
kmer = seq[i:i+kmer_size]
if kmer in kmers:
kmers[kmer] += 1
else:
kmers[kmer] = 1
x+=1
# print(f"num reads in {region}: {x}")
# print(len(kmers))
return kmers
Best regards.
The text was updated successfully, but these errors were encountered:
DayTimeMouse
changed the title
ValueError: too many values to unpack (expected 2) in coords.split('-')
ValueError: too many values to unpack (expected 2) in volcanosv-vc-small-indel.py
Nov 4, 2024
What is your reference's each chromosome's name like? I suspect this is the same issue as what caused the large indel failed. VolcaoSV expects the reference file to have names like chr1, chr2 etc.
Hi,
I have encountered another issue.
Error:
Please see details in log.
log.txt
The issue might be with coords.split('-').
Best regards.
The text was updated successfully, but these errors were encountered: