Closed wckdouglas closed 6 years ago
Thanks @wckdouglas, this is a great PR! Rather than pull this into master, I am going to create a new develop branch and pull this in there, as it's my intention to use git flow for release 1.2 on.
This PR is merged into develop with some minor changes. Thanks again!
glad you like it @jdidion, and thanks for catching the suboptimal parts in the PR!
I don't know if you are working on this, but this pull request is a prototype for adding a new feature to extract UMIs from the reads (issue #61).
Basically, I added three new options to
trim
command to clip off the first N bases from read1/read2/both reads and append to the read ID.In this prototype, I am introducing a new instance variable UMI into the Sequence object from
_seqio.pyx
, such that UMIs can be synced between read1 and read2 when the inputs are paired-end. I also implemented two classes of Modifiers to:class UmiTrimmer(Trimmer)
), andclass SyncUMI(ReadPairModifier)
for paired-end, orclass AddUMI(Modifier)
for single-end)I am not sure if these are the best approaches or are there any better ways I can clip and append UMI in one modifier? or syncing the UMIs of a pair of reads without an extra modifier?
Usage example of the current implementation:
Results:
Results:
Results:
So I guess if this is moving forward, do you want to include these in this pull request:
--read2_umi
if it is single-end input, would it be more appropriate if a warning or an error is raised?