bgm-cwg / novoCaller

MIT License
8 stars 1 forks source link

Pysam error when running novoCallerBAM.py #3

Open nharris94 opened 1 year ago

nharris94 commented 1 year ago

Hi,

When trying to run the python script using the bam files and the output of step one, I get this error: Traceback (most recent call last): File "/nfs/projects/refractory_epilepsy/Novocaller_test/novoCaller/novoCallerBAM.py", line 802, in runner(outfilename,initial_filename,unrelated_filename,trio_filename) File "/nfs/projects/refractory_epilepsy/Novocaller_test/novoCaller/novoCallerBAM.py", line 731, in runner PP,ADfs,ADrs,ADfs_U,ADrs_U,rho_f_new,rho_r_new,prior_L_new,AF_unrel = PP_calc(trio_samfiles,unrelated_samfiles,chrom,pos,REF,ALT,allele_freq,MQ_thresh,BQ_thresh) File "/nfs/projects/refractory_epilepsy/Novocaller_test/novoCaller/novoCallerBAM.py", line 628, in PP_calc ADfs,ADrs = get_all_ADs_combined(unrelated_samfiles,chrom,pos,REF,ALT,MQ_thresh,BQ_thresh) File "/nfs/projects/refractory_epilepsy/Novocaller_test/novoCaller/novoCallerBAM.py", line 312, in get_all_ADs_combined ADf,ADr = get_ADs_combined(samfile,chrom,position_actual,REF,ALT,MQ_thresh,BQ_thresh) File "/nfs/projects/refractory_epilepsy/Novocaller_test/novoCaller/novoCallerBAM.py", line 303, in get_ADs_combined ADf,ADr = get_ADs(samfile,chrom,position_actual,REF[0],MQ_thresh,BQ_thresh) File "/nfs/projects/refractory_epilepsy/Novocaller_test/novoCaller/novoCallerBAM.py", line 149, in get_ADs SP=samfile.pileup("chr"+CC, position, position+1) File "pysam/libcalignmentfile.pyx", line 1326, in pysam.libcalignmentfile.AlignmentFile.pileup File "pysam/libchtslib.pyx", line 685, in pysam.libchtslib.HTSFile.parse_region ValueError: invalid contig chr1

moe1619 commented 1 year ago

I am working with the OP. We are using realigned recalibrated BAMs. Could a snippet of a BAM that is acceptable to novocaller be posted so we can figure out whether our formatting is correct? Thanks!

moe1619 commented 1 year ago

Just checking in on this. Thanks!