Exemple #1
0
 /// <summary>
 /// Method throws an exception if sequence violates any assumption made by this class anywhere.
 /// Avoids, separate checks within each method.
 /// </summary>
 /// <param name="seq"></param>
 private void validateSequence(SAMAlignedSequence seq)
 {
     if (seq == null) {
         throw new ArgumentNullException("seq");
     }
     if (String.IsNullOrEmpty(seq.RName) || 
         seq.RefEndPos <= seq.Pos || 
         String.IsNullOrEmpty(seq.CIGAR) || 
         seq.CIGAR =="*" ||
         !(seq.QuerySequence is QualitativeSequence) )
     {
         throw new ArgumentException("Tried to build a pileup with an invalid sequence.  Sequence was:\n"+
             seq.ToString());
     }
 }