コード例 #1
0
 /**
  * Get names of read elements expected in each read
  *
  * @return Ordered list of read element names
  */
 public final ArrayList<String> getElementNames() {
   ArrayList<String> rtrn = new ArrayList<String>();
   for (ReadSequenceElement elt : elements) {
     rtrn.add(elt.elementName());
   }
   return rtrn;
 }
コード例 #2
0
 /**
  * @param elementSequence Sequence of elements expected in each read
  * @param readLength Read length
  */
 public ReadLayout(ArrayList<ReadSequenceElement> elementSequence, int readLength) {
   int totalLen = 0;
   for (ReadSequenceElement elt : elementSequence) {
     totalLen += elt.getLength();
   }
   if (totalLen > readLength) {
     throw new IllegalArgumentException(
         "Total length of read sequence elements ("
             + totalLen
             + ") must be at most declared read length ("
             + readLength
             + ").");
   }
   elements = elementSequence;
   readLen = readLength;
   initializeElementsByRepresentative();
 }
コード例 #3
0
 private void initializeElementsByRepresentative() {
   elementsByRepresentative = new HashMap<ReadSequenceElement, Map<String, ReadSequenceElement>>();
   for (ReadSequenceElement element : elements) {
     elementsByRepresentative.put(element, element.sequenceToElement());
   }
 }