edwardslab-wustl / dxm

Deconvolution of Methylation Sequencing Data
GNU General Public License v3.0
2 stars 2 forks source link

IndexError: Out of bounds on buffer access (axis 1) #2

Closed StefaniaTuveri closed 3 years ago

StefaniaTuveri commented 3 years ago

Hello, I am trying to run the dxm_solveMethylation, but I get this error: can someone help solving this? Thank you

building choice table takes: 0.30843393690884113 IndexError: Out of bounds on buffer access (axis 1) Exception ignored in: 'dxm.DXMfunctions.translateMeth' Traceback (most recent call last): File "/data/leuven/329/vsc32941/miniconda3/envs/science/lib/python3.8/site-packages/dxm/dxm_solveMethylation.py", line 132, in main completion = DXM.runDXMnoIP(inFile,outPref,refTable,maxCov,maxSubpop,referenceFracs,binFile,freqFile) IndexError: Out of bounds on buffer access (axis 1) Traceback (most recent call last): File "/data/leuven/329/vsc32941/miniconda3/envs/science/bin/dxm_solveMethylation", line 33, in sys.exit(load_entry_point('dxm==0.1.1', 'console_scripts', 'dxm_solveMethylation')()) File "/data/leuven/329/vsc32941/miniconda3/envs/science/lib/python3.8/site-packages/dxm/dxm_solveMethylation.py", line 132, in main completion = DXM.runDXMnoIP(inFile,outPref,refTable,maxCov,maxSubpop,referenceFracs,binFile,freqFile) File "dxm/DXMfunctions.pyx", line 584, in dxm.DXMfunctions.runDXMnoIP (myStates,logOdds,localProbPath) = runDXMgeneNOIPSubpop(BINS, FREQS, newMeth, newPos, newCoverage, NUMCPG,refTable,METHARRAY,UNMETHARRAY,CHOICEARRAY,numSubpop,LOCALFRAC) File "dxm/DXMfunctions.pyx", line 524, in dxm.DXMfunctions.runDXMgeneNOIPSubpop (predictedStates, logOdds,probPath) = iterateDXMnoIP(BINS, FREQS, methVals, pos, coverages, NUMCPG, NUMSUBPOP, refTable, LOCALFRAC, METHARRAY, UNMETHARRAY, CHOICEARRAY) File "dxm/DXMfunctions.pyx", line 533, in dxm.DXMfunctions.iterateDXMnoIP (logOdds,probPath) = viterbi(newMeth, FREQS, BINS, newPos, newCoverage, algorithmFrac_mv, predictedState_mv, refTable,METHARRAY,UNMETHARRAY,CHOICEARRAY) File "dxm/DXMfunctions.pyx", line 436, in dxm.DXMfunctions.viterbi log_em_prob = math.log(multinomial(j,fracs,numSubpop,tempDepth,methReads,refTable,refTable.shape[0]-1,METHARRAY,UNMETHARRAY,CHOICEARRAY)) ValueError: math domain error

jredwards417 commented 3 years ago

We discussed this offline. In case someone runs across this error in the future. There were two main issues and each throws errors like this: (1) the input data was not in the correct format (methylation levels must be between 0 and 1) and (2) DXM throws an error if the coverage at any CpG sites is 1. I will push a new version that filters out CpGs with coverage of only 1 and add a note to the README to clarify the input format. When I do, I'll close this out.

jredwards417 commented 3 years ago

Just pushed changes to dxm_solveMethylation so it filters sites with improper coverage (and throws warning as it does it). Also dxm_solveMethylation will now catch the error if methylation values are not between 0 and 1 and warn the user to change the input. Closing this issue.