Package net.sf.picard

Examples of net.sf.picard.PicardException


      IoUtil.assertFileIsWritable(OUTPUT);
      try {
        out = new PrintWriter(OUTPUT);
      } catch (FileNotFoundException e) {
        // we already asserted this so we should not get here
        throw new PicardException("Unexpected error. ", e);
      }
    } else {
      out = new PrintWriter(System.out);
    }
View Full Code Here


      try {
        summary_file = new PrintWriter(summarydir_name + "summary.txt");
        validation_file = new PrintWriter(summarydir_name + "validation.txt");
      } catch (FileNotFoundException e) {
        // we already asserted this so we should not get here
        throw new PicardException("Could not create metrics files", e);
      }

    }
  }
View Full Code Here

            k.allele2 = fields[3].charAt(1);
            k.ID = fields[0];

            known_calls.get(fields[1]).put(Integer.parseInt(fields[2]), k);
          } else
            throw new PicardException("Invalid 'known calls' format.");
        }
      } catch (Exception e) {
        throw new PicardException(e.getMessage());
      }

      //output file header
      WriteHeader(OUTPUT_FORMAT, false_negatives_file);
View Full Code Here

            "Older BAM file -- does not have terminator block",
            inputFile.getPath()));

      }
    } catch (IOException e) {
      throw new PicardException("IOException", e);
    } finally {
      if (inputStream != null) {
        CloserUtil.close(inputStream);
      }
    }
View Full Code Here

      // reads one record ahead so we will get this failure one record
      // ahead
      final String msg = "SAMFormatException on record "
          + progress.getCount() + 1;
      out.println(msg);
      throw new PicardException(msg, e);
    } catch (FileTruncatedException e) {
      addError(new SAMValidationError(Type.TRUNCATED_FILE,
          "File is truncated", null));
    } finally {
      iter.close();
View Full Code Here

          out.writeBoolean(record.mateNegStrandFlag);
          out.writeBoolean(record.mateUnmappedFlag);
          out.writeBoolean(record.firstOfPairFlag);
          out.writeLong(record.recordNumber);
        } catch (IOException e) {
          throw new PicardException(
              "Error spilling PairInfo to disk", e);
        }
      }
View Full Code Here

              readUnmappedFlag, mateAlignmentStart,
              mateReferenceIndex, mateNegStrandFlag,
              mateUnmappedFlag, firstOfPairFlag, recordNumber);
          return new AbstractMap.SimpleEntry(key, rec);
        } catch (IOException e) {
          throw new PicardException(
              "Error reading PairInfo from disk", e);
        }
      }
View Full Code Here

        writer.close();
    }

    protected void notifyOrphan(String name) {
        if (IGNORE_ORPHAN_MATES == false)
            throw new PicardException("Read "+name+" is orphaned!");
    }
View Full Code Here

            if (firstSeenMates.size() > 0)  {
               
                // are we ignoring these.   
                if (IGNORE_ORPHAN_MATES == false)
                    throw new PicardException("Found "+firstSeenMates.size()+" reads with flags that indicated they were paired, but no mates were seen.");
           
                for (final SAMRecord currentRecord : firstSeenMates.values()) {
                    writeRecord(currentRecord, null, fragWriter);
                }
View Full Code Here

                doGroupedUnpaired(writers, currentRecord);
            }
        }

        if (firstSeenMates.size() > 0 && IGNORE_ORPHAN_MATES == false) {
            throw new PicardException("Found "+firstSeenMates.size()+" unpaired mates");
        }

        reader.close();
        for(final List<FastqWriter> writerPair : writers.values()){
            for(final FastqWriter fq : writerPair){
View Full Code Here

TOP

Related Classes of net.sf.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.