Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PositionalAssembler errors #478

Closed
orsolyasipos opened this issue Mar 25, 2021 · 2 comments
Closed

PositionalAssembler errors #478

orsolyasipos opened this issue Mar 25, 2021 · 2 comments

Comments

@orsolyasipos
Copy link

Hi,

I am trying to run GRIDSS (version 2.10.2) on a matched tumour-normal pair (2 bam files for the tumour, separated as per readgroups, and 1 bam file for the normal).

gridss -Xmx12g -jar $app_JAR \
	REFERENCE_SEQUENCE=$REF \
	OUTPUT=$tumour_od/$tumour_id.vcf \
	ASSEMBLY=$tumour_od/${tumour_id}_assembly.bam \
	WORKING_DIR=$tumour_wd \
	BLACKLIST=$WD/ENCFF220FIN.bed \
	INPUT=$ASCEX_N/$normal_id/$normal_id.secondary.removed.bam \
	INPUT=$ASCEX_T/$tumour_id.secondary.removed_0.bam \
	INPUT=$ASCEX_T/$tumour_id.secondary.removed_1.bam

The bam files are trimmed, deduplicated, coordinate sorted and I removed the secondary alignments (the aligment was done with bwa mem, using the -M argument).

samtools view -h ${ASCEX}/${tumour_id}/${tumour_id}.sorted.clean.deduplicated.bam | grep -v -e 'XA:Z:' | samtools view -b > ${tumour_od}/${tumour_id}.secondary.removed.bam

GRIDSS did run and produced a vcf file, but I have got the two following error messages multiple times (~ 2000).

ERROR	2021-03-25 00:53:11	PositionalAssembler	Error assembling chr1. This should not happen. Please raise an issue at https://github.com/PapenfussLab/gridss/issues. Attempting recovery by resuming assembly at chr1:40563013
java.lang.NullPointerException
	at au.edu.wehi.idsv.debruijn.positional.NonReferenceContigAssembler$SupportLookup.contigBaseOffsetBounds(NonReferenceContigAssembler.java:855)
	at au.edu.wehi.idsv.debruijn.positional.NonReferenceContigAssembler$SupportLookup.readPairEvidence(NonReferenceContigAssembler.java:818)
	at au.edu.wehi.idsv.debruijn.positional.NonReferenceContigAssembler$SupportLookup.supportInterval(NonReferenceContigAssembler.java:800)
	at au.edu.wehi.idsv.debruijn.positional.NonReferenceContigAssembler.lambda$callContig$7(NonReferenceContigAssembler.java:462)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.IdentityHashMap$KeySpliterator.forEachRemaining(IdentityHashMap.java:1443)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at au.edu.wehi.idsv.debruijn.positional.NonReferenceContigAssembler.callContig(NonReferenceContigAssembler.java:463)
	at au.edu.wehi.idsv.debruijn.positional.NonReferenceContigAssembler.flushCallsOutsideRetainWindow(NonReferenceContigAssembler.java:198)
	at au.edu.wehi.idsv.debruijn.positional.NonReferenceContigAssembler.ensureCalledContig(NonReferenceContigAssembler.java:225)
	at au.edu.wehi.idsv.debruijn.positional.NonReferenceContigAssembler.hasNext(NonReferenceContigAssembler.java:162)
	at au.edu.wehi.idsv.debruijn.positional.PositionalAssembler.flushIfRequired(PositionalAssembler.java:70)
	at au.edu.wehi.idsv.debruijn.positional.PositionalAssembler.ensureAssembler(PositionalAssembler.java:110)
	at au.edu.wehi.idsv.debruijn.positional.PositionalAssembler.ensureAssembler(PositionalAssembler.java:86)
	at au.edu.wehi.idsv.debruijn.positional.PositionalAssembler.hasNext(PositionalAssembler.java:56)
	at au.edu.wehi.idsv.AssemblyEvidenceSource.assembleChunk(AssemblyEvidenceSource.java:232)
	at au.edu.wehi.idsv.AssemblyEvidenceSource.assembleChunk(AssemblyEvidenceSource.java:192)
	at au.edu.wehi.idsv.AssemblyEvidenceSource.lambda$assembleBreakends$1(AssemblyEvidenceSource.java:93)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:844)

