Package picard

Examples of picard.PicardException


            final int sequenceIndex = targets.getHeader().getSequenceIndex(target.getSequence());
            final ReferenceSequence reference = referenceWalker.get(sequenceIndex);

            for (final Bait bait : DESIGN_STRATEGY.design(this, target, reference)) {
                if (bait.length() != BAIT_SIZE) {
                    throw new PicardException("Bait designed at wrong length: " + bait);
                }

                if (bait.getMaskedBaseCount() <= REPEAT_TOLERANCE) {
                    baits.add(bait);
View Full Code Here


                }
            }
            out.close();
        }
        catch (Exception e) {
            throw new PicardException("Error writing out parameters file.", e);
        }
    }
View Full Code Here

            final String sequence = getBaitSequence(bait, rc);
            out.append(sequence);
            out.newLine();
        }
        catch (IOException ioe) {
            throw new PicardException("Error writing out bait information.", ioe);
        }
    }
View Full Code Here

            CloserUtil.close(out);
            CloserUtil.close(agilentOut);
        }
        catch (Exception e) {
            throw new PicardException("Error while writing pool files.", e);
        }
    }
View Full Code Here

        if ( oldIndex == -1 )
            return -1; // unmapped read
        else {
            final Integer n = newOrder.get(oldIndex);

            if (n == null) throw new PicardException("BUG: no mapping found for read " + read.format());
            else return n;
        }
    }
View Full Code Here

                            refRec.getSequenceName(), refRec.getSequenceLength());
                    if ( ALLOW_CONTIG_LENGTH_DISCORDANCE ) {
                        log.warn(msg);
                    }
                    else {
                        throw new PicardException(msg);
                    }
                }

                log.info(String.format("  Reordering read contig %s [index=%d] to => ref contig %s [index=%d]%n",
                                       readsRec.getSequenceName(), readsRec.getSequenceIndex(),
                                       refRec.getSequenceName(), refRec.getSequenceIndex()  ));
                newOrder.put(readsRec.getSequenceIndex(), refRec.getSequenceIndex());
            }
        }

        for ( SAMSequenceRecord readsRec : readsDict.getSequences() ) {
            if ( ! newOrder.containsKey(readsRec.getSequenceIndex()) ) {
                if ( ALLOW_INCOMPLETE_DICT_CONCORDANCE )
                    newOrder.put(readsRec.getSequenceIndex(), -1);
                else
                    throw new PicardException("New reference sequence does not contain a matching contig for " + readsRec.getSequenceName());
            }
        }

        return newOrder;
    }
View Full Code Here

    public void seekToTile(int oneBasedTileNumber) {
        nextTile = oneBasedTileNumber;

        if(!tileToFiles.containsKey(oneBasedTileNumber)) {
            throw new PicardException("PerTileParser does not contain key(" + oneBasedTileNumber +") keys available (" + StringUtil.join(",", new ArrayList<Integer>(tileToFiles.keySet())) + ")");
        }

        if(currentIterator != null) {
            currentIterator.close();
        }
View Full Code Here

    }

    public void verifyData(List<Integer> tiles, final int [] cycles) {
        final List<Integer> mapTiles = new ArrayList<Integer>(this.tileToFiles.keySet());
        if(!mapTiles.containsAll(tiles)) {
            throw new PicardException("Missing tiles in PerTileParser expected(" + StringUtil.join(",", tiles) + ") but found (" + StringUtil.join(",", mapTiles) + ")");
        }

        if(!tiles.containsAll(mapTiles)) {
            throw new PicardException("Extra tiles where found in PerTileParser  expected(" + StringUtil.join(",", tiles) + ") but found (" + StringUtil.join(",", mapTiles) + ")");
        }
    }
View Full Code Here

            // Grab the existing collection, or initialize it if it doesn't yet exist
            SortingCollection<CLUSTER_OUTPUT_RECORD> recordCollection = this.barcodeToRecordCollection.get(barcode);
            if (recordCollection == null) {
                if (!barcodeRecordWriterMap.containsKey(barcode))
                    throw new PicardException(String.format("Read records with barcode %s, but this barcode was not expected.  (Is it referenced in the parameters file?)", barcode));
                recordCollection = this.newSortingCollection();
                this.barcodeToRecordCollection.put(barcode, recordCollection);
                this.barcodeToProcessingState.put(barcode, null);
            }
            recordCollection.add(record);
View Full Code Here

    public final int start;
    public final int end;
    public final int length;
    public Range(final int start, final int end) {
        if(end < start) {
            throw new PicardException("Nonsensical Range(" + start + ", " + end + ")");
        }

        this.start = start;
        this.end   = end;
        this.length = end - start + 1;
View Full Code Here

TOP

Related Classes of picard.PicardException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.