Hi there,
I'm running a benchmark experiment for which I need to lift the alignment coordinates of hap2 of a T2T genome in its hap1 sequence space. In order to do so, I did the following:
${MINIMAP2} -x asm5 -c -o <hap2_on_hap1>.paf -t <n_of_threads> hap1.fasta hap2.fasta
${PAFTOCHAIN} -i hap2_on_hap1.paf | bgzip > hap2_on_hap1.chain.gz
Then when running CrossMap on the hap2 BAM to lift it in hap1 coordinate space, I get the following:
> CrossMap bam --chromid a hap2_on_hap1.chain.gz sample_hap2_sorted.bam sample_hap2_on_hap1.bam
Add tags: False
Insert size = 200.000000
Insert size stdev = 30.000000
Number of stdev from the mean = 3.000000
Add tags to each alignment = False
2026-03-26 08:41:16 [INFO] Read the chain file "../RPE1v1.1.hap2_on_hap1.chain.gz"
2026-03-26 08:41:21 [INFO] Liftover BAM file "sample_hap2_sorted_lift.bam" to "sample_hap2_on_hap1.bam.bam"
Traceback (most recent call last):
File "/home/mungaro/.local/bin/CrossMap", line 8, in <module>
sys.exit(crossmap())
File "/home/mungaro/.local/lib/python3.8/site-packages/cmmodule/__init__.py", line 547, in crossmap
crossmap_bam_file(
File "/home/mungaro/.local/lib/python3.8/site-packages/cmmodule/mapbam.py", line 646, in crossmap_bam_file
new_alignment.query_qualities = old_alignment.query_qualities[::-1] # reverse quality string
TypeError: 'NoneType' object is not subscriptable
In this case I'm aligning HiFi long reads to the independent haplotypes of this T2T genome, but I need to merge them into a single BAM for then doing a variant calling and benchmark against another pipeline. Any help is much appreciated, thanks!
Hi there,
I'm running a benchmark experiment for which I need to lift the alignment coordinates of
hap2of a T2T genome in itshap1sequence space. In order to do so, I did the following:Then when running
CrossMapon thehap2BAM to lift it inhap1coordinate space, I get the following:In this case I'm aligning HiFi long reads to the independent haplotypes of this T2T genome, but I need to merge them into a single BAM for then doing a variant calling and benchmark against another pipeline. Any help is much appreciated, thanks!