sequencing / EAGLE

Enhanced Artificial Genome Engine: next generation sequencing reads simulator
BSD 3-Clause "New" or "Revised" License
32 stars 5 forks source link

global2local throws error when using custom template distribution table #6

Closed euginm closed 6 years ago

euginm commented 6 years ago

Hi, I'm trying to generate different insert size libraries, normally it works perfectly, but sometimes it throws an exception: global2local: updating cache from scaffold3360|size49693**

Warning:/project/sweet/granbow/simulation_data/EAGLE/src/c++/lib/io/Fasta.cpp:381: **

** Warning **: Could not determine in which contig global pos 18446744073709551607 belongs to

Error: 2017-Nov-15 15:07:34: : /project/sweet/granbow/simulation_data/EAGLE/src/c++/lib/genome/Reference.cpp(164): Throw in function eagle::model::Locus eagle::genome::FastaReference::global2local(long unsigned int) Dynamic exception type: boost::exception_detail::clone_impl<eagle::common::EagleException> std::exception::what: std::exception : *** ERROR *** : Could not convert global location 18446744073709551607 into local make: *** [eagle_scaffold3360|size49693.bam] Error 1

I run the simulation with following parameters: ./configureEAGLE.pl ${OUTPUT}/${SCF_GROUP} --template-length-table=/project/sweet/granbow/simulation_data/bin/share/EAGLE/TemplateLengthTables/${1}.tsv --reference-genome=${REF}/${SCF_GROUP}.fa --variant-list=${REF}/${SCF_GROUP}_cleaned_shuffled.vcf --genome-mutator-options="--organism-ploidy=6"

cd ${OUTPUT}/${SCF_GROUP}

make bam

I attach the vcf file and the distribution table. 1k.tsv.gz selected_scfs_50k_cleaned_shuffled.vcf.gz

Thank you!

Edit: I've attached also the log file with 4 similar errors, lines 3239, 28863, 32114, 35894 eagle.log.gz

janinl commented 6 years ago

Hi Euginm,

I am really sorry I'm not going to have time to investigate this in the near future.

Lilian

jayaramanp commented 6 years ago

Hi @janinl any possibility of a fix for this sometime in the near future? the reason being I have recently started using EAGLE for simulating Copy Number variations and its looking great(Bamsurgeon couldnt simulate this for me.. neither could SInC) but I still get a similar error as @euginm has mentioned in this same location: EAGLE/src/c++/lib/io/Fasta.cpp:381: **

.....however when I run make bam again, it works (or i think it does) ** Warning **: Could not determine in which contig global pos 18446744073709551566 belongs to Error: 2018-Aug-21 10:55:15: : /nfs/DGD/Research/DataSimulation/EAGLE/src/c++/lib/genome/Reference.cpp(166): Throw in function eagle::model::Locus eagle::genome::FastaReference::global2local(long unsigned int) Dynamic exception type: boost::exception_detail::clone_impl<eagle::common::EagleException> std::exception::what: std::exception : *** ERROR *** : Could not convert global location 18446744073709551566 into local make: *** [eagle_M_allele1.bam] Error 1

[jayaramanp@dgdrhr-01 EAGLE_OP]$ make bam cp eagle_M_allele1.bam eagle.bam /usr/bin/time -v -o /nfs/DGD/Research/DataSimulation/EAGLE/run2/EAGLE_OP/time.log --append /usr/local/bin/samtools index eagle.bam

janinl commented 6 years ago

Hi, Yes, I should be able to look into it when I'm back in 2 weeks.

Kind regards, Lilian

janinl commented 6 years ago

Hi @jayaramanp

Would you have the input files to reproduce the problem? (or @euginm, I know it has been a while: I don't have the reference genome files that you're using).

Thanks, Lilian

janinl commented 6 years ago

Hi @jayaramanp and @euginm

I managed to fix the problem.

It was due to the PNEXT field of the BAM files being improperly calculated and becoming negative. I didn't manage to calculate the value precisely yet, but I prevented it from making everything crash. I created a new issue to hopefully fix it one day: https://github.com/sequencing/EAGLE/issues/9

Thanks a lot for reporting it.

jayaramanp commented 6 years ago

sincerely apologize I didnt see your comments until now @janinl . Please let me know if you still need files for reproducing the error.

janinl commented 6 years ago

Hi @jayaramanp

It's all good, thanks. You should even be able to use the new Docker image that I deployed today: sudo docker run -it --rm ljanin/eagle:2.5.1

Kind regards, Lilian

jayaramanp commented 6 years ago

perfect! Thank you @janinl