ERROR	2021-03-25 02:17:37	PositionalAssembler	Error assembling chr6. This should not happen. Please raise an issue at https://github.com/PapenfussLab/gridss/issues. Attempting recovery by resuming assembly at chr6:95219770
java.util.NoSuchElementException
	at com.google.common.collect.TreeRangeSet.span(TreeRangeSet.java:173)
	at au.edu.wehi.idsv.debruijn.positional.NonReferenceContigAssembler$SupportLookup.singleReadEvidence(NonReferenceContigAssembler.java:811)
	at au.edu.wehi.idsv.debruijn.positional.NonReferenceContigAssembler$SupportLookup.supportInterval(NonReferenceContigAssembler.java:797)
	at au.edu.wehi.idsv.debruijn.positional.NonReferenceContigAssembler.lambda$callContig$7(NonReferenceContigAssembler.java:462)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.IdentityHashMap$KeySpliterator.forEachRemaining(IdentityHashMap.java:1443)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at au.edu.wehi.idsv.debruijn.positional.NonReferenceContigAssembler.callContig(NonReferenceContigAssembler.java:463)
	at au.edu.wehi.idsv.debruijn.positional.NonReferenceContigAssembler.ensureCalledContig(NonReferenceContigAssembler.java:232)
	at au.edu.wehi.idsv.debruijn.positional.NonReferenceContigAssembler.hasNext(NonReferenceContigAssembler.java:162)
	at au.edu.wehi.idsv.debruijn.positional.PositionalAssembler.flushIfRequired(PositionalAssembler.java:70)
	at au.edu.wehi.idsv.debruijn.positional.PositionalAssembler.ensureAssembler(PositionalAssembler.java:110)
	at au.edu.wehi.idsv.debruijn.positional.PositionalAssembler.ensureAssembler(PositionalAssembler.java:86)
	at au.edu.wehi.idsv.debruijn.positional.PositionalAssembler.hasNext(PositionalAssembler.java:56)
	at au.edu.wehi.idsv.AssemblyEvidenceSource.assembleChunk(AssemblyEvidenceSource.java:232)
	at au.edu.wehi.idsv.AssemblyEvidenceSource.assembleChunk(AssemblyEvidenceSource.java:192)
	at au.edu.wehi.idsv.AssemblyEvidenceSource.lambda$assembleBreakends$1(AssemblyEvidenceSource.java:93)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:844)    

I did try to do queryname sorting, as it was recommended on the manual with samtools:

samtools sort -l 9 -m 4G -@ 8 -n ${ASCEX_T}/${tumour_id}.secondary.removed_0.bam -o ${tumour_od}/${tumour_id}.samtools.queryname.sorted_0.bam

As GRIDSS failed, I also tried the queryname soring with picard-tools:

java -Xmx12G -jar $picard_jar SortSam \
	I=${ASCEX_T}/${tumour_id}.secondary.removed_0.bam \
	O=${tumour_od}/${tumour_id}.queryname.sorted_0.bam \
	SORT_ORDER=queryname

But in both cases GRIDSS failed with the same error message:

ERROR	2021-03-24 06:36:09	CallVariants	Fatal exception thrown by worker thread.
htsjdk.samtools.SAMException: Requesting earlier reference sequence: 0 < 7
	at htsjdk.samtools.reference.ReferenceSequenceFileWalker.get(ReferenceSequenceFileWalker.java:87)
	at picard.analysis.SinglePassSamProgram.makeItSo(SinglePassSamProgram.java:141)
	at picard.analysis.CollectMultipleMetrics.doWork(CollectMultipleMetrics.java:563)
	at gridss.analysis.CollectGridssMetrics.doWork(CollectGridssMetrics.java:68)
	at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:295)
	at au.edu.wehi.idsv.SAMEvidenceSource.execute(SAMEvidenceSource.java:156)
	at au.edu.wehi.idsv.SAMEvidenceSource.ensureMetrics(SAMEvidenceSource.java:140)
	at gridss.CallVariants$1$1.call(CallVariants.java:55)
	at gridss.CallVariants$1$1.call(CallVariants.java:51)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:844)

Any help would be much appreciated on the bam file preprocessing. Thank you!

@d-cameron
Copy link
Member

I did try to do queryname sorting, as it was recommended on the manual with samtools:

GRIDSS requires coordinate sorted BAM files. Can you point me to where in the manual you found this recommendation so I can fix the documentat?

I have got the two following error messages multiple times

These are rather strange errors are they don't match the code for version 2.10.2. Nevertheless, they should be fixed in GRIDSS 2.11.1.

@orsolyasipos
Copy link
Author

GRIDSS requires coordinate sorted BAM files. Can you point me to where in the manual you found this recommendation so I can fix the documentat?

I tried to find where did I read that the input should be queryname sorted in the manual, but I could not. It must be my mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants