harbor run -t openthoughts/tasktrove-swe-rebench-patched-oracle-swe_rebench-06325harbor download openthoughts/tasktrove-swe-rebench-patched-oracle-swe_rebench-06325cd /testbed
git clone https://github.com/whatshap/whatshap.git . && git checkout 23c88e399001796ac84ab3b10adbe323f06833bc
apt-get update
apt-get install -y build-essential python3-dev
pip install -r /setup_files/requirements.txt
pip install -e .[dev]
pip install pytest
haplotag adds a second @PG line in the header with ID:whatshap when run on a file that was previously haplotagged. We ran whatshap haplotag on bam A using a regular phased vcf file generating bam B We then ran whatshap haplotag on bam B using a different phased vcf file generating bam C
IGV complained about having multiple PG lines with the same ID - when adding its PG line whatshap does not check for a previous existing PG line with the same ID.
python -V and whatshap --version)
Python 3.9.17
whatshap 2.1Here are the PG lines from a bam file where whatshap haplotag was run on it twice. Note that the first time the bam was split into 3 parts, and we used samtools merge to combine them together. Samtools merge dealt with the duplicate PG IDs by appending a random suffix.
@PG PN:whatshap ID:whatshap VN:1.4 CL:whatshap haplotag --tag-supplementary --output-threads 4 --reference /cromwell-executions/humanwgs/29b3a689-17f3-4d15-b6b1-55f4c7fbb457/call-sample_analysis/shard-2/sample_analysis/1313bac2-e41f-45d6-8e46-a0799e675127/call-whatshap_haplotag/shard-0/inputs/p1gmcstorprimary01/smrtlink/pb-hosted-dataset/GRCh38/human_GRCh38_no_alt_analysis_set.fasta --output cmh006654-01A.m84052_230925_140850_s1.hifi_reads.bc2093.GRCh38.aligned.haplotagged.bam /cromwell-executions/humanwgs/29b3a689-17f3-4d15-b6b1-55f4c7fbb457/call-sample_analysis/shard-2/sample_analysis/1313bac2-e41f-45d6-8e46-a0799e675127/call-phase_vcf/phase_vcf/12a93a5e-f0a6-4324-ab8d-46bff5419499/call-bcftools_concat/execution/cmh006654-01A.GRCh38.deepvariant.phased.vcf.gz /cromwell-executions/humanwgs/29b3a689-17f3-4d15-b6b1-55f4c7fbb457/call-sample_analysis/shard-2/sample_analysis/1313bac2-e41f-45d6-8e46-a0799e675127/call-pbmm2_align/shard-0/execution/cmh006654-01A.m84052_230925_140850_s1.hifi_reads.bc2093.GRCh38.aligned.bam m5:70b2b4e4583912cb7df227aaba920b8f
@PG PN:whatshap ID:whatshap-3BA06A1C VN:1.4 CL:whatshap haplotag --tag-supplementary --output-threads 4 --reference /cromwell-executions/humanwgs/29b3a689-17f3-4d15-b6b1-55f4c7fbb457/call-sample_analysis/shard-2/sample_analysis/1313bac2-e41f-45d6-8e46-a0799e675127/call-whatshap_haplotag/shard-1/inputs/p1gmcstorprimary01/smrtlink/pb-hosted-dataset/GRCh38/human_GRCh38_no_alt_analysis_set.fasta --output cmh006654-01A.m84052_230925_143914_s2.hifi_reads.bc2093.GRCh38.aligned.haplotagged.bam /cromwell-executions/humanwgs/29b3a689-17f3-4d15-b6b1-55f4c7fbb457/call-sample_analysis/shard-2/sample_analysis/1313bac2-e41f-45d6-8e46-a0799e675127/call-phase_vcf/phase_vcf/12a93a5e-f0a6-4324-ab8d-46bff5419499/call-bcftools_concat/execution/cmh006654-01A.GRCh38.deepvariant.phased.vcf.gz /cromwell-executions/humanwgs/29b3a689-17f3-4d15-b6b1-55f4c7fbb457/call-sample_analysis/shard-2/sample_analysis/1313bac2-e41f-45d6-8e46-a0799e675127/call-pbmm2_align/shard-1/execution/cmh006654-01A.m84052_230925_143914_s2.hifi_reads.bc2093.GRCh38.aligned.bam m5:70b2b4e4583912cb7df227aaba920b8f
@PG PN:whatshap ID:whatshap-416AB9B1 VN:1.4 CL:whatshap haplotag --tag-supplementary --output-threads 4 --reference /cromwell-executions/humanwgs/29b3a689-17f3-4d15-b6b1-55f4c7fbb457/call-sample_analysis/shard-2/sample_analysis/1313bac2-e41f-45d6-8e46-a0799e675127/call-whatshap_haplotag/shard-2/inputs/p1gmcstorprimary01/smrtlink/pb-hosted-dataset/GRCh38/human_GRCh38_no_alt_analysis_set.fasta --output cmh006654-01A.m84052_231005_211216_s3.hifi_reads.bc2093.GRCh38.aligned.haplotagged.bam /cromwell-executions/humanwgs/29b3a689-17f3-4d15-b6b1-55f4c7fbb457/call-sample_analysis/shard-2/sample_analysis/1313bac2-e41f-45d6-8e46-a0799e675127/call-phase_vcf/phase_vcf/12a93a5e-f0a6-4324-ab8d-46bff5419499/call-bcftools_concat/execution/cmh006654-01A.GRCh38.deepvariant.phased.vcf.gz /cromwell-executions/humanwgs/29b3a689-17f3-4d15-b6b1-55f4c7fbb457/call-sample_analysis/shard-2/sample_analysis/1313bac2-e41f-45d6-8e46-a0799e675127/call-pbmm2_align/shard-2/execution/cmh006654-01A.m84052_231005_211216_s3.hifi_reads.bc2093.GRCh38.aligned.bam m5:70b2b4e4583912cb7df227aaba920b8f
@PG PN:whatshap ID:whatshap VN:2.1 CL:whatshap haplotag -o RESULT/aligned/cmh006654-01A.GRCh38.haplotagged.pedigree.bam --reference /reference/GRCh38/GRCh38_no_alt_analysis_set.decoy.fna /cluster/home/wacheung/analysis/scratch/cmh006654/cmh006654.cmh006654-01A.GRCh38.deepvariant.glnexus.whatshap-ped.vcf.gz /cluster/home/wacheung/analysis/scratch/cmh006654/cmh006654-01A.GRCh38.haplotagged.bam m5:37994ea46121627ad1938fd44bf76726