Description
Dear svtyper creative team:
I have a little trouble using the software and would like to ask for your help. I always encounter the prompt that the RG field is missing in the bam file. Is there any way to solve it?
(lumpy_env) [chenzhaojin@lfpara test1010]$ svtyper \
-B merge_1-10_1-30.bam \ -l my.bam.json
Warning: VCF not found.
Traceback (most recent call last):
File "/home/chenzhaojin/anaconda3/envs/lumpy_env/bin/svtyper", line 11, in
load_entry_point('svtyper==0.7.0', 'console_scripts', 'svtyper')()
File "/home/chenzhaojin/anaconda3/envs/lumpy_env/lib/python2.7/site-packages/svtyper/classic.py", line 575, in cli
sys.exit(main())
File "/home/chenzhaojin/anaconda3/envs/lumpy_env/lib/python2.7/site-packages/svtyper/classic.py", line 568, in main
args.max_ci_dist)
File "/home/chenzhaojin/anaconda3/envs/lumpy_env/lib/python2.7/site-packages/svtyper/classic.py", line 150, in sv_genotype
sample = Sample.from_bam(bam_list[i], num_samp, min_lib_prevalence)
File "/home/chenzhaojin/anaconda3/envs/lumpy_env/lib/python2.7/site-packages/svtyper/parsers.py", line 665, in from_bam
name = bam.header['RG'][0]['SM']
File "pysam/libcalignmentfile.pyx", line 548, in pysam.libcalignmentfile.AlignmentHeader.getitem
KeyError: 'RG'
This still happens when I try the svtyper-sso module,(lumpy_env) [chenzhaojin@lfpara test1010]$ svtyper-sso \
--core 48 \ --batch_size 1000 \ --max_reads 1000 \ -i merged_all_results.vcf \ -B merge_1-10_1-30.bam \ > sv.gt.vcf
Traceback (most recent call last):
File "/home/chenzhaojin/anaconda3/envs/lumpy_env/bin/svtyper-sso", line 11, in
load_entry_point('svtyper==0.7.0', 'console_scripts', 'svtyper-sso')()
File "/home/chenzhaojin/anaconda3/envs/lumpy_env/lib/python2.7/site-packages/svtyper/singlesample.py", line 848, in cli
sys.exit(main())
File "/home/chenzhaojin/anaconda3/envs/lumpy_env/lib/python2.7/site-packages/svtyper/singlesample.py", line 841, in main
args.batch_size)
File "/home/chenzhaojin/anaconda3/envs/lumpy_env/lib/python2.7/site-packages/svtyper/singlesample.py", line 788, in sso_genotype
sample = setup_sample(full_bam_path, lib_info_path, ref_fasta, num_samp, min_aligned)
File "/home/chenzhaojin/anaconda3/envs/lumpy_env/lib/python2.7/site-packages/svtyper/singlesample.py", line 79, in setup_sample
sample = Sample.from_bam(fd, sampling_number, min_lib_prevalence)
File "/home/chenzhaojin/anaconda3/envs/lumpy_env/lib/python2.7/site-packages/svtyper/parsers.py", line 665, in from_bam
name = bam.header['RG'][0]['SM']
File "pysam/libcalignmentfile.pyx", line 548, in pysam.libcalignmentfile.AlignmentHeader.getitem
KeyError: 'RG'
I would appreciate any assistance or guidance you can provide.