Skip to content

Commit

Permalink
✨ Load up the N and mask blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
davep committed Aug 9, 2020
1 parent 594a329 commit 2a272bd
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion 2bit.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,15 @@
(dna-size
:accessor dna-size
:type integer
:documentation "Size of the DNA in the sequence."))
:documentation "Size of the DNA in the sequence.")
(n-blocks
:accessor n-blocks
:type block-collection
:documentation "Details of the blocks of Ns in the sequence.")
(mask-blocks
:accessor mask-blocks
:type block-collection
:documentation "Details of the masked blocks in the sequence."))
(:documentation "Class that provides access to a specific sequence."))

(defmethod print-object ((sequence 2bit-sequence) stream)
Expand All @@ -96,6 +104,10 @@
(with-saved-location (reader offset)
;; Get the size of the DNA.
(setf (dna-size seq) (long-read reader))
;; Get the N-block information.
(setf (n-blocks seq) (make-block-collection reader))
;; Get the mask block information.
(setf (mask-blocks seq) (make-block-collection reader))
;; Return the new sequence.
seq)))

Expand Down

0 comments on commit 2a272bd

Please sign in to comment.