svaba
svaba copied to clipboard
Json::LogicError
Hi, I was running the latest version of samba and I have this error:
[M::bwa_idx_load_from_disk] read 0 ALT contigs
terminate called after throwing an instance of 'Json::LogicError'
what(): in Json::Value::find(key, end, found): requires objectValue or nullValue
/cm/local/apps/uge/var/spool/c-1-18/job_scripts/7579661: line 9: 110794 Aborted (core dumped) $bin run -t $input_bam --reference-genome $ref_fasta --id-string $sample_id --threads $n_threads --read-tracking
My command is:
bin=/home/fangl/bin/svaba
input_bam=/mnt/isilon/wang_lab/fangli/projects/linked_sv_benchmark/real_data_whole-genome/hg19_bam_files/NA24385_aj_son_male_hg19/outs/NA24385_aj_son_male_hg19.phased_possorted_bam.bam.chr20.bam
ref_fasta=/home/fangl/db/refdata-hg19-2.1.0/fasta/genome.fa
sample_id=NA24385_aj_son_male_hg19_chr20
n_threads=16
$bin run -t $input_bam --reference-genome $ref_fasta --id-string $sample_id --threads $n_threads --read-tracking
Could you please help me figure it out?
Best, Li
Hi Li, This is very strange. There are no JSONs in svaba, but it is true that there was a way to filter reads that called to a library (seqlib) that had JSON capability. (However, no one ever uses that feature...). Are you still having this issue if you also recompile SeqLib and relink (if that is obtuse, the same result could be achieved with a fresh git pull --recursive and re-compile of svaba)? I can't create it here (although obv believe its happening for you).
I am (unfortunately) able to reproduce the error using the bioconda version of SvABA:
https://github.com/bioconda/bioconda-recipes/pull/16764
The complete build output can be seen here:
https://circleci.com/gh/bioconda/bioconda-recipes/70026?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-checks-link
I don't see anything suspicious regarding JSON.
(svaba) $ svaba run -t /public/home/liuxs/biodata/icgc/links/PCAWG_TCGA_PRAD/DO36226_Primary.bam \
> -n /public/home/liuxs/biodata/icgc/links/PCAWG_TCGA_PRAD/DO36226_Normal.bam -k 22 \
> -G/public/home/liuxs/biodata/reference/genome/icgc_hg19/genome.fa \
> -a D036226
-----------------------------------------------------------
--- Running svaba SV and indel detection on 1 threads ----
--- (inspect *.log for real-time progress updates) ---
-----------------------------------------------------------
[M::bwa_idx_load_from_disk] read 0 ALT contigs
terminate called after throwing an instance of 'Json::LogicError'
what(): in Json::Value::find(key, end, found): requires objectValue or nullValue
Aborted (core dumped)
I also have these qusetions ,can you tell me how to resove.
@walaj I have the very same error too. Is it related to the conda version of svABA??
I'm also getting the same error, built from current master branch
@walaj any advice?
Ok, I think I found the problem.
On line 609 of run_svaba.cpp "FRRULES" defaults to "[0, 0]"
but then on line 249 of Seqlib/src/ReadFilter.cpp you parse each rule member expecting each to be a json-object, not a json-array
My fix was to change the default "FRRULES" to "{}", an empty json-object
I have no idea if this is the correct thing to do in terms of the logic of the program, but now gets past that error and seems to be running
Update: Ok, I now think I've found the real problem.
The above is still true, and I still think the default "FRRULES" was a bug BUT, the reason "FRRULES" wasn't being filled in was line 28 of LearnBamParams.cpp, the open bam command was inside an assert, which was being optimised away.
I had to add "-UNDEBUG" to the CXXFLAGS when compiling to stop this happening. You'll probably have to do the same for the conda build as well
First off, thank you for tracking this down @EdHarry -- this is great detective work and in an area of code that is really obtuse... my apologies it's taken so long to get to this. I really appreciate the community help on this one.
I agree that the problem is with the [0,0]
. What is happening is that this default is getting triggered when there are no read-groups found in the loop on line 592. What I worry about then is that svaba is not correctly finding the insert size distribution for the given library.
Could you show me the beginning of the log-file for a BAM file that (formerly I hope) fails with this JSON error? I want to see if is making any library insert-size calculations.
That’s no problem 🙂
I’ll have to wait until Monday before I can get access to my work systems to hunt down those logs.
But, as I said, I think the real problem was in LearnBamParams.cpp, line 28. The open command was inside an assert, which gets optimised out when any kind of O flags are set, unless the UNDEBUG macro is defined.
Sent from my iPhone
On 7 Mar 2020, at 05:27, Jeremiah Wala [email protected] wrote:
First off, thank you for tracking this down @EdHarry -- this is great detective work and in an area of code that is really obtuse... my apologies it's taken so long to get to this. I really appreciate the community help on this one.
I agree that the problem is with the [0,0]. What is happening is that this default is getting triggered when there are no read-groups found in the loop on line 592. What I worry about then is that svaba is not correctly finding the insert size distribution for the given library.
Could you show me the beginning of the log-file for a BAM file that (formerly I hope) fails with this JSON error? I want to see if is making any library insert-size calculations.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Here’s the log of a run that formerly failed:
***************************** PARAMS **************************** DBSNP Database file: Max cov to assemble: 100 Error correction mode: f Subsample-rate for correction learning: 0.500000 ErrorRate: EXACT (0) Num assembly rounds: 3 Num reads to sample: 2000000 Discordant read extract SD cutoff: 3.92 Discordant cluster std-dev cutoff: 3.92 Minimum number of reads for mate lookup 3 LOD cutoff (non-REF): 8 LOD cutoff (non-REF, at DBSNP): 6 LOD somatic cutoff: 6 LOD somatic cutoff (at DBSNP): 10 BWA-MEM params: Gap open penalty: 32 Gap extension penalty: 1 Mismatch penalty: 18 Aligment bandwidth: 1000 Z-dropoff: 100 Clip 3 penalty: 5 Clip 5 penalty: 5 Reseed trigger: 1.5 Sequence match score: 2
BAM PARAMS FOR: t000--test.bam min_dscrd_size_for_variant 0 ...min discordant-only variant size 0 ...found read length of 0. Min Overlap is 30 ...max read MAPQ detected: 0
...calculated seed size for error rate of 0.000000 and read length 0 is 30 ...loading the human reference sequence for BWA ...running on 1 chunks {"global" : {"duplicate" : false, "qcfail" : false}, "" : { "rules" : [[0,0],{"rr" : true},{"ff" : true}, {"rf" : true}, {"ic" : true}, {"clip" : 5, "length" : 12}, {"ins" : true}, {"del" : true}, {"mapped": true , "mate_mapped" : false}, {"mate_mapped" : true, "mapped" : false}]}}
On 7 Mar 2020, at 05:58, Ed Harry [email protected] wrote:
That’s no problem 🙂
I’ll have to wait until Monday before I can get access to my work systems to hunt down those logs.
But, as I said, I think the real problem was in LearnBamParams.cpp, line 28. The open command was inside an assert, which gets optimised out when any kind of O flags are set, unless the UNDEBUG macro is defined.
Sent from my iPhone
On 7 Mar 2020, at 05:27, Jeremiah Wala [email protected] wrote:
First off, thank you for tracking this down @EdHarry https://github.com/EdHarry -- this is great detective work and in an area of code that is really obtuse... my apologies it's taken so long to get to this. I really appreciate the community help on this one.
I agree that the problem is with the [0,0]. What is happening is that this default is getting triggered when there are no read-groups found in the loop on line 592. What I worry about then is that svaba is not correctly finding the insert size distribution for the given library.
Could you show me the beginning of the log-file for a BAM file that (formerly I hope) fails with this JSON error? I want to see if is making any library insert-size calculations.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/walaj/svaba/issues/73?email_source=notifications&email_token=AHHI7INWGNZFK7BRRBY3F5LRGHLKLA5CNFSM4H5BJDW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEODP2II#issuecomment-596049185, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHHI7IJZAVILW32OLK73RL3RGHLKLANCNFSM4H5BJDWQ.