Comments (8)
@serge2016 I checked it works for the specific edge case variant I found before. Let us know if there are any other variants that give an issue if you try to rerun on it. I'm not sure when the next Picard release will be, but you can test building from master
if you're interested in seeing if the new version of the tool can get through your entire file.
from picard.
nice sleuthing work @rickymagner! IIANM, I'm largely responsible for the lift-over of indels, and so if I can help, let me know.
from picard.
Hi @yfarjoun, if you do have some time to look at this, that would be great. I suspect the part of the code causing this error is located in LiftoverUtils.java
at L389 here:
// 5. if there exists an empty allele then
if (alleleBasesMap.values().stream()
.map(a -> a.length)
.anyMatch(l -> l == 0)) {
// 6. extend alleles 1 nucleotide to the left
for (final Allele allele : alleleBasesMap.keySet()) {
// the first -1 for zero-base (getBases) versus 1-based (variant position)
// another -1 to get the base prior to the location of the start of the allele
final byte extraBase = (theStart > 1) ?
referenceSequence.getBases()[theStart - 2] :
referenceSequence.getBases()[theEnd];
alleleBasesMap.put(allele, extendOneBase(alleleBasesMap.get(allele), extraBase));
}
changesInAlleles = true;
theStart--;
// 7. end if
}
The theStart - 2
looks like it could suspiciously lead to a string index becoming -1 when theStart == 1
, but this could also be a red herring since the conditional which triggers this block might not be satisfied by the given variant. I haven't been able to look too deeply at the code around here to understand what's actually happening.
This is not the moment the stacktrace is thrown of course, but I'm wondering if it's the place where that -1 appears and then propagates further to the moment later in tryToAddVariant
where the string constructor is given index -1 to start which triggers the error. Otherwise I'm not sure how that number would ever become -1 yet.
from picard.
I'll see what I can do. do you have a test-case that fails? I know you got a vcf from a user, but have you converted it to an additional unit test? I think that would be a good first step, so if you did it, please point me to it, if not, I can try my hand.
from picard.
Thanks. Yes, I would take the files from the issue above (the JP ref + chain file linked from the public URL; should be small enough to download), and then take the bad deletion variant I wrote on chr17 and add an hg38 header to it. Any header should be fine, but didn't want to post a complete example since there's 3k contigs there. I haven't turned it into a formal Java test yet, but might be able to try that this week (using the example above, or rewriting one using whatever resource files we already have in the test suite).
from picard.
This is resolved by #1933
from picard.
I suppose it is resolved by #1956
from picard.
from picard.
Related Issues (20)
- CollectHsMetrics returns negative percentages on PacBio data HOT 5
- Problem with Picard tool for Collecting RNASeqMetrics HOT 4
- Streaming from requester-pays buckets for CrosscheckFingerprints doesn't work in Terra HOT 2
- StringIndexOutOfBoundsException at LiftoverVcf HOT 3
- Error: A JNI error has occurred, please check your installation and try again HOT 1
- MarkDuplicates: Instead of adding the read group of a read to the key, picard always adds "RG"
- java.lang.NegativeArraySizeException HOT 2
- genotypeConcordance irregular behavior in counting after applying filters HOT 3
- MarkDuplicates with single end data does not write the full report HOT 3
- Picard Build Failure HOT 6
- java environment not detected when using option OUTPUT in BuilBamIndex HOT 1
- Getting Segfault when running ReorderSam via GATK HOT 1
- How to control the number of threads HOT 1
- TAGGING_POLICY=OpticalOnly tags everything HOT 4
- Issue Running Picard MarkDuplicates: File Compression Error with Snappy HOT 1
- about MarkDuplicates HOT 1
- UnMarkDuplicate HOT 1
- Running picard in parallel issue HOT 3
- `--USE_END_IN_UNPAIRED_READS` and `--USE_UNPAIRED_CLIPPED_END` options for `picard MarkDuplicates` have no effect HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from picard